PDF Clown
0.1.2

org.pdfclown.objects
Class Rectangle

java.lang.Object
  extended by org.pdfclown.objects.PdfObjectWrapper<PdfArray>
      extended by org.pdfclown.objects.Rectangle
All Implemented Interfaces:
Cloneable, IPdfObjectWrapper

public final class Rectangle
extends PdfObjectWrapper<PdfArray>

PDF rectangle object [PDF:1.6:3.8.4].

Rectangles are described by two diagonally-opposite corners. Corner pairs which don't respect the canonical form (lower-left and upper-right) are automatically normalized to provide a consistent representation.

Coordinates are expressed within the PDF coordinate space (lower-left origin and positively-oriented axes).

Since:
0.0.8
Version:
0.1.2, 12/28/12
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
Rectangle(double left, double top, double width, double height)
           
Rectangle(Point2D lowerLeft, Point2D upperRight)
           
Rectangle(RectangularShape rectangle)
           
 
Method Summary
 Rectangle clone(Document context)
          Gets a clone of the object, registered inside the given document context.
 double getBottom()
           
 double getHeight()
           
 double getLeft()
           
 double getRight()
           
 double getTop()
           
 double getWidth()
           
 double getX()
           
 double getY()
           
 void setBottom(double value)
           
 void setHeight(double value)
           
 void setLeft(double value)
           
 void setRight(double value)
           
 void setTop(double value)
           
 void setWidth(double value)
           
 void setX(double value)
           
 void setY(double value)
           
 Rectangle2D toRectangle2D()
           
static Rectangle wrap(PdfDirectObject baseObject)
           
 
Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
checkCompatibility, delete, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rectangle

public Rectangle(RectangularShape rectangle)

Rectangle

public Rectangle(Point2D lowerLeft,
                 Point2D upperRight)

Rectangle

public Rectangle(double left,
                 double top,
                 double width,
                 double height)
Method Detail

wrap

public static Rectangle wrap(PdfDirectObject baseObject)

clone

public Rectangle clone(Document context)
Description copied from class: PdfObjectWrapper
Gets a clone of the object, registered inside the given document context.

Overrides:
clone in class PdfObjectWrapper<PdfArray>
Parameters:
context - Which document the clone has to be registered in.

getBottom

public double getBottom()

getHeight

public double getHeight()

getLeft

public double getLeft()

getRight

public double getRight()

getTop

public double getTop()

getWidth

public double getWidth()

getX

public double getX()

getY

public double getY()

setBottom

public void setBottom(double value)

setHeight

public void setHeight(double value)

setLeft

public void setLeft(double value)

setRight

public void setRight(double value)

setTop

public void setTop(double value)

setWidth

public void setWidth(double value)

setX

public void setX(double value)

setY

public void setY(double value)

toRectangle2D

public Rectangle2D toRectangle2D()

PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.