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 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
      float getA()
      Getter for a attribute.
      float getB()
      Getter for b attribute.
      float getC()
      Getter for c attribute.
      float getD()
      Getter for d attribute.
      float getTx()
      Getter for tx attribute.
      float 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​(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:
        marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​Matrix>
        See Also:
        javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
      • unmarshal

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