Class ASCoordinate

java.lang.Object
com.adobe.internal.pdftoolkit.core.types.ASObject
com.adobe.internal.pdftoolkit.core.types.ASCoordinate

public class ASCoordinate extends ASObject
ASCoordinate represents a PDF coordintate point (x, y).
  • Constructor Details

    • ASCoordinate

      public ASCoordinate(double x, double y)
      Parameters:
      x -
      y -
    • ASCoordinate

      public ASCoordinate(ASCoordinate coordinate)
      Copy constructor.
      Parameters:
      coordinate -
  • Method Details

    • translate

      public ASCoordinate translate(double dx, double dy)
      Translate the coordinate by dx, dy
      Parameters:
      dx - The x offset
      dy - The y offset
      Returns:
      A new coordinate offset by dx, dy
    • transform

      public ASCoordinate transform(ASMatrix ctm)
      Transform the coordinate by a coordinate transformation matrix.
      Parameters:
      ctm - - Coordinate Transformation Matrix
      Returns:
      ASCoordinate
    • distanceTo

      public double distanceTo(ASCoordinate coord)
      Find the shortest Euclidean distance between this coordinate point and the specified coordinate point.
      Parameters:
      coord -
    • distanceToSquare

      public double distanceToSquare(ASCoordinate coord)
      Find the square of shortest Euclidean distance between this coordinate point and the specified coordinate point.
      Parameters:
      coord -
      Returns:
      double
    • angleTo

      public double angleTo(ASCoordinate coord)
      Find the angle as measured along a line from this coordinate to the specified coordinate.
      Parameters:
      coord -
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • write

      public void write(OutputByteStream outputByteStream) throws PDFIOException
      Writes the ASCoordinate in to the given OutputStream in the format expected by the PDF Spec.
      Specified by:
      write in class ASObject
      Parameters:
      outputByteStream - OutputStream to write to.
      Throws:
      PDFIOException
    • x

      public double x()
    • y

      public double y()