public final class CGAffineTransform extends Object
Constructor and Description |
---|
CGAffineTransform(double a,
double b,
double c,
double d,
double tx,
double ty)
Constructs an affine transformation with the specified matrix values.
|
Modifier and Type | Method and Description |
---|---|
CGAffineTransform |
concat(CGAffineTransform other)
Returns the combination of the specified affine transformation and the
current one.
|
boolean |
equals(Object o) |
double |
getA() |
double |
getB() |
double |
getC() |
double |
getD() |
double |
getTx() |
double |
getTy() |
int |
hashCode() |
static CGAffineTransform |
identity()
Returns the identity affine transformation.
|
CGAffineTransform |
invert()
Returns the inverted affine transformation matrix of the current one.
|
boolean |
isIdentity()
Returns a Boolean that specifies whether this affine transformation is
the identity transformation.
|
static CGAffineTransform |
makeRotation(double alpha)
Returns the transformation matrix that results from the specified angle.
|
static CGAffineTransform |
makeScale(double sx,
double sy)
Returns the transformation matrix that results from the specified scaling
values.
|
static CGAffineTransform |
makeTranslation(double tx,
double ty)
Returns the transformation matrix that results from the specified values.
|
CGAffineTransform |
rotate(double alpha)
Returns the transformation matrix that results from the rotation of the
specified affine transformation.
|
CGAffineTransform |
scale(double sx,
double sy)
Returns the affine transformation matrix that results from the specified
values.
|
void |
setA(double a) |
void |
setB(double b) |
void |
setC(double c) |
void |
setD(double d) |
void |
setTx(double tx) |
void |
setTy(double ty) |
String |
toString() |
CGAffineTransform |
translate(double tx,
double ty)
Returns the transformation matrix of this affine transformation.
|
public CGAffineTransform(double a, double b, double c, double d, double tx, double ty)
a
- The value at [1,1] position of the matrix.b
- The value at [1,2] position of the matrix.c
- The value at [2,1] position of the matrix.d
- The value at [2,2] position of the matrix.tx
- The value at [3,1] position of the matrix.ty
- The value at [3,2] position of the matrix.public static CGAffineTransform identity()
public static CGAffineTransform makeRotation(double alpha)
alpha
- The angle of the rotation expressed in radians.public static CGAffineTransform makeScale(double sx, double sy)
sx
- The scale for x values.sy
- The scale for y values.public static CGAffineTransform makeTranslation(double tx, double ty)
tx
- The transformation for x values.ty
- The transformation for x values.public double getA()
public void setA(double a)
public double getB()
public void setB(double b)
public double getC()
public void setC(double c)
public double getD()
public void setD(double d)
public double getTx()
public void setTx(double tx)
public double getTy()
public void setTy(double ty)
public CGAffineTransform rotate(double alpha)
alpha
- The angle of the rotation expressed in radians.public CGAffineTransform scale(double sx, double sy)
sx
- The scale of x values.sy
- The scale of y values.public CGAffineTransform translate(double tx, double ty)
tx
- The transformation of x values.ty
- The transformation of y values.public CGAffineTransform concat(CGAffineTransform other)
other
- The other affine transformation.public boolean isIdentity()
public CGAffineTransform invert()
Copyright © 2020. All rights reserved.