Define transform matrices to apply affine transformations to layers in Core Animation.
Framework
- Core Animation
Define transform matrices to apply affine transformations to layers in Core Animation.
Framework
func CATransform3DMake Translation(CGFloat, CGFloat, CGFloat) -> CATransform3D
Returns a transform that translates by (tx, ty, tz)
.
func CATransform3DMake Scale(CGFloat, CGFloat, CGFloat) -> CATransform3D
Returns a transform that scales by (sx, sy, sz)
.
func CATransform3DMake Rotation(CGFloat, CGFloat, CGFloat, CGFloat) -> CATransform3D
Returns a transform that rotates by angle
radians about the vector (x, y, z)
.
func CATransform3DConcat(CATransform3D, CATransform3D) -> CATransform3D
Concatenates b
to a
and returns the result: t = a * b
.
func CATransform3DTranslate(CATransform3D, CGFloat, CGFloat, CGFloat) -> CATransform3D
Translates t
by (tx, ty, tz)
and returns the result: t
= translate(tx, ty, tz) * t
.
func CATransform3DScale(CATransform3D, CGFloat, CGFloat, CGFloat) -> CATransform3D
Scales t
by (sx, sy, sz)
and returns the result: t = scale(sx, sy, sz) * t
.
func CATransform3DRotate(CATransform3D, CGFloat, CGFloat, CGFloat, CGFloat) -> CATransform3D
Rotates t
by angle
radians about the vector (x, y, z)
and returns the result.
func CATransform3DInvert(CATransform3D) -> CATransform3D
Inverts t
and returns the result.
func CATransform3DIs Affine(CATransform3D) -> Bool
Returns true
if t
can be exactly represented by an affine transform.
func CATransform3DIs Identity(CATransform3D) -> Bool
Returns a Boolean value that indicates whether the transform is the identity transform.
func CATransform3DEqual To Transform(CATransform3D, CATransform3D) -> Bool
Returns a Boolean value that indicates whether the two transforms are exactly equal.
func CATransform3DMake Affine Transform(CGAffine Transform) -> CATransform3D
Returns a transform with the same effect as affine transform m
.
func CATransform3DGet Affine Transform(CATransform3D) -> CGAffine Transform
Returns the affine transform represented by t
.
struct CATransform3D
The standard transform matrix used throughout Core Animation.
let CATransform3DIdentity: CATransform3D
The identity transform: [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]
.