Rect Class Documentation

classRect

Namespace:com::datalogics::PDFL

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(doublenLLx, doublenLLy, doublenURx, doublenURy)

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(java.awt.geom.Rectangle2Dr)

Parameters

r: java.awt.geom.Rectangle2D

a rectangle

Create a Rect from a java.awt rectangle type

Note that the coordinate systems are inverted for PDFL. Smaller X/Y values are assigned to the lower left coordinate.

Member Function Documentation

DisposeChildren

voidDisposeChildren()

Returns:

void

[static initializer]

static void[static initializer]()

delete

synchronized voiddelete(Booleandisposing)

Parameters

disposing: Boolean

Returns:

synchronized void

delete

synchronized voiddelete()

Returns:

synchronized void

equals

booleanequals(Objectrhs)

Parameters

rhs: Object

Returns:

boolean

finalize

voidfinalize()

Returns:

void

getBottom

doublegetBottom()

Returns:

double

the Y coordinate of the lower left corner of the rectangle.

getHeight

doublegetHeight()

Returns:

The height of the rectangle (URy - LLy).

The height of the Rect.

getLLx

doublegetLLx()

Returns:

double

the X coordinate of the lower left corner of the rectangle.

getLLy

doublegetLLy()

Returns:

double

the Y coordinate of the lower left corner of the rectangle.

getLeft

doublegetLeft()

Returns:

double

the X coordinate of the lower left corner of the rectangle.

getRight

doublegetRight()

Returns:

double

the X coordinate of the upper right corner of the rectangle.

getRoundedHeight

intgetRoundedHeight()

Returns:

The rounded height of the rectangle, in integer units.

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.

getRoundedWidth

intgetRoundedWidth()

Returns:

The rounded width of the rectangle, in integer units.

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.

getTop

doublegetTop()

Returns:

double

the Y coordinate of the upper right corner of the rectangle.

getURx

doublegetURx()

Returns:

double

the X coordinate of the upper right corner of the rectangle.

getURy

doublegetURy()

Returns:

double

the Y coordinate of the upper right corner of the rectangle.

getWidth

doublegetWidth()

Returns:

The width of the rectangle (URx - LLx).

The width of the Rect.

inRect

booleaninRect(Rectr2)

Parameters

r2: Rect

The rectangle to test containment against.

Returns:

true if this rectangle is entirely inside r2, false otherwise.

Check if this rectangle is inside the parameter rectangle.

intersect

Rectintersect(Rectr2)

Parameters

r2: Rect

The other rectangle to intersect with.

Returns:

A new Rect representing the intersection of the two rectangles.

Obtain the intersection of this rectangle and another rectangle.

isEmpty

booleanisEmpty()

Returns:

true 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

booleanoverlaps(Rectr2)

Parameters

r2: Rect

The other rectangle to test for overlap.

Returns:

true if the two rectangles overlap, false otherwise.

Check if two rectangles overlap.

sameTypeEquals

booleansameTypeEquals(Rectrhs)

Parameters

rhs: Rect

Returns:

boolean

setBottom

voidsetBottom(doublebottom)

Parameters

bottom: double

Returns:

void

the Y coordinate of the lower left corner of the rectangle.

setLLx

voidsetLLx(doublevalue)

Parameters

value: double

Returns:

void

the X coordinate of the lower left corner of the rectangle.

setLLy

voidsetLLy(doublevalue)

Parameters

value: double

Returns:

void

the Y coordinate of the lower left corner of the rectangle.

setLeft

voidsetLeft(doubleleft)

Parameters

left: double

Returns:

void

the X coordinate of the lower left corner of the rectangle.

setRight

voidsetRight(doubleright)

Parameters

right: double

Returns:

void

the X coordinate of the upper right corner of the rectangle.

setTop

voidsetTop(doubletop)

Parameters

top: double

Returns:

void

the Y coordinate of the upper right corner of the rectangle.

setURx

voidsetURx(doublevalue)

Parameters

value: double

Returns:

void

the X coordinate of the upper right corner of the rectangle.

setURy

voidsetURy(doublevalue)

Parameters

value: double

Returns:

void

the Y coordinate of the upper right corner of the rectangle.

toString

StringtoString()

Returns:

A string describing the rectangle coordinates in the form "[ LLx=..., LLy=..., URx=..., URy=... ]".

Convert the Rect to a human-readable string representation.

transform

Recttransform(Matrixarg0)

Parameters

arg0: Matrix

Returns:

A new Rect with the transformed coordinates.

Transform the coordinates of the rectangle by the given Matrix Object.