Class ASQuad
java.lang.Object
com.adobe.internal.pdftoolkit.core.types.ASObject
com.adobe.internal.pdftoolkit.core.types.ASQuad
ASQuad represents a convex quadrilateral. An ASQuad is typically used to
represent a bounding box (a rectangle) which has undergone an affine
transformation (e.g., scaled, rotated, skewed, etc.). In this sense,
the coordinate tags (p1, p2, p3, p4) do not necessarily correspond
to the actual relative location of the coordinates. Instead, they
correspond to the logical corners of the object encased in the quad.
For instance, a word has a natural bounding box (rectangle) with a well-
defined upper-left, upper-right, lower-left, and lower-right corners.
When rotated 45 degrees, the coordinates of the quad rotate with the
word and the tags are considered affixed to the bounding box of the
word.
-
Constructor Summary
ConstructorsConstructorDescriptionASQuad(ASCoordinate p1, ASCoordinate p2, ASCoordinate p3, ASCoordinate p4) Copy constructorASQuad(ASRectangle rect) Construct a quad from a rectangle -
Method Summary
-
Constructor Details
-
ASQuad
- Parameters:
p1- lower-left corner relative to the object enclosed by the quadp2- lower-right corner relative to the object enclosed by the quadp3- upper-right corner relative to the object enclosed by the quadp4- upper-left corner relative to the object enclosed by the quad
-
ASQuad
Construct a quad from a rectangle- Parameters:
rect-
-
ASQuad
Copy constructor- Parameters:
quad-
-
-
Method Details
-
p1
-
p2
-
p3
-
p4
-
transform
-
toString
-
write
Writes the ASHexString in to the given OutputStream in the format expected by the PDF Spec.- Specified by:
writein classASObject- Parameters:
outputByteStream- OutputByteStream to write to.- Throws:
PDFIOException- See Also:
-
getMinX
public double getMinX() -
getMaxX
public double getMaxX() -
getMinY
public double getMinY() -
getMaxY
public double getMaxY()
-