Skip to main content
Skip table of contents

Rectangle

Rectangle Public class

Description

A Rectangle is the representation of a geometric figure.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph iTextSharp.text
  iTextSharp.text.Rectangle[[Rectangle]]
  iTextSharp.text.IElement[[IElement]]
  class iTextSharp.text.IElement interfaceStyle;
  iTextSharp.text.Element[[Element]]
  end
iTextSharp.text.IElement --> iTextSharp.text.Rectangle
iTextSharp.text.Element --> iTextSharp.text.Rectangle

Members

Properties

Public properties
TypeNameMethods
BaseColorBackgroundColor
Get/set the backgroundcolor.
get, set
intBorder
Get/set the border
get, set
BaseColorBorderColor
Get/set the color of the border.
get, set
BaseColorBorderColorBottomget, set
BaseColorBorderColorLeftget, set
BaseColorBorderColorRightget, set
BaseColorBorderColorTopget, set
floatBorderWidth
Get/set the borderwidth.
get, set
floatBorderWidthBottomget, set
floatBorderWidthLeftget, set
floatBorderWidthRightget, set
floatBorderWidthTopget, set
floatBottom
Get/set the lower left y-coordinate.
get, set
IList<Chunk>Chunks
Gets all the chunks in this element.
get
floatGrayFill
Get/set the grayscale of the rectangle.
get, set
floatHeight
Returns the height of the rectangle.
get
floatLeft
Get/set the lower left x-coordinate.
get, set
floatRight
Get/set the upper right x-coordinate.
get, set
intRotation
Set/gets the rotation
get, set
floatTop
Get/set the upper right y-coordinate.
get, set
intType
Gets the type of the text element.
get
boolUseVariableBordersget, set
floatWidth
Returns the width of the rectangle.
get, set

Methods

Public methods
ReturnsName
voidCloneNonPositionParameters(Rectangle rect)
voidDisableBorderSide(int side)
voidEnableBorderSide(int side)
boolEquals(object obj)
floatGetBottom(float margin)
Returns the lower left y-coordinate, considering a given margin.
floatGetLeft(float margin)
Returns the lower left x-coordinate, considering a given margin.
RectangleGetRectangle(float top, float bottom)
Gets a Rectangle that is altered to fit on the page.
floatGetRight(float margin)
Returns the upper right x-coordinate, considering a given margin.
floatGetTop(float margin)
Returns the upper right y-coordinate, considering a given margin.
boolHasBorder(int type)
Indicates if the table has a some type of border.
boolHasBorders()
Indicates if the table has borders.
boolIsContent()
boolIsNestable()
voidNormalize()
boolProcess(IElementListener listener)
Processes the element by adding it (or the different parts) to an
IElementListener.
RectangleRotate()
Swaps the values of urx and ury and of lly and llx in order to rotate the rectangle.
voidSoftCloneNonPositionParameters(Rectangle rect)
stringToString()

Details

Summary

A Rectangle is the representation of a geometric figure.

Inheritance

Constructors

Rectangle [1/6]
Source code
public Rectangle(float llx, float lly, float urx, float ury)
Arguments
TypeNameDescription
floatllxlower left x
floatllylower left y
floaturxupper right x
floaturyupper right y
Summary

Constructs a Rectangle-object.

Rectangle [2/6]
Source code
public Rectangle(float llx, float lly, float urx, float ury, int rotation)
Arguments
TypeNameDescription
floatllx
floatlly
floaturx
floatury
introtation
Rectangle [3/6]
Source code
public Rectangle(float urx, float ury)
Arguments
TypeNameDescription
floaturxupper right x
floaturyupper right y
Summary

Constructs a Rectangle-object starting from the origin (0, 0).

Rectangle [4/6]
Source code
public Rectangle(float urx, float ury, int rotation)
Arguments
TypeNameDescription
floaturx
floatury
introtation
Rectangle [5/6]
Source code
public Rectangle(Rectangle rect)
Arguments
TypeNameDescription
Rectanglerectanother Rectangle
Summary

Constructs a Rectangle-object.

Rectangle [6/6]
Source code
public Rectangle(RectangleJ rect)
Arguments
TypeNameDescription
RectangleJrect

Methods

CloneNonPositionParameters
Source code
public virtual void CloneNonPositionParameters(Rectangle rect)
Arguments
TypeNameDescription
Rectanglerect
SoftCloneNonPositionParameters
Source code
public virtual void SoftCloneNonPositionParameters(Rectangle rect)
Arguments
TypeNameDescription
Rectanglerect
Process
Source code
public virtual bool Process(IElementListener listener)
Arguments
TypeNameDescription
IElementListenerlisteneran IElementListener
Summary

Processes the element by adding it (or the different parts) to an IElementListener.

Returns

true if the element was processed successfully

IsContent
Source code
public virtual bool IsContent()
IsNestable
Source code
public virtual bool IsNestable()
Normalize
Source code
public virtual void Normalize()
GetRectangle
Source code
public virtual Rectangle GetRectangle(float top, float bottom)
Arguments
TypeNameDescription
floattopthe top position
floatbottomthe bottom position
Summary

Gets a Rectangle that is altered to fit on the page.

Returns

a Rectangle

Rotate
Source code
public virtual Rectangle Rotate()
Summary

Swaps the values of urx and ury and of lly and llx in order to rotate the rectangle.

Returns

a Rectangle

EnableBorderSide
Source code
public virtual void EnableBorderSide(int side)
Arguments
TypeNameDescription
intside
DisableBorderSide
Source code
public virtual void DisableBorderSide(int side)
Arguments
TypeNameDescription
intside
GetLeft
Source code
public virtual float GetLeft(float margin)
Arguments
TypeNameDescription
floatmargina margin
Summary

Returns the lower left x-coordinate, considering a given margin.

Returns

the lower left x-coordinate

GetRight
Source code
public virtual float GetRight(float margin)
Arguments
TypeNameDescription
floatmargina margin
Summary

Returns the upper right x-coordinate, considering a given margin.

Returns

the upper right x-coordinate

GetTop
Source code
public virtual float GetTop(float margin)
Arguments
TypeNameDescription
floatmargina margin
Summary

Returns the upper right y-coordinate, considering a given margin.

Returns

the upper right y-coordinate

GetBottom
Source code
public virtual float GetBottom(float margin)
Arguments
TypeNameDescription
floatmargina margin
Summary

Returns the lower left y-coordinate, considering a given margin.

Returns

the lower left y-coordinate

HasBorders
Source code
public virtual bool HasBorders()
Summary

Indicates if the table has borders.

Returns

a bool

HasBorder
Source code
public virtual bool HasBorder(int type)
Arguments
TypeNameDescription
inttypethe type of border
Summary

Indicates if the table has a some type of border.

Returns

a bool

ToString
Source code
public override string ToString()
Equals
Source code
public override bool Equals(object obj)
Arguments
TypeNameDescription
objectobj

Properties

Type
public virtual int Type { get; }
Summary

Gets the type of the text element.

Value

a type

Chunks
public virtual IList<Chunk> Chunks { get; }
Summary

Gets all the chunks in this element.

Value

an ArrayList

Top
public virtual float Top { get; set; }
Summary

Get/set the upper right y-coordinate.

Value

a float

Border
public virtual int Border { get; set; }
Summary

Get/set the border

Value

a int

GrayFill
public virtual float GrayFill { get; set; }
Summary

Get/set the grayscale of the rectangle.

Value

a float

Left
public virtual float Left { get; set; }
Summary

Get/set the lower left x-coordinate.

Value

a float

Right
public virtual float Right { get; set; }
Summary

Get/set the upper right x-coordinate.

Value

a float

Bottom
public virtual float Bottom { get; set; }
Summary

Get/set the lower left y-coordinate.

Value

a float

BorderColorBottom
public virtual BaseColor BorderColorBottom { get; set; }
BorderColorTop
public virtual BaseColor BorderColorTop { get; set; }
BorderColorLeft
public virtual BaseColor BorderColorLeft { get; set; }
BorderColorRight
public virtual BaseColor BorderColorRight { get; set; }
Width
public virtual float Width { get; set; }
Summary

Returns the width of the rectangle.

Value

a width

Height
public virtual float Height { get; }
Summary

Returns the height of the rectangle.

Value

a height

BorderWidth
public virtual float BorderWidth { get; set; }
Summary

Get/set the borderwidth.

Value

a float

BorderColor
public virtual BaseColor BorderColor { get; set; }
Summary

Get/set the color of the border.

Value

a BaseColor

BackgroundColor
public virtual BaseColor BackgroundColor { get; set; }
Summary

Get/set the backgroundcolor.

Value

a BaseColor

Rotation
public virtual int Rotation { get; set; }
Summary

Set/gets the rotation

Value

a int

BorderWidthLeft
public virtual float BorderWidthLeft { get; set; }
BorderWidthRight
public virtual float BorderWidthRight { get; set; }
BorderWidthTop
public virtual float BorderWidthTop { get; set; }
BorderWidthBottom
public virtual float BorderWidthBottom { get; set; }
UseVariableBorders
public virtual bool UseVariableBorders { get; set; }

Generated with ModularDoc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.