public interface Area
Modifier and Type | Method and Description |
---|---|
int |
cx()
X coordinate of center.
|
int |
cy()
Y coordinate of center.
|
default Area |
east(int width,
int gap) |
Range |
horizontal()
Horizontal range.
|
default Area |
north(int height,
int gap) |
static Area |
of(Range h,
Range v) |
static Area |
ofPixel(int x,
int y)
Create an area representing a single pixel.
|
static Area |
ofPixel(Px2d p) |
static Area |
ofRect(int x0,
int y0,
int sx,
int sy) |
static Area |
ofRect(Px2d p0,
Px2d size) |
Px2d |
p0()
Upper left corner.
|
Px2d |
p1()
Lower right corner (inclusive!).
|
Px2d |
pc()
Center point.
|
Px2d |
pLeftCenter() |
Px2d |
pLowerCenter() |
Px2d |
pLowerLeft() |
Px2d |
pLowerRight() |
Px2d |
pRightCenter() |
Px2d |
pUpperCenter() |
Px2d |
pUpperLeft() |
Px2d |
pUpperRight() |
Area |
shrink(int px)
Shrink.
|
Px2d |
size()
Size.
|
default Area |
south(int height,
int gap) |
int |
sx()
Horizontal size.
|
int |
sy()
Vertical size.
|
Area |
translate(int x,
int y)
Translate.
|
Area |
translate(Px2d v)
Translate.
|
Range |
vertical()
Vertical range.
|
default Area |
west(int width,
int gap) |
int |
x0()
X coordinate of upper left corner.
|
int |
x1()
X coordinate of lower right corner (inclusive!).
|
int |
y0()
Y coordinate of upper left corner.
|
int |
y1()
Y coordinate of lower right corner (inclusive!).
|
Range horizontal()
Range vertical()
Area shrink(int px)
px
- Pixels to shrink on all sizesArea translate(int x, int y)
x
- Horizontal translationy
- Vertical translationArea translate(Px2d v)
v
- Translation vectordefault Area north(int height, int gap)
default Area south(int height, int gap)
default Area west(int width, int gap)
default Area east(int width, int gap)
int x0()
int y0()
int x1()
int y1()
int sx()
int sy()
int cx()
int cy()
Px2d p0()
Px2d p1()
Px2d pUpperLeft()
Px2d pUpperRight()
Px2d pLowerLeft()
Px2d pLowerRight()
Px2d pLeftCenter()
Px2d pRightCenter()
Px2d pUpperCenter()
Px2d pLowerCenter()
Px2d size()
Px2d pc()
static Area ofPixel(int x, int y)
x
- Pixel coordinatey
- Pixel coordinatestatic Area ofRect(int x0, int y0, int sx, int sy)