aspose.pdf
Class Rectangle

java.lang.Object
  extended by aspose.pdf.Shape
      extended by aspose.pdf.Rectangle

public class Rectangle
extends Shape

Represents a rectangle Shape in a Pdf document.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Graph graph1 = new Graph(100,400); sec1.getParagraphs().add(graph1); Rectangle rect1 = new Rectangle(50,10,100,50); graph1.getShapes().add(rect1); pdf1.save(....); [xml] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Graph Width="400" Height="100"> <Rectangle Position="50 10 100 50" /> </Graph> </Section> </Pdf>


Constructor Summary
Rectangle()
          Initializes a new instance of the Rectangle class.
Rectangle(float left, float bottom, float width, float height)
          Initializes a new instance of the Rectangle class.
Rectangle(Graph graph)
          Initializes a new instance of the Rectangle class.
Rectangle(Graph graph, float left, float bottom, float width, float height)
          Initializes a new instance of the Rectangle class.
 
Method Summary
 java.lang.Object clone()
          Clones a new Rectangle object.
 float getBottom()
          Gets a float value that indicates the bottom position of the rectangle.
 float getHeight()
          Gets a float value that indicates the height of the rectangle.
 float getLeft()
          Gets a float value that indicates the left position of the rectangle.
 float getRadiusForRoundCorner()
          Gets a float value that indicates the radius for the round corner.
 float getWidth()
          Gets a float value that indicates the width of the rectangle.
 void setBottom(float rectBottom)
          Sets a float value that indicates the bottom position of the rectangle.
 void setHeight(float rectHeight)
          Sets a float value that indicates the height of the rectangle.
 void setLeft(float rectLeft)
          Sets a float value that indicates the left position of the rectangle.
 void setRadiusForRoundCorner(float radius)
          Sets a float value that indicates the radius for the round corner.
 void setWidth(float rectWidth)
          Sets a float value that indicates the width of the rectangle.
 
Methods inherited from class aspose.pdf.Shape
getGraphInfo, getID, setGraphInfo, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rectangle

public Rectangle()
Initializes a new instance of the Rectangle class.


Rectangle

public Rectangle(float left,
                 float bottom,
                 float width,
                 float height)
Initializes a new instance of the Rectangle class.

Parameters:
left - The left position of the rectangle.
bottom - The bottom position of the rectangle.
width - The height of the rectangle.
height - The width of the rectangle.

Rectangle

public Rectangle(Graph graph)
Initializes a new instance of the Rectangle class.

Parameters:
graph - The specified Rectangle object.

Remarks: This constructor can inherit common property values from the specified Graph object.


Rectangle

public Rectangle(Graph graph,
                 float left,
                 float bottom,
                 float width,
                 float height)
Initializes a new instance of the Rectangle class.

Parameters:
graph - The specified Graph object.
left - The left position of the rectangle.
bottom - The bottom position of the rectangle.
width - The height of the rectangle.
height - The width of the rectangle.

Remarks: This constructor can inherit common property values from the specified Graph object.

Method Detail

getLeft

public float getLeft()
Gets a float value that indicates the left position of the rectangle.


setLeft

public void setLeft(float rectLeft)
Sets a float value that indicates the left position of the rectangle.

Parameters:
rectLeft -

getBottom

public float getBottom()
Gets a float value that indicates the bottom position of the rectangle.


setBottom

public void setBottom(float rectBottom)
Sets a float value that indicates the bottom position of the rectangle.

Parameters:
rectBottom -

getWidth

public float getWidth()
Gets a float value that indicates the width of the rectangle.


setWidth

public void setWidth(float rectWidth)
Sets a float value that indicates the width of the rectangle.

Parameters:
rectWidth -

getHeight

public float getHeight()
Gets a float value that indicates the height of the rectangle.


setHeight

public void setHeight(float rectHeight)
Sets a float value that indicates the height of the rectangle.

Parameters:
rectHeight -

getRadiusForRoundCorner

public float getRadiusForRoundCorner()
Gets a float value that indicates the radius for the round corner.


setRadiusForRoundCorner

public void setRadiusForRoundCorner(float radius)
Sets a float value that indicates the radius for the round corner.

Parameters:
radius -

clone

public java.lang.Object clone()
Clones a new Rectangle object.

Overrides:
clone in class java.lang.Object