Contents

scaleBy(x:y:)

Scales subsequent drawing operations by an amount in each dimension.

Declaration

mutating func scaleBy(x: CGFloat, y: CGFloat)

Parameters

  • x:

    The amount to scale in the horizontal direction.

  • y:

    The amount to scale in the vertical direction.

Discussion

Calling this method is equivalent to updating the context’s transform directly using the given scale factors:

transform = transform.scaledBy(x: x, y: y)

See Also

Applying transforms