Package org.cip4.lib.xjdf.type
Class Matrix
- java.lang.Object
-
- jakarta.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
-
- org.cip4.lib.xjdf.type.AbstractXJdfType<java.lang.String,Matrix>
-
- org.cip4.lib.xjdf.type.Matrix
-
public class Matrix extends AbstractXJdfType<java.lang.String,Matrix>
Coordinate transformation matrices are widely used throughout the whole printing Process, especially in Layout Resources. They represent two dimensional transformations as defined by [PS] and [PDF1.6]. For more information, refer to the respective reference manuals, and look for "Coordinate Systems and Transformations." The "identity matrix", which is "1 0 0 1 0 0", is often used as a default throughout this specification. When another matrix is factored against a matrix with the identity matrix value, the result is that the original matrix remains unchanged. Coordinate transformation matrices are primitive data types and are encoded as a list of six numbers (as floats), separated by whitespace: "a b c d Tx Ty". The variables Tx and Ty describe distances and are defined in points.
-
-
Constructor Summary
Constructors Constructor Description Matrix()Default constructor.Matrix(float tx, float ty)Custom constructor, accepting several values for initializing.Matrix(float a, float b, float c, float d, float tx, float ty)Custom constructor, accepting several values for initializing.Matrix(java.lang.String expression)Custom constructor, accepting a String expression for initializing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetA()Getter for a attribute.floatgetB()Getter for b attribute.floatgetC()Getter for c attribute.floatgetD()Getter for d attribute.floatgetTx()Getter for tx attribute.floatgetTy()Getter for ty attribute.java.lang.Stringmarshal(Matrix matrix)java.lang.StringtoString()Matrixunmarshal(java.lang.String v)-
Methods inherited from class org.cip4.lib.xjdf.type.AbstractXJdfType
equals, hashCode
-
-
-
-
Constructor Detail
-
Matrix
public Matrix()
Default constructor. Creates the "identity matrix", which is "1 0 0 1 0 0" and often used as a default throughout in XJDF Specification.
-
Matrix
public Matrix(float a, float b, float c, float d, float tx, float ty)Custom constructor, accepting several values for initializing.
-
Matrix
public Matrix(float tx, float ty)Custom constructor, accepting several values for initializing.
-
Matrix
public Matrix(java.lang.String expression)
Custom constructor, accepting a String expression for initializing.- Parameters:
expression- Matrix as String expression.
-
-
Method Detail
-
getA
public float getA()
Getter for a attribute.- Returns:
- the a
-
getB
public float getB()
Getter for b attribute.- Returns:
- the b
-
getC
public float getC()
Getter for c attribute.- Returns:
- the c
-
getD
public float getD()
Getter for d attribute.- Returns:
- the d
-
getTx
public float getTx()
Getter for tx attribute.- Returns:
- the tx
-
getTy
public float getTy()
Getter for ty attribute.- Returns:
- the ty
-
marshal
public java.lang.String marshal(Matrix matrix)
- Specified by:
marshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Matrix>- See Also:
XmlAdapter.marshal(java.lang.Object)
-
unmarshal
public Matrix unmarshal(java.lang.String v)
- Specified by:
unmarshalin classjakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,Matrix>- See Also:
XmlAdapter.unmarshal(java.lang.Object)
-
toString
public java.lang.String toString()
- Specified by:
toStringin classAbstractXJdfType<java.lang.String,Matrix>- See Also:
Object.toString()
-
-