Class 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 doubles), 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​(double tx, double ty)
      Custom constructor, accepting several values for initializing.
      Matrix​(double a, double b, double c, double d, double tx, double 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
      double getA()
      Getter for a attribute.
      double getB()
      Getter for b attribute.
      double getC()
      Getter for c attribute.
      double getD()
      Getter for d attribute.
      double getTx()
      Getter for tx attribute.
      double getTy()
      Getter for ty attribute.
      java.lang.String marshal​(Matrix matrix)  
      java.lang.String toString()  
      Matrix unmarshal​(java.lang.String v)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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​(double a,
                      double b,
                      double c,
                      double d,
                      double tx,
                      double ty)
        Custom constructor, accepting several values for initializing.
      • Matrix

        public Matrix​(double tx,
                      double 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 double getA()
        Getter for a attribute.
        Returns:
        the a
      • getB

        public double getB()
        Getter for b attribute.
        Returns:
        the b
      • getC

        public double getC()
        Getter for c attribute.
        Returns:
        the c
      • getD

        public double getD()
        Getter for d attribute.
        Returns:
        the d
      • getTx

        public double getTx()
        Getter for tx attribute.
        Returns:
        the tx
      • getTy

        public double getTy()
        Getter for ty attribute.
        Returns:
        the ty
      • marshal

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

        public java.lang.String toString()
        Specified by:
        toString in class AbstractXJdfType<java.lang.String,​Matrix>
        See Also:
        Object.toString()