Instance Method

rotate(byDegrees:)

Applies a rotation factor (measured in degrees) to the receiver’s transformation matrix.

Declaration

func rotate(byDegrees angle: CGFloat)

Parameters

angle

The rotation angle, measured in degrees.

Discussion

After invoking this method, applying the receiver’s matrix turns the axes counterclockwise about the current origin by angle degrees, in addition to performing all previous transformations.

See Also

Accumulating Transformations

func rotate(byRadians: CGFloat)

Applies a rotation factor (measured in radians) to the receiver’s transformation matrix.

func scale(by: CGFloat)

Applies the specified scaling factor along both x and y axes to the receiver’s transformation matrix.

func scaleX(by: CGFloat, yBy: CGFloat)

Applies scaling factors to each axis of the receiver’s transformation matrix.

func translateX(by: CGFloat, yBy: CGFloat)

Applies the specified translation factors to the receiver’s transformation matrix.

func append(AffineTransform)

Appends the specified matrix to the receiver’s matrix.

func prepend(AffineTransform)

Prepends the specified matrix to the receiver’s matrix.

func invert()

Replaces the receiver’s matrix with its inverse matrix.