CGAffineTransform
extension CGAffineTransform
-
Returns a transform which scales by
(sx, sy). Equivalent toCGAffineTransformMakeScale(sx, sy).Declaration
Swift
public static func scale(_ sx: CGFloat, _ sy: CGFloat) -> CGAffineTransformParameters
sxThe
xscale.syThe
yscale.Return Value
A transform scaled by
(sx, sy).
-
Returns a transform which translates by
(tx, ty). Equivalent toCGAffineTransformMakeTranslation(tx, ty).Declaration
Swift
public static func translate(_ tx: CGFloat, _ ty: CGFloat) -> CGAffineTransformParameters
txThe
xtranslation.tyThe
ytranslation.Return Value
A transform translated by
(tx, ty).
-
Returns a transform which rotates by
angleradians. Equivalent toCGAffineTransformMakeRotation(angle).Declaration
Swift
public static func rotate(_ angle: CGFloat) -> CGAffineTransformParameters
angleThe rotation angle in radians.
Return Value
A transform rotated by
angleradians.
-
Returns a transform which inverts another transform. Equivalent to
CGAffineTransformInvert(transform).Declaration
Swift
public static func invert(_ transform: CGAffineTransform) -> CGAffineTransformParameters
transformThe transform to invert.
Return Value
An inverted transform.
-
Returns the concatenation of an array of transforms.
Declaration
Swift
public static func concat(_ transforms: CGAffineTransform...) -> CGAffineTransformParameters
transformsThe array of transforms to concatenate.
Return Value
A concatenation of the array of transforms.
-
Concatenates two CGAffineTransforms and returns the result. Equivalent to
CGAffineTransformConcat(lhs, rhs).Declaration
Swift
public static func * (lhs: CGAffineTransform, rhs: CGAffineTransform) -> CGAffineTransformParameters
lhsThe first transform.
rhsThe second transform.
Return Value
The concatentation of the two transforms.
View on GitHub
Install in Dash
CGAffineTransform Extension Reference