Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.common » [javadoc | source]
org.apache.pdfbox.pdmodel.common
public class: PDRectangle [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.common.PDRectangle

All Implemented Interfaces:
    COSObjectable

This represents a rectangle in a PDF document.
Constructor:
 public PDRectangle() 
 public PDRectangle(BoundingBox box) 
    Constructor.
    Parameters:
    box - The non PD bouding box.
 public PDRectangle(COSArray array) 
    Constructor.
    Parameters:
    array - An array of numbers as specified in the PDF Reference for a rectangle type.
 public PDRectangle(float width,
    float height) 
Method from org.apache.pdfbox.pdmodel.common.PDRectangle Summary:
contains,   createDimension,   createRetranslatedRectangle,   getCOSArray,   getCOSObject,   getHeight,   getLowerLeftX,   getLowerLeftY,   getUpperRightX,   getUpperRightY,   getWidth,   move,   setLowerLeftX,   setLowerLeftY,   setUpperRightX,   setUpperRightY,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.common.PDRectangle Detail:
 public boolean contains(float x,
    float y) 
    Method to determine if the x/y point is inside this rectangle.
 public Dimension createDimension() 
    A convenience method to create a dimension object for AWT operations.
 public PDRectangle createRetranslatedRectangle() 
    This will create a translated rectangle based off of this rectangle, such that the new rectangle retains the same dimensions(height/width), but the lower left x,y values are zero.
    100, 100, 400, 400 (llx, lly, urx, ury )
    will be translated to 0,0,300,300
 public COSArray getCOSArray() 
    This will get the underlying array for this rectangle.
 public COSBase getCOSObject() 
    Convert this standard java object to a COS object.
 public float getHeight() 
    This will get the height of this rectangle as calculated by upperRightY - lowerLeftY.
 public float getLowerLeftX() 
    This will get the lower left x coordinate.
 public float getLowerLeftY() 
    This will get the lower left y coordinate.
 public float getUpperRightX() 
    This will get the upper right x coordinate.
 public float getUpperRightY() 
    This will get the upper right y coordinate.
 public float getWidth() 
    This will get the width of this rectangle as calculated by upperRightX - lowerLeftX.
 public  void move(float horizontalAmount,
    float verticalAmount) 
    This will move the rectangle the given relative amount.
 public  void setLowerLeftX(float value) 
    This will set the lower left x coordinate.
 public  void setLowerLeftY(float value) 
    This will set the lower left y coordinate.
 public  void setUpperRightX(float value) 
    This will set the upper right x coordinate.
 public  void setUpperRightY(float value) 
    This will set the upper right y coordinate.
 public String toString() 
    This will return a string representation of this rectangle.