Class Matrix

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
org.cip4.lib.xjdf.type.AbstractXJdfType<String,Matrix>
org.cip4.lib.xjdf.type.Matrix

public class Matrix extends AbstractXJdfType<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
    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(String expression)
    Custom constructor, accepting a String expression for initializing.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Getter for a attribute.
    float
    Getter for b attribute.
    float
    Getter for c attribute.
    float
    Getter for d attribute.
    float
    Getter for tx attribute.
    float
    Getter for ty attribute.
    marshal(Matrix matrix)
     
     
     

    Methods inherited from class org.cip4.lib.xjdf.type.AbstractXJdfType

    equals, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • 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(String expression)
      Custom constructor, accepting a String expression for initializing.
      Parameters:
      expression - Matrix as String expression.
  • Method Details

    • 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 String marshal(Matrix matrix)
      Specified by:
      marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,Matrix>
      See Also:
      • XmlAdapter.marshal(java.lang.Object)
    • unmarshal

      public Matrix unmarshal(String v)
      Specified by:
      unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,Matrix>
      See Also:
      • XmlAdapter.unmarshal(java.lang.Object)
    • toString

      public String toString()
      Specified by:
      toString in class AbstractXJdfType<String,Matrix>
      See Also: