Instance Method

prepend(_:)

Prepends the specified matrix to the receiver’s matrix.

Declaration

macOS
func prepend(_ transform: AffineTransform)
Mac Catalyst
func prepend(_ transform: NSAffineTransform)

Parameters

aTransform

The matrix to prepend to the receiver.

Discussion

This method multiplies the matrix in aTransform by the receiver’s matrix and replaces the receiver’s matrix with the result. This type of operation is the same as applying the transformations in aTransform followed by the transformations in the receiver.

See Also

Accumulating Transformations

func rotate(byDegrees: CGFloat)

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

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 invert()

Replaces the receiver’s matrix with its inverse matrix.