public class ASRectangle extends ASObject
| Constructor and Description |
|---|
ASRectangle(ASCoordinate ll,
ASCoordinate ur) |
ASRectangle(ASRectangle rect)
Copy constructor.
|
ASRectangle(double[] coords) |
ASRectangle(double left,
double bottom,
double right,
double top) |
| Modifier and Type | Method and Description |
|---|---|
double |
bottom() |
boolean |
contains(ASRectangle rect)
Returns true if the supplied PDFRectangle is contained in the current PDFRectangle.
|
double[] |
getValues()
Get the coordinate values of the rectangle's corners
|
boolean |
hasNonZeroDimensions() |
boolean |
hasNonZeroDimensions(double epsilon) |
double |
height() |
double |
left() |
ASCoordinate |
ll() |
ASCoordinate |
lr() |
ASRectangle |
normalized()
Creates a new ASRectangle with normalized coordinates.
|
double |
right() |
double |
top() |
String |
toString() |
ASRectangle |
transform(ASMatrix ctm) |
ASCoordinate |
ul() |
ASCoordinate |
ur() |
double |
width() |
void |
write(OutputByteStream outputByteStream)
Writes the ASRectangle in to the given OutputStream in the format expected by the PDF Spec.
|
public ASRectangle(ASCoordinate ll, ASCoordinate ur)
ll - lower-left corner of the rectangleur - upper-right corner of the rectanglepublic ASRectangle(double left,
double bottom,
double right,
double top)
left - x coordinate of the left side of the rectanglebottom - y coordinate of the bottom side of the rectangleright - x coordinate of the right side of the rectangletop - y coordinate of the top side of the rectanglepublic ASRectangle(double[] coords)
throws PDFInvalidParameterException
coords - an array of the coordinates in the form [left, bottom, right, top]PDFInvalidParameterExceptionpublic ASRectangle(ASRectangle rect)
rect - public void write(OutputByteStream outputByteStream) throws PDFIOException
write in class ASObjectoutputByteStream - OutputByteStream to write to.PDFIOException - exception from OutputStreampublic double[] getValues()
public ASCoordinate ll()
public ASCoordinate lr()
public ASCoordinate ur()
public ASCoordinate ul()
public double left()
public double bottom()
public double right()
public double top()
public double width()
public double height()
public ASRectangle transform(ASMatrix ctm)
public boolean hasNonZeroDimensions()
public boolean hasNonZeroDimensions(double epsilon)
public boolean contains(ASRectangle rect) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException
rect - PDFSecurityExceptionPDFIOExceptionPDFInvalidDocumentExceptionpublic ASRectangle normalized() throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException
PDFInvalidDocumentExceptionPDFIOExceptionPDFSecurityExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved