public class ASMatrix extends ASObject
| Constructor and Description |
|---|
ASMatrix(ASMatrix B)
Constructs a new matrix from another matrix (like clone)
|
ASMatrix(double[] array)
Constructs a new matrix of 2 columns, 3 rows from an
array of doubles with the ordering ( a, b, c, d, x, y ) where
x gives in x and y gives translation in y.
|
ASMatrix(double a,
double b,
double c,
double d,
double x,
double y)
Constructs a new matrix of 2 columns, 3 rows (a, b, c, d, x, y).
|
| Modifier and Type | Method and Description |
|---|---|
ASMatrix |
concat(ASMatrix A)
(left) multiply new transform with this (computes X * A, where X is the current transform)
|
static ASMatrix |
createIdentityMatrix()
Returns an identity matrix.
|
boolean |
equals(ASMatrix t)
Test for equality
|
double |
geta() |
double |
getb() |
double |
getc() |
double |
getd() |
ASMatrix |
getInverse()
Find the matrix, B, that has the property: B * X = identity.
|
ASMatrix |
getUnitRotationMatrix() |
double[] |
getValues() |
double |
getx() |
double |
gety() |
boolean |
isIdentity()
Test for Identity of the 4x4 matrix
Exclusive of translation
|
boolean |
isIdentity6x6()
Test for Identity of the 6x6 matrix
Inclusive of translation
|
boolean |
isInvertable()
Test for invertability
|
void |
mult(double px,
double py,
double[] output)
Multiply a vector by our matrix.
|
double |
multGetX(double px,
double py) |
double |
multGetY(double px,
double py) |
ASMatrix |
preMultiply(double h,
double v)
Premultiply the current transform with a translation
|
ASMatrix |
preScale(double x) |
ASMatrix |
preScale(double sx,
double sy)
Premultiply the current transform with a scale
|
ASMatrix |
rotate(double angle)
Concatentate the current transform with a rotate
|
ASMatrix |
scale(double x) |
ASMatrix |
scale(double sx,
double sy)
Concatentate the current transform with a scale
|
ASMatrix |
setItalicDegrees(double angle)
Set an italic angle
|
ASMatrix |
setTranslate(double h,
double v)
Set an absolute translation
|
String |
toString()
Converts this object to a String representation.
|
ASMatrix |
translate(double h,
double v)
Concatenate the current transform with a translate
|
void |
write(OutputByteStream outputByteStream)
Writes the ASHexString in to the given OutputStream in the format expected by the PDF Spec.
|
public ASMatrix(double a,
double b,
double c,
double d,
double x,
double y)
x - Translation in xy - Translation in ypublic ASMatrix(double[] array)
public ASMatrix(ASMatrix B)
B - PDFAffineTransformpublic static ASMatrix createIdentityMatrix()
public double geta()
public double getb()
public double getc()
public double getd()
public double getx()
public double gety()
public double[] getValues()
public boolean equals(ASMatrix t)
public boolean isIdentity()
public boolean isIdentity6x6()
public boolean isInvertable()
public ASMatrix rotate(double angle)
angle - Amount of rotation in radians.public ASMatrix scale(double sx, double sy)
public ASMatrix scale(double x)
public ASMatrix preScale(double sx, double sy)
public ASMatrix preScale(double x)
public ASMatrix translate(double h, double v)
public ASMatrix preMultiply(double h, double v)
public ASMatrix setTranslate(double h, double v)
public ASMatrix setItalicDegrees(double angle)
public void mult(double px,
double py,
double[] output)
px - Along with py: input vectorpy - Along with px: input vectoroutput - output vector -- must be at least size 2 (x is index 0, y is index 1)public double multGetX(double px,
double py)
public double multGetY(double px,
double py)
public ASMatrix concat(ASMatrix A)
A - new transform.public ASMatrix getInverse() throws PDFInvalidParameterException
PDFInvalidParameterException - If the matrix does not have an inverse.public String toString()
public void write(OutputByteStream outputByteStream) throws PDFIOException
write in class ASObjectoutputByteStream - OutputStream to write to.PDFIOExceptionASStringpublic ASMatrix getUnitRotationMatrix()
Copyright © 2010 - 2020 Adobe. All Rights Reserved