Instance Method

scaledBy(x:y:)

Returns an affine transformation matrix constructed by scaling an existing affine transform.

Declaration

func scaledBy(x sx: CGFloat, y sy: CGFloat) -> CGAffineTransform

Parameters

sx

The value by which to scale x values of the affine transform.

sy

The value by which to scale y values of the affine transform.

Return Value

A new affine transformation matrix.

Discussion

You use this function to create a new affine transformation matrix by adding scaling values to an existing affine transform. The resulting structure represents a new affine transform, which you can use (and reuse, if you want) to scale a coordinate system.

See Also

Modifying Affine Transformations

func translatedBy(x: CGFloat, y: CGFloat) -> CGAffineTransform

Returns an affine transformation matrix constructed by translating an existing affine transform.

func rotated(by: CGFloat) -> CGAffineTransform

Returns an affine transformation matrix constructed by rotating an existing affine transform.

func inverted() -> CGAffineTransform

Returns an affine transformation matrix constructed by inverting an existing affine transform.

func concatenating(CGAffineTransform) -> CGAffineTransform

Returns an affine transformation matrix constructed by combining two existing affine transforms.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software