Class ASCoordinate
java.lang.Object
com.adobe.internal.pdftoolkit.core.types.ASObject
com.adobe.internal.pdftoolkit.core.types.ASCoordinate
ASCoordinate represents a PDF coordintate point (x, y).
-
Constructor Summary
ConstructorsConstructorDescriptionASCoordinate(double x, double y) ASCoordinate(ASCoordinate coordinate) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptiondoubleangleTo(ASCoordinate coord) Find the angle as measured along a line from this coordinate to the specified coordinate.doubledistanceTo(ASCoordinate coord) Find the shortest Euclidean distance between this coordinate point and the specified coordinate point.doubledistanceToSquare(ASCoordinate coord) Find the square of shortest Euclidean distance between this coordinate point and the specified coordinate point.toString()Transform the coordinate by a coordinate transformation matrix.translate(double dx, double dy) Translate the coordinate by dx, dyvoidwrite(OutputByteStream outputByteStream) Writes the ASCoordinate in to the given OutputStream in the format expected by the PDF Spec.doublex()doubley()
-
Constructor Details
-
ASCoordinate
public ASCoordinate(double x, double y) - Parameters:
x-y-
-
ASCoordinate
Copy constructor.- Parameters:
coordinate-
-
-
Method Details
-
translate
Translate the coordinate by dx, dy- Parameters:
dx- The x offsetdy- The y offset- Returns:
- A new coordinate offset by dx, dy
-
transform
Transform the coordinate by a coordinate transformation matrix.- Parameters:
ctm- - Coordinate Transformation Matrix- Returns:
- ASCoordinate
-
distanceTo
Find the shortest Euclidean distance between this coordinate point and the specified coordinate point.- Parameters:
coord-
-
distanceToSquare
Find the square of shortest Euclidean distance between this coordinate point and the specified coordinate point.- Parameters:
coord-- Returns:
- double
-
angleTo
Find the angle as measured along a line from this coordinate to the specified coordinate.- Parameters:
coord-
-
toString
-
write
Writes the ASCoordinate in to the given OutputStream in the format expected by the PDF Spec.- Specified by:
writein classASObject- Parameters:
outputByteStream- OutputStream to write to.- Throws:
PDFIOException
-
x
public double x() -
y
public double y()
-