Click or drag to resize

Rect Class

Rect is a utility class used to manipulate PDF rectangle objects (refer to section 3.8.3 of the PDF Reference Manual). Rect can be associated with a SDF/Cos rectangle Array using Rect(Obj*) constructor or later using Rect::Attach(Obj*) or Rect::Update(Obj*) methods. Rect keeps a local cache for rectangle points so it is necessary to call Rect::Update() method if the changes to the Rect should be saved in the attached Cos/SDF Array.
Inheritance Hierarchy
SystemObject
  pdftron.PDFRect

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class Rect : IClosable

The Rect type exposes the following members.

Constructors
  NameDescription
Public methodRect
Rect default constructor.
Public methodRect(Obj)
Create a Rect and initialize it using given Cos/SDF rectangle Array object. The rect is attached to this object.
Public methodRect(Double, Double, Double, Double)
Creates a Rect and initialize it using specified parameters.
Top
Properties
  NameDescription
Public propertyx1
Gets or sets the x coordinate of the bottom left corner.
Public propertyx2
Gets or sets the x coordinate of the top right corner.
Public propertyy1
Gets or sets the y coordinate of the bottom left corner.
Public propertyy2
Gets or sets the y coordinate of the top right corner.
Top
Methods
  NameDescription
Public methodAttach
Attaches the Cos/SDF object to the Rect.
Public methodClose
Public methodContains
Determines if the specified point is contained within the rectangular region defined by this Rectangle.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGet
Gets the rectangle coordinates.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHeight
Gets the height of this Rect.
Public methodInflate(Double)
Inflates this Rect.
Public methodInflate(Double, Double)
Inflates this Rect with the specified x and y values.
Public methodIntersectRect
Makes a Rect equal to the intersection of two existing rectangles.
Public methodNormalize
Normalizes the rectagle to the one with lower-left and upper-right corners.
Public methodSet(Rect)
Set the coordinates of the rectangle.
Public methodSet(Double, Double, Double, Double)
Sets the coordinates of the rectangle.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Saves changes made to the Rect object in the attached (or specified) SDF/Cos rectangle.
Public methodUpdate(Obj)
Saves changes made to the Rect object in the attached (or specified) SDF/Cos rectangle.
Public methodWidth
Gets the width of this Rect.
Top
Remarks
Although rectangles are conventionally specified by their lower-left and upper-right corners, it is acceptable to specify any two diagonally opposite corners.
See Also