Rect Class Documentation

class Rect : SystemIDisposable

Namespace: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.

Uses types

Constructor & Destructor Documentation

Rect

Rect()

Create a rectangle with all values zero.

Rect

Rect(double nLLx, double nLLy, double nURx, double nURy)

Parameters

nLLx: double

the X coordinate of the lower left corner of the rectangle

nLLy: double

the Y coordinate of the lower left corner of the rectangle

nURx: double

the X coordinate of the upper right corner of the rectangle

nURy: double

the Y coordinate of the upper right corner of the rectangle

Create a Rect.

Rect

Rect(System.Drawing.Rectangle r)

Parameters

r: System.Drawing.Rectangle

The 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.RectangleF

The 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]

Height

double Height[get]

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]

RoundedHeight

int RoundedHeight[get]

RoundedWidth

int RoundedWidth[get]

Top

double Top[get, set]

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]

Member Function Documentation

Dispose

void Dispose()

Returns:

void

Equals

override bool Equals(object obj)

Parameters

obj: object

Returns:

override bool

InRect

bool InRect(Rect r2)

Parameters

r2: Rect

Returns:

bool

Check if this rectangle is inside the parameter rectangle.

Intersect

Rect Intersect(Rect r2)

Parameters

r2: Rect

Returns:

Rect

Obtain the intersection of this rectangle and another rectangle.

IsEmpty

bool IsEmpty()

Returns:

bool

Check if this rectangle is empty.

Overlaps

bool Overlaps(Rect r2)

Parameters

r2: Rect

Returns:

bool

Check if two rectangles overlap.

ToString

override string ToString()

Returns:

override string

Transform

Rect Transform(Matrix arg0)

Parameters

arg0: Matrix

Returns:

Rect

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.Rectangle

The rectangle to convert

Returns:

implicit

Convert 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.RectangleF

The rectangle to convert

Returns:

implicit

Convert 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.