Rect Class Documentation
class Rect : SystemIDisposableNamespace:Datalogics::PDFL
- Inherits from:
SystemIDisposable
Detailed Description
A rect holds four coordinates for a rectangle.
The coordinates for a rectangle include left, top, right, bottom. Width () and height () defines the rectangle's width and height. LLx and LLy defines lower left corner, and URx and URy defines the upper right corner.
Referenced by
Constructor & Destructor Documentation
Rect
Rect()Create a rectangle with all values zero.
Rect
Rect(double nLLx, double nLLy, double nURx, double nURy)Parameters
nLLx: doublethe X coordinate of the lower left corner of the rectangle
nLLy: doublethe Y coordinate of the lower left corner of the rectangle
nURx: doublethe X coordinate of the upper right corner of the rectangle
nURy: doublethe Y coordinate of the upper right corner of the rectangle
Create a Rect.
Rect
Rect(System.Drawing.Rectangle r)Parameters
r: System.Drawing.RectangleThe rectangle to convert
Construct a Rect from a System.Drawing.Rectangle
Note that the coordinate systems are inverted for PDFL. Smaller X/Y values are assigned to the lower left coordinate.
Rect
Rect(System.Drawing.RectangleF r)Parameters
r: System.Drawing.RectangleFThe rectangle to convert
Construct a Rect from a System.Drawing.RectangleF
Note that the coordinate systems are inverted for PDFL. Smaller X/Y values are assigned to the lower left coordinate.
Property Documentation
Bottom
double Bottom[get, set]the Y coordinate of the lower left corner of the rectangle
Height
double Height[get]The height of the Rect.
LLx
double LLx[get, set]the X coordinate of the lower left corner of the rectangle
LLy
double LLy[get, set]the Y coordinate of the lower left corner of the rectangle
Left
double Left[get, set]the X coordinate of the lower left corner of the rectangle
Right
double Right[get, set]the X coordinate of the upper right corner of the rectangle
RoundedHeight
int RoundedHeight[get]Calculates and rounds the rectangle's height as APDFL does during page rendering.
The width and height rounding algorithms are different inside APDFL, so in DLE they are different as well.
RoundedWidth
int RoundedWidth[get]Calculates and rounds the rectangle's width as APDFL does during page rendering.
The width and height rounding algorithms are different inside APDFL, so in DLE they are different as well.
Top
double Top[get, set]the Y coordinate of the upper right corner of the rectangle
URx
double URx[get, set]the X coordinate of the upper right corner of the rectangle
URy
double URy[get, set]the Y coordinate of the upper right corner of the rectangle
Width
double Width[get]The width of the Rect.
Member Function Documentation
Dispose
void Dispose()Returns:
voidEquals
override bool Equals(object obj)Parameters
obj: object
Returns:
override boolInRect
bool InRect(Rect r2)Parameters
r2: RectThe rectangle to test containment against.
Returns:
booltrue if this rectangle is entirely inside r2, false otherwise.
Check if this rectangle is inside the parameter rectangle.
Intersect
Parameters
r2: RectThe other rectangle to intersect with.
Returns:
RectA new Rect representing the intersection of the two rectangles.
Obtain the intersection of this rectangle and another rectangle.
IsEmpty
bool IsEmpty()Returns:
booltrue if the rectangle is empty, false otherwise.
Check if this rectangle is empty.
A rectangle is considered empty if its width or height is zero.
Overlaps
bool Overlaps(Rect r2)Parameters
r2: RectThe other rectangle to test for overlap.
Returns:
booltrue if the two rectangles overlap, false otherwise.
Check if two rectangles overlap.
ToString
override string ToString()Returns:
override stringA string describing the rectangle coordinates in the form "[ LLx=..., LLy=..., URx=..., URy=... ]".
Convert the Rect to a human-readable string representation.
Transform
Parameters
arg0: Matrix
Returns:
RectA new Rect with the transformed coordinates.
Transform the coordinates of the rectangle by the given Matrix Object.
operator Rect
static implicit operator Rect(System.Drawing.Rectangle r)Parameters
r: System.Drawing.RectangleThe rectangle to convert
Returns:
implicitConvert a System.Drawing.Rectangle to a Rect
Note that the coordinate systems are inverted for PDFL. Smaller X/Y values are assigned to the lower left coordinate.
operator Rect
static implicit operator Rect(System.Drawing.RectangleF r)Parameters
r: System.Drawing.RectangleFThe rectangle to convert
Returns:
implicitConvert a System.Drawing.RectangleF to a Rect
Note that the coordinate systems are inverted for PDFL. Smaller X/Y values are assigned to the lower left coordinate.