Represents a rectangular area in two-dimensional space. When first created the object defaults to an empty rectangle "0 0 0 0".

ABCpdf uses the standard Adobe PDF coordinate space. The origin of this space is at the bottom left of the document. Distances are measured up and right in points. Points are a traditional measure for print work and there are 72 points in an inch. For further details see the Coordinates section of the documentation.

You can change the coordinate system used by the Doc.Rect and the Doc.MediaBox using the Doc.Units and Doc.TopDown properties.


Implements: IDisposable


Method Description
Throws Exceptions FromLbwh Creates an XRect from a bottom left corner, a width and a height.
Throws Exceptions FromLtwh Creates an XRect from a top left corner, a width and a height.
Throws Exceptions FromSides Creates an XRect from the coordinates of two diagonally opposite corners.
Throws Exceptions FromPoints Create the smallest XRect that encloses all the points supplied.
XRect XRect constructor.
Contains Determine if this rectangle contains a specified point or rectangle.
FitIn Fits the rectangle as content inside another rectangle.
GetCorners Get the four corners of the rectangle.
Inset Insets the edges of the rectangle.
Intersect Intersects this rectangle with another rectangle.
IntersectsWith Determine if this rectangle intersects with another.
Magnify Magnifies the rectangle.
Move Translate the rectangle.
Position Position the bottom left of the rectangle.
Resize Resizes the rectangle.
Union Union this rectangle with another rectangle.
SetRect Sets the location and size of the rectangle.
SetSides Sets the sides of the rectangle.
ToString Returns a string representation of the object.


Property Description
String The rect as a delimited string.
Rectangle The System.Drawing.Rectangle.
Left The left of the rect.
Bottom The bottom of the rect.
Right The right of the rect.
Top The top of the rect.
Width The width of the rect.
Height The height of the rect.
Pin The corner of the rectangle to pin.
HasArea Determine if the rectangle encloses any area