public interface Region extends Bounded
Region
represent a rectangluar space.
All of the functions provided by Region are in units 1/72" apiece. So, an 8.5" x 11" page will have a width and height of 612 and 792, respectively, with the origin of a graphical context positioned in the bottom-left corner.
The point described by the values returned by the Region.lx()
and Region.by()
function is guaranteed to be the bottom-left point of the rectangle. The values returned by the
Region.rx()
and Region.ty()
functions form the top-right point of the
rectangle.
A Region rooted at the point (100, 100) with width of 200 units and height of 300 units will return the following values:
lx() = 100 rx() = 300 by() = 100 ty() = 400 height() = 300 width() = 200
Modifier and Type | Method and Description |
---|---|
float |
area()
The total area of this region.
|
Region |
bounds()
Instances of
Region will always return themselves from their bounds implementations. |
float |
by()
The bottom edge of this region.
|
float |
endxpos()
Deprecated.
Legacy naming, same as
Region.rx() |
float |
endypos()
Deprecated.
Legacy naming, same as
Region.ty() |
float |
height()
The total height of this region.
|
float |
lx()
The left edge of this region.
|
float |
rx()
The right edge of this region.
|
float |
ty()
The top edge of this region.
|
float |
width()
The width of this region.
|
float |
xpos()
Deprecated.
Legacy naming, same as
Region.lx() |
float |
ypos()
Deprecated.
Legacy naming, same as
Region.by() |
Region bounds()
Region
will always return themselves from their bounds
implementations.float lx()
float rx()
float by()
float ty()
float height()
float width()
float area()
float xpos()
Region.lx()
float endxpos()
Region.rx()
float ypos()
Region.by()
float endypos()
Region.ty()