Documentation of 'org.jplot2d.transform.PaperTransform' Java class
PaperTransform
org.jplot2d.transform

Class PaperTransform

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    RotatablePaperTransform


    public class PaperTransform
    extends java.lang.Object
    implements java.lang.Cloneable
    Defines the conversion between paper units and device units. Every component has its own paper coordinate system, and maintains a PaperTransform object.

    The transform is defined by 3 parameters. The xoff is the paper distance between component left bound to device left bound. The yoff is the paper distance between component bottom bound to device top bound. The scale is the factor of device to paper.

    • Constructor Summary

      Constructors 
      Constructor and Description
      PaperTransform(double xoff, double yoff, double scale) 
      PaperTransform(java.awt.geom.Point2D p, double scale) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      PaperTransform clone() 
      boolean equals(java.lang.Object obj) 
      java.awt.geom.Point2D getDtoP(java.awt.geom.Point2D d) 
      java.awt.geom.Point2D getOffset() 
      java.awt.geom.Point2D getPtoD(java.awt.geom.Point2D p) 
      java.awt.Shape getPtoD(java.awt.geom.Rectangle2D p)
      Returns a shape in device coordinate system.
      double getScale() 
      java.awt.geom.AffineTransform getTransform()
      Returns an AffineTransform to transform shapes from PCS to DCS.
      double getXDtoP(double xd)
      Transform device units to paper for the x direction.
      double getXPtoD(double xp) 
      double getYDtoP(double yd)
      Transform device units to paper for the y direction.
      double getYPtoD(double yp) 
      int hashCode() 
      PaperTransform rotate(double theta) 
      java.lang.String toString() 
      PaperTransform translate(double tx, double ty)
      Concatenates this transform with a translation transformation.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PaperTransform

        public PaperTransform(double xoff,
                              double yoff,
                              double scale)
      • PaperTransform

        public PaperTransform(java.awt.geom.Point2D p,
                              double scale)
    • Method Detail

      • clone

        public PaperTransform clone()
        Overrides:
        clone in class java.lang.Object
      • getOffset

        public java.awt.geom.Point2D getOffset()
      • getScale

        public double getScale()
      • translate

        public PaperTransform translate(double tx,
                                        double ty)
        Concatenates this transform with a translation transformation.
        Parameters:
        tx - the distance by which coordinates are translated in the X axis direction
        ty - the distance by which coordinates are translated in the Y axis direction
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getXPtoD

        public double getXPtoD(double xp)
      • getYPtoD

        public double getYPtoD(double yp)
      • getXDtoP

        public double getXDtoP(double xd)
        Transform device units to paper for the x direction.
        Parameters:
        xd - device x coordinate
        Returns:
        paper x coordinate
      • getYDtoP

        public double getYDtoP(double yd)
        Transform device units to paper for the y direction.
        Parameters:
        yd - device y coordinate
        Returns:
        paper y coordinate
      • getPtoD

        public java.awt.geom.Point2D getPtoD(java.awt.geom.Point2D p)
      • getDtoP

        public java.awt.geom.Point2D getDtoP(java.awt.geom.Point2D d)
      • getPtoD

        public java.awt.Shape getPtoD(java.awt.geom.Rectangle2D p)
        Returns a shape in device coordinate system.
        Parameters:
        p -
        Returns:
      • getTransform

        public java.awt.geom.AffineTransform getTransform()
        Returns an AffineTransform to transform shapes from PCS to DCS.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.