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 Summary
Constructors Constructor Description ASCoordinate(double x, double y)ASCoordinate(ASCoordinate coordinate)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleangleTo(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.StringtoString()ASCoordinatetransform(ASMatrix ctm)Transform the coordinate by a coordinate transformation matrix.ASCoordinatetranslate(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 Detail
-
ASCoordinate
public ASCoordinate(double x, double y)- Parameters:
x-y-
-
ASCoordinate
public ASCoordinate(ASCoordinate coordinate)
Copy constructor.- Parameters:
coordinate-
-
-
Method Detail
-
translate
public ASCoordinate translate(double dx, double dy)
Translate the coordinate by dx, dy- Parameters:
dx- The x offsetdy- 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-
-
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:
writein classASObject- Parameters:
outputByteStream- OutputStream to write to.- Throws:
PDFIOException
-
x
public double x()
-
y
public double y()
-
-