Class Rectangle
- Namespace
- iTextSharp.text
- Assembly
- iTextSharp.LGPLv2.Core.dll
A Rectangle is the representation of a geometric figure.
public class Rectangle : Element, IElement
- Inheritance
-
Rectangle
- Implements
- Derived
- Inherited Members
Constructors
Rectangle(float, float)
Constructs a Rectangle-object starting from the origin (0, 0).
public Rectangle(float urx, float ury)
Parameters
Rectangle(float, float, float, float)
constructors
public Rectangle(float llx, float lly, float urx, float ury)
Parameters
Rectangle(Rectangle)
Constructs a Rectangle-object.
public Rectangle(Rectangle rect)
Parameters
rect
Rectangleanother Rectangle
Fields
BOTTOM_BORDER
static membervariables (concerning the presence of borders)
public const int BOTTOM_BORDER = 2
Field Value
BOX
This represents a type of border.
public const int BOX = 15
Field Value
LEFT_BORDER
This represents one side of the border of the Rectangle.
public const int LEFT_BORDER = 4
Field Value
Llx
the lower left x-coordinate.
protected float Llx
Field Value
Lly
the lower left y-coordinate.
protected float Lly
Field Value
NO_BORDER
This represents a rectangle without borders.
public const int NO_BORDER = 0
Field Value
RIGHT_BORDER
This represents one side of the border of the Rectangle.
public const int RIGHT_BORDER = 8
Field Value
TOP_BORDER
This represents one side of the border of the Rectangle.
public const int TOP_BORDER = 1
Field Value
UNDEFINED
This is the value that will be used as undefined.
public const int UNDEFINED = -1
Field Value
Urx
the upper right x-coordinate.
protected float Urx
Field Value
Ury
the upper right y-coordinate.
protected float Ury
Field Value
backgroundColor
membervariables
protected BaseColor backgroundColor
Field Value
border
This represents the status of the 4 sides of the rectangle.
protected int border
Field Value
borderColor
This is the color of the border of this rectangle.
protected BaseColor borderColor
Field Value
borderColorBottom
The color of the bottom border of this rectangle.
protected BaseColor borderColorBottom
Field Value
borderColorLeft
The color of the left border of this rectangle.
protected BaseColor borderColorLeft
Field Value
borderColorRight
The color of the right border of this rectangle.
protected BaseColor borderColorRight
Field Value
borderColorTop
The color of the top border of this rectangle.
protected BaseColor borderColorTop
Field Value
borderWidth
This is the width of the border around this rectangle.
protected float borderWidth
Field Value
borderWidthBottom
The width of the bottom border of this rectangle.
protected float borderWidthBottom
Field Value
borderWidthLeft
The width of the left border of this rectangle.
protected float borderWidthLeft
Field Value
borderWidthRight
The width of the right border of this rectangle.
protected float borderWidthRight
Field Value
borderWidthTop
The width of the top border of this rectangle.
protected float borderWidthTop
Field Value
rotation
This is the rotation value of this rectangle.
protected int rotation
Field Value
useVariableBorders
Whether variable width borders are used.
protected bool useVariableBorders
Field Value
Properties
BackgroundColor
Gets the backgroundcolor.
public virtual BaseColor BackgroundColor { get; set; }
Property Value
Border
Get/set the border
public virtual int Border { get; set; }
Property Value
- int
a int
BorderColor
Gets the color of the border.
public virtual BaseColor BorderColor { get; set; }
Property Value
- BaseColor
a value
BorderColorBottom
public virtual BaseColor BorderColorBottom { get; set; }
Property Value
BorderColorLeft
public virtual BaseColor BorderColorLeft { get; set; }
Property Value
BorderColorRight
public virtual BaseColor BorderColorRight { get; set; }
Property Value
BorderColorTop
public virtual BaseColor BorderColorTop { get; set; }
Property Value
BorderWidth
Get/set the borderwidth.
public virtual float BorderWidth { get; set; }
Property Value
- float
a float
BorderWidthBottom
public virtual float BorderWidthBottom { get; set; }
Property Value
BorderWidthLeft
public virtual float BorderWidthLeft { get; set; }
Property Value
BorderWidthRight
public virtual float BorderWidthRight { get; set; }
Property Value
BorderWidthTop
public virtual float BorderWidthTop { get; set; }
Property Value
Bottom
Get/set the lower left y-coordinate.
public virtual float Bottom { get; set; }
Property Value
- float
a float
Chunks
Gets all the chunks in this element.
public virtual IList<Chunk> Chunks { get; }
Property Value
GrayFill
Get/set the grayscale of the rectangle.
public virtual float GrayFill { get; set; }
Property Value
- float
a float
Height
Returns the height of the rectangle.
public float Height { get; }
Property Value
- float
a height
Left
Get/set the lower left x-coordinate.
public virtual float Left { get; set; }
Property Value
- float
a float
Right
methods to get the membervariables
public virtual float Right { get; set; }
Property Value
- float
a float
Rotation
Returns the rotation
public int Rotation { get; }
Property Value
- int
a int
Top
Get/set the upper right y-coordinate.
public virtual float Top { get; set; }
Property Value
- float
a float
Type
Gets the type of the text element.
public virtual int Type { get; }
Property Value
- int
a type
UseVariableBorders
Sets a parameter indicating if the rectangle has variable borders indication if the rectangle has variable borders
public virtual bool UseVariableBorders { get; set; }
Property Value
Width
Returns the width of the rectangle.
public virtual float Width { get; set; }
Property Value
- float
a width
Methods
CloneNonPositionParameters(Rectangle)
public virtual void CloneNonPositionParameters(Rectangle rect)
Parameters
rect
Rectangle
DisableBorderSide(int)
Disables the border on the specified side. the side to disable. One of LEFT, RIGHT, TOP, BOTTOM
public virtual void DisableBorderSide(int side)
Parameters
side
int
EnableBorderSide(int)
methods to set the membervariables
public virtual void EnableBorderSide(int side)
Parameters
side
int
GetBottom(float)
Returns the lower left y-coordinate, considering a given margin.
public virtual float GetBottom(float margin)
Parameters
margin
floata margin
Returns
- float
the lower left y-coordinate
GetLeft(float)
Returns the lower left x-coordinate, considering a given margin.
public virtual float GetLeft(float margin)
Parameters
margin
floata margin
Returns
- float
the lower left x-coordinate
GetRectangle(float, float)
Gets a Rectangle that is altered to fit on the page.
public Rectangle GetRectangle(float top, float bottom)
Parameters
Returns
- Rectangle
a Rectangle
GetRight(float)
Returns the upper right x-coordinate, considering a given margin.
public virtual float GetRight(float margin)
Parameters
margin
floata margin
Returns
- float
the upper right x-coordinate
GetTop(float)
Returns the upper right y-coordinate, considering a given margin.
public virtual float GetTop(float margin)
Parameters
margin
floata margin
Returns
- float
the upper right y-coordinate
HasBorder(int)
Indicates if the table has a some type of border.
public bool HasBorder(int type)
Parameters
type
intthe type of border
Returns
- bool
a bool
HasBorders()
Indicates if the table has borders.
public bool HasBorders()
Returns
- bool
a bool
IsContent()
@see com.lowagie.text.Element#isContent() @since iText 2.0.8
public bool IsContent()
Returns
IsNestable()
@see com.lowagie.text.Element#isNestable() @since iText 2.0.8
public virtual bool IsNestable()
Returns
Normalize()
Switches lowerleft with upperright
public virtual void Normalize()
Process(IElementListener)
Processes the element by adding it (or the different parts) to an IElementListener.
public virtual bool Process(IElementListener listener)
Parameters
listener
IElementListeneran IElementListener
Returns
- bool
true if the element was processed successfully
Rotate()
implementation of the Element interface
public Rectangle Rotate()
Returns
- Rectangle
a Rectangle
SoftCloneNonPositionParameters(Rectangle)
public virtual void SoftCloneNonPositionParameters(Rectangle rect)
Parameters
rect
Rectangle
ToString()
Updates the border flag for a side based on the specified width. A width of 0 will disable the border on that side. Any other width enables it. width of border border side constant
public override string ToString()