public class JDFMatrix extends JDFNumList
[ x'] [ a b tx ] [ x ] [ m00x + m01y + m02 ] [ y'] = [ c d ty ] [ y ] = [ m10x + m11y + m12 ] [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
JDFBaseDataTypes.EnumFitsValue| Modifier and Type | Field and Description |
|---|---|
static JDFMatrix |
unitMatrix |
capacityIncrement, elementCount, elementDatamodCountEPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION| Constructor and Description |
|---|
JDFMatrix()
constructs a matrix with all values set to 0.0 Double
|
JDFMatrix(double degrees,
double x,
double y)
constructs a matrix with all values set via arotation and a shift
|
JDFMatrix(double a,
double b,
double c,
double d,
double tx,
double ty)
constructs a new JDFMatrix with the given double values
|
JDFMatrix(JDFElement.EnumOrientation orientation,
double w,
double h)
constructs a matrix with all values set via an enumerated orientation
|
JDFMatrix(JDFMatrix nl)
constructs a rectangle with all values set via a JDFNumberList
|
JDFMatrix(JDFNumList nl)
constructs a rectangle with all values set via a JDFNumberList
|
JDFMatrix(String s)
constructs a matrix with all values set via a String
|
JDFMatrix(Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
void |
concat(JDFMatrix m)
concatinates this with m
|
static JDFMatrix |
createMatrix(String s)
factory for JDFXYPair that silently returns null in case of illegal strings
|
boolean |
equals(Object other)
equals - returns true if both JDFMatrices are equal, otherwise false
|
double |
getA()
getA - returns the first coordinate
|
AffineTransform |
getAffineTransform()
getAffineTransform -
|
double |
getB()
getB - returns the second coordinate
|
double |
getC()
getC - returns the third coordinate
|
double |
getD()
getD - returns the fourth coordinate
|
double |
getTx()
getTx - returns the tx coordinate
|
double |
getTy()
getTy - returns the ty coordinate
|
int |
hashCode()
hashCode complements equals() to fulfill the equals/hashCode contract
|
boolean |
isValid()
isValid - true if the size of the vector is 6 and all instances are Double types
|
void |
rotate(double degrees)
rotate this by degrees degrees CouterClockwise
|
void |
setA(double p_a)
setA - sets the first coordinate
|
void |
setAffineTransform(AffineTransform affineTrans)
setAffineTransform -
|
void |
setB(double p_b)
setB - sets the second coordinate
|
void |
setC(double p_c)
setC - sets the third coordinate
|
void |
setD(double p_d)
setD - sets the fourth coordinate
|
void |
setTx(double p_tx)
setTx - sets the tx coordinate
|
void |
setTy(double p_ty)
setTy - sets the ty coordinate
|
void |
shift(double tx,
double ty)
shifts Tx and Ty by the amount specified
|
void |
shift(JDFXYPair point)
shift this matrix by an xypair
|
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, getDoubleList, getIntArray, getString, getString, isValidString, matches, removeElementAt, replaceElementAt, scale, scaleFromCM, scaleFromMM, scaleToCM, scaleToMM, set, setString, subtract, toString, unifyadd, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSizepublic static final JDFMatrix unitMatrix
public JDFMatrix()
@Deprecated public JDFMatrix(Vector v) throws DataFormatException
Vector - v - the given VectorDataFormatException - - if the Vector has not a valid formatpublic JDFMatrix(double degrees,
double x,
double y)
degrees - - the rotation in degreesx - the X shifty - the Y shiftDataFormatException - - if the Vector has not a valid formatpublic JDFMatrix(JDFElement.EnumOrientation orientation, double w, double h)
orientation - - the named orientationw - the width of the unrotated object to transformh - the height of the unrotated object to transformDataFormatException - - if the Vector has not a valid formatpublic JDFMatrix(String s) throws DataFormatException
s - the given StringDataFormatException - - if the String has not a valid formatpublic JDFMatrix(JDFNumList nl) throws DataFormatException
nl - the given number listDataFormatException - - if the JDFNumberList has not a valid formatpublic JDFMatrix(JDFMatrix nl)
nl - the given number listpublic JDFMatrix(double a,
double b,
double c,
double d,
double tx,
double ty)
a - position 01 of the transformation matrixb - position 02 of the transformation matrixc - position 10 of the transformation matrixd - position 11 of the transformation matrixtx - position 03 of the transformation matrixty - position 13 of the transformation matrixpublic static JDFMatrix createMatrix(String s)
s - the string to parsepublic boolean isValid()
throws DataFormatException
isValid in class JDFNumListDataFormatException - - if the Vector has not a valid formatpublic double getA()
public void setA(double p_a)
p_a - the first coordinatepublic double getB()
public void setB(double p_b)
p_b - the first coordinatepublic double getC()
public void setC(double p_c)
p_c - the third coordinatepublic double getD()
public void setD(double p_d)
p_d - the fourth coordinatepublic double getTx()
public void setTx(double p_tx)
p_tx - the tx coordinatepublic double getTy()
public void setTy(double p_ty)
p_ty - the ty coordinatepublic boolean equals(Object other)
equals in interface Collection<Object>equals in interface List<Object>equals in class JDFNumListpublic int hashCode()
hashCode in interface Collection<Object>hashCode in interface List<Object>hashCode in class JDFNumListpublic AffineTransform getAffineTransform()
public void setAffineTransform(AffineTransform affineTrans)
affineTrans - matrix to be storedpublic void shift(double tx,
double ty)
tx - shift in x directionty - shift in y directionpublic void rotate(double degrees)
degrees - the degrees to rotate by in counterclockwise directionpublic void concat(JDFMatrix m)
m - the matrix to concatinatepublic void shift(JDFXYPair point)
point - the point to shift byCopyright © 2013. All Rights Reserved.