computeRenderSize method

Vector2 computeRenderSize(
  1. ScalingMode mode,
  2. Vector2 size
)

Implementation

Vector2 computeRenderSize(ScalingMode mode, Vector2 size) {
  switch (mode) {
    case ScalingMode.containX:
      return Vector2(size.x, size.x);
    case ScalingMode.containY:
      return Vector2(size.y, size.y);
  }
}