Transform.scale

Combine the current transform with a scaling.

The center of scaling is provided for convenience as a second argument, so that you can build scaling around arbitrary points more easily (and efficiently) than the usual translate(-center).scale(factors).translate(center).

This function returns a reference to this, so that calls can be chained.

  1. Transform scale(float scaleX, float scaleY)
  2. Transform scale(Vector2f factors)
  3. Transform scale(float scaleX, float scaleY, float centerX, float centerY)
    struct Transform
    ref
    scale
    (
    float scaleX
    ,
    float scaleY
    ,
    float centerX
    ,
    float centerY
    )
  4. Transform scale(Vector2f factors, Vector2f center)

Parameters

scaleX float

Scaling factor on the X-axis

scaleY float

Scaling factor on the Y-axis

centerX float

X coordinate of the center of scaling

centerY float

Y coordinate of the center of scaling

Return Value

Type: Transform

this

Meta