public final class PAreasBI
extends java.lang.Object
Functions over areas.
These functions operate using the concepts of minimum-x, maximum-x, minimum-y, and maximum-y edges. It is up to individual applications to assign meaning to these edges such as "left" for minimum-x and "top" for minimum-y.
| Modifier and Type | Method | Description |
|---|---|---|
static <S> PAreaBI<S> |
alignCenter(PAreaBI<S> outer,
PAreaBI<S> inner) |
Align the area
inner such that the center of the area is equal to
the center of outer. |
static <S> PAreaBI<S> |
alignHorizontallyCenter(PAreaBI<S> outer,
PAreaBI<S> inner) |
Deprecated.
|
static <S> PAreaBI<S> |
alignHorizontallyMaxX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Deprecated.
|
static <S> PAreaBI<S> |
alignHorizontallyMaxXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Deprecated.
|
static <S> PAreaBI<S> |
alignHorizontallyMinX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Deprecated.
|
static <S> PAreaBI<S> |
alignHorizontallyMinXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Deprecated.
|
static <S> PAreaBI<S> |
alignMaxYMaxX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignMaxYMaxXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static <S> PAreaBI<S> |
alignMaxYMaxXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset_x,
java.math.BigInteger offset_y) |
Align the area
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer. |
static <S> PAreaBI<S> |
alignMaxYMinX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignMaxYMinXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static <S> PAreaBI<S> |
alignMaxYMinXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset_x,
java.math.BigInteger offset_y) |
Align the area
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer. |
static <S> PAreaBI<S> |
alignMinYMaxX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignMinYMaxXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static <S> PAreaBI<S> |
alignMinYMaxXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset_x,
java.math.BigInteger offset_y) |
Align the area
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer. |
static <S> PAreaBI<S> |
alignMinYMinX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignMinYMinXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static <S> PAreaBI<S> |
alignMinYMinXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset_x,
java.math.BigInteger offset_y) |
Align the area
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer. |
static <S> PAreaBI<S> |
alignOnXCenter(PAreaBI<S> outer,
PAreaBI<S> inner) |
Align the area
inner along the X axis in the center of outer. |
static <S> PAreaBI<S> |
alignOnXMaxX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignOnXMaxXOffset(PAreaBI,
PAreaBI, java.math.BigInteger) with a zero offset. |
static <S> PAreaBI<S> |
alignOnXMaxXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Align the area
inner along the X axis against the inside maximum-x edge
of outer. |
static <S> PAreaBI<S> |
alignOnXMinX(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignOnXMinXOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset. |
static <S> PAreaBI<S> |
alignOnXMinXOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Align the area
inner along the X axis against the inside minimum-x edge
of outer. |
static <S> PAreaBI<S> |
alignOnYCenter(PAreaBI<S> outer,
PAreaBI<S> inner) |
Align the area
inner along the Y axis in the center of outer. |
static <S> PAreaBI<S> |
alignOnYMaxY(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignOnYMaxYOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset. |
static <S> PAreaBI<S> |
alignOnYMaxYOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Align the area
inner along the Y axis against the inside maximum-y edge
of outer. |
static <S> PAreaBI<S> |
alignOnYMinY(PAreaBI<S> outer,
PAreaBI<S> inner) |
Equivalent to calling
alignOnYMinYOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset. |
static <S> PAreaBI<S> |
alignOnYMinYOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Align the area
inner along the Y axis against the inside minimum-y edge
of outer. |
static <S> PAreaBI<S> |
alignVerticallyCenter(PAreaBI<S> outer,
PAreaBI<S> inner) |
Deprecated.
|
static <S> PAreaBI<S> |
alignVerticallyMaxY(PAreaBI<S> outer,
PAreaBI<S> inner) |
Deprecated.
|
static <S> PAreaBI<S> |
alignVerticallyMaxYOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Deprecated.
|
static <S> PAreaBI<S> |
alignVerticallyMinY(PAreaBI<S> outer,
PAreaBI<S> inner) |
Deprecated.
|
static <S> PAreaBI<S> |
alignVerticallyMinYOffset(PAreaBI<S> outer,
PAreaBI<S> inner,
java.math.BigInteger offset) |
Deprecated.
|
static <S,T> PAreaBI<T> |
cast(PAreaBI<S> area) |
Brand a given area as belonging to a different coordinate space.
|
static <S> PAreaBI<S> |
containing(PAreaBI<S> a,
PAreaBI<S> b) |
Construct a area that will contain both
a and b. |
static <S> boolean |
contains(PAreaBI<S> a,
PAreaBI<S> b) |
Determine whether or not one area contains another.
|
static <S> boolean |
containsPoint(PAreaBI<S> a,
java.math.BigInteger x,
java.math.BigInteger y) |
Determine whether or not a area contains a given point.
|
static <S> boolean |
couldFitInside(PAreaBI<S> a,
PAreaBI<S> b) |
Determine whether or not one area could fit inside another.
|
static <S> PAreaBI<S> |
create(java.math.BigInteger x,
java.math.BigInteger y,
java.math.BigInteger size_x,
java.math.BigInteger size_y) |
Create an area of size
size_x on the X axis and size size_y
on the Y axis, placing the minimum corner at (x, y). |
static <S> PAreaBI<S> |
fitBetweenHorizontal(PAreaBI<S> fit,
PAreaBI<S> a,
PAreaBI<S> b) |
Deprecated.
|
static <S> PAreaBI<S> |
fitBetweenOnX(PAreaBI<S> fit,
PAreaBI<S> a,
PAreaBI<S> b) |
Attempt to fit
fit between a and b, horizontally. |
static <S> PAreaBI<S> |
fitBetweenOnY(PAreaBI<S> fit,
PAreaBI<S> a,
PAreaBI<S> b) |
Attempt to fit
fit between a and b, vertically. |
static <S> PAreaBI<S> |
fitBetweenVertical(PAreaBI<S> fit,
PAreaBI<S> a,
PAreaBI<S> b) |
Deprecated.
|
static <S> PAreaBI<S> |
hollowOut(PAreaBI<S> outer,
java.math.BigInteger min_x_offset,
java.math.BigInteger max_x_offset,
java.math.BigInteger min_y_offset,
java.math.BigInteger max_y_offset) |
Construct a new area that fits inside
outer based on the given
offsets from each edge. |
static <S> PAreaBI<S> |
hollowOutEvenly(PAreaBI<S> outer,
java.math.BigInteger offset) |
Equivalent to calling
hollowOut(PAreaBI, java.math.BigInteger, java.math.BigInteger,
java.math.BigInteger, java.math.BigInteger) with offset for all offset parameters. |
static <S> PAreaBI<S> |
moveAbsolute(PAreaBI<S> area,
java.math.BigInteger x,
java.math.BigInteger y) |
Move the given area to
(x, y). |
static <S> PAreaBI<S> |
moveRelative(PAreaBI<S> area,
java.math.BigInteger x,
java.math.BigInteger y) |
Move the given area by
(x, y). |
static <S> PAreaBI<S> |
moveToOrigin(PAreaBI<S> area) |
Move the given area to
(0, 0). |
static <S> boolean |
overlaps(PAreaBI<S> a,
PAreaBI<S> b) |
Determine whether or not two areas overlap.
|
static <S> PAreaBI<S> |
scaleFromCenter(PAreaBI<S> area,
java.math.BigInteger x_diff,
java.math.BigInteger y_diff) |
Scale
area by adding x_diff to the sizeX, and
y_diff to the sizeY. |
static <S> PAreaBI<S> |
scaleFromMaxYMaxX(PAreaBI<S> area,
java.math.BigInteger x_diff,
java.math.BigInteger y_diff) |
Scale
area by adding x_diff to the sizeX, and
y_diff to the sizeY. |
static <S> PAreaBI<S> |
scaleFromMaxYMinX(PAreaBI<S> area,
java.math.BigInteger x_diff,
java.math.BigInteger y_diff) |
Scale
area by adding x_diff to the sizeX, and
y_diff to the sizeY. |
static <S> PAreaBI<S> |
scaleFromMinYMaxX(PAreaBI<S> area,
java.math.BigInteger x_diff,
java.math.BigInteger y_diff) |
Scale
area by adding x_diff to the sizeX, and
y_diff to the sizeY. |
static <S> PAreaBI<S> |
scaleFromMinYMinX(PAreaBI<S> area,
java.math.BigInteger x_diff,
java.math.BigInteger y_diff) |
Scale
area by adding x_diff to the sizeX, and
y_diff to the sizeY. |
static <S> PAreaBI<S> |
setSizeFromCenter(PAreaBI<S> area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static <S> PAreaBI<S> |
setSizeFromMaxYMaxX(PAreaBI<S> area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static <S> PAreaBI<S> |
setSizeFromMaxYMinX(PAreaBI<S> area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static <S> PAreaBI<S> |
setSizeFromMinYMaxX(PAreaBI<S> area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static <S> PAreaBI<S> |
setSizeFromMinYMinX(PAreaBI<S> area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static <S> java.lang.String |
show(PAreaBI<S> area) |
|
static <S> java.lang.String |
showToBuilder(PAreaBI<S> area,
java.lang.StringBuilder sb) |
|
static <S> PAreaSizeBI<S> |
size(PAreaBI<S> area) |
|
static <S> PAreaXSplitBI<S,PAreaBI<S>> |
splitAlongParallelToX(PAreaBI<S> area,
java.math.BigInteger y) |
Split
area along a line parallel to the X axis placed at
y units from its own minimum-y edge. |
static <S> PAreaYSplitBI<S,PAreaBI<S>> |
splitAlongParallelToY(PAreaBI<S> area,
java.math.BigInteger x) |
Split
area along a line parallel to the Y axis placed at
x units from its own minimum-x edge. |
static <S> PAreaXYSplitBI<S,PAreaBI<S>> |
splitAlongXY(PAreaBI<S> area,
java.math.BigInteger x,
java.math.BigInteger y) |
Split
area along a two axis-aligned perpendicular lines that intercept at (x, y). |
public static <S> PAreaBI<S> create(java.math.BigInteger x, java.math.BigInteger y, java.math.BigInteger size_x, java.math.BigInteger size_y)
size_x on the X axis and size size_y
on the Y axis, placing the minimum corner at (x, y).S - The coordinate space of the areasx - The X value of the minimum cornery - The Y value of the minimum cornersize_x - The size of the area on the X axissize_y - The size of the area on the Y axispublic static <S> boolean contains(PAreaBI<S> a, PAreaBI<S> b)
Determine whether or not one area contains another.
Containing is reflexive: contains(a, a) == true.
Containing is transitive: contains(a, b) \u2192 contains(b, c) \u2192
contains(a, c).
Containing is not necessarily symmetric.
S - The coordinate space of the areasa - Area Ab - Area Btrue iff a contains bpublic static <S> PAreaBI<S> moveRelative(PAreaBI<S> area, java.math.BigInteger x, java.math.BigInteger y)
(x, y).S - The coordinate space of the areaarea - The areax - The amount to move on the X axisy - The amount to move on the Y axispublic static <S> PAreaBI<S> moveAbsolute(PAreaBI<S> area, java.math.BigInteger x, java.math.BigInteger y)
(x, y).S - The coordinate space of the areaarea - The areax - The position to which to move on the X axisy - The position to which to move on the Y axispublic static <S> PAreaBI<S> moveToOrigin(PAreaBI<S> area)
(0, 0).S - The coordinate space of the areaarea - The areapublic static <S,T> PAreaBI<T> cast(PAreaBI<S> area)
S - The starting coordinate spaceT - The resulting coordinate spacearea - An areaarea@Deprecated public static <S> PAreaBI<S> alignHorizontallyCenter(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnXCenter(PAreaBI, PAreaBI)inner horizontally in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaBI<S> alignHorizontallyMinX(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnXMinX(PAreaBI, PAreaBI)alignHorizontallyMinXOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaBI<S> alignHorizontallyMinXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
alignOnXMinXOffset(PAreaBI, PAreaBI, java.math.BigInteger)inner horizontally against the inside minimum-x edge
of outer. The area will be at least offset units from the
minimum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaBI<S> alignHorizontallyMaxX(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnXMaxX(PAreaBI, PAreaBI)alignHorizontallyMaxXOffset(PAreaBI,
PAreaBI, java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaBI<S> alignHorizontallyMaxXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
alignOnXMaxXOffset(PAreaBI, PAreaBI, java.math.BigInteger)inner horizontally against the inside maximum-x edge
of outer. The area will be at least offset units from the
maximum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaBI<S> alignVerticallyMinY(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnYMinY(PAreaBI, PAreaBI)alignVerticallyMinYOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaBI<S> alignVerticallyMinYOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
alignOnYMinYOffset(PAreaBI, PAreaBI, java.math.BigInteger)inner vertically against the inside minimum-y edge
of outer. The area will be at least offset units from the
minimum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaBI<S> alignVerticallyMaxY(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnYMaxY(PAreaBI, PAreaBI)alignVerticallyMaxYOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaBI<S> alignVerticallyMaxYOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
alignOnYMaxYOffset(PAreaBI, PAreaBI, java.math.BigInteger)inner vertically against the inside maximum-y edge
of outer. The area will be at least offset units from the
maximum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaBI<S> alignVerticallyCenter(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnYCenter(PAreaBI, PAreaBI)inner vertically in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignOnXCenter(PAreaBI<S> outer, PAreaBI<S> inner)
inner along the X axis in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignOnXMinX(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnXMinXOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignOnXMinXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
inner along the X axis against the inside minimum-x edge
of outer. The area will be at least offset units from the
minimum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaBI<S> alignOnXMaxX(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnXMaxXOffset(PAreaBI,
PAreaBI, java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignOnXMaxXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
inner along the X axis against the inside maximum-x edge
of outer. The area will be at least offset units from the
maximum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaBI<S> alignOnYMinY(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnYMinYOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignOnYMinYOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
inner along the Y axis against the inside minimum-y edge
of outer. The area will be at least offset units from the
minimum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaBI<S> alignOnYMaxY(PAreaBI<S> outer, PAreaBI<S> inner)
alignOnYMaxYOffset(PAreaBI, PAreaBI,
java.math.BigInteger) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignOnYMaxYOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset)
inner along the Y axis against the inside maximum-y edge
of outer. The area will be at least offset units from the
maximum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaBI<S> alignOnYCenter(PAreaBI<S> outer, PAreaBI<S> inner)
inner along the Y axis in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignMinYMinX(PAreaBI<S> outer, PAreaBI<S> inner)
alignMinYMinXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignMinYMinXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset_x, java.math.BigInteger offset_y)
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the minimum-x edgeoffset_y - The offset from the minimum-y edgepublic static <S> PAreaBI<S> alignMinYMaxX(PAreaBI<S> outer, PAreaBI<S> inner)
alignMinYMaxXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignMinYMaxXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset_x, java.math.BigInteger offset_y)
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the maximum-x edgeoffset_y - The offset from the minimum-y edgepublic static <S> PAreaBI<S> alignMaxYMinX(PAreaBI<S> outer, PAreaBI<S> inner)
alignMaxYMinXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignMaxYMinXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset_x, java.math.BigInteger offset_y)
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the minimum-x edgeoffset_y - The offset from the maximum-y edgepublic static <S> PAreaBI<S> alignMaxYMaxX(PAreaBI<S> outer, PAreaBI<S> inner)
alignMaxYMaxXOffset(PAreaBI, PAreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> alignMaxYMaxXOffset(PAreaBI<S> outer, PAreaBI<S> inner, java.math.BigInteger offset_x, java.math.BigInteger offset_y)
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the maximum-x edgeoffset_y - The offset from the maximum-y edgepublic static <S> PAreaBI<S> alignCenter(PAreaBI<S> outer, PAreaBI<S> inner)
inner such that the center of the area is equal to
the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaBI<S> hollowOut(PAreaBI<S> outer, java.math.BigInteger min_x_offset, java.math.BigInteger max_x_offset, java.math.BigInteger min_y_offset, java.math.BigInteger max_y_offset)
outer based on the given
offsets from each edge.S - The coordinate space of the areasouter - The containing areamin_x_offset - The offset from the minimum-x edge (must be
non-negative)max_x_offset - The offset from the maximum-x edge (must be
non-negative)min_y_offset - The offset from the minimum-y edge (must be
non-negative)max_y_offset - The offset from the maximum-y edge (must be
non-negative)public static <S> PAreaBI<S> hollowOutEvenly(PAreaBI<S> outer, java.math.BigInteger offset)
hollowOut(PAreaBI, java.math.BigInteger, java.math.BigInteger,
java.math.BigInteger, java.math.BigInteger) with offset for all offset parameters.S - The coordinate space of the areasouter - The containing areaoffset - The offset from each edge (must be non-negative)public static <S> PAreaBI<S> setSizeFromCenter(PAreaBI<S> area, java.math.BigInteger sizeX, java.math.BigInteger sizeY)
Set the sizeX and sizeY of area to sizeX and
sizeY, respectively.
The area is resized from its own center.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaBI<S> setSizeFromMinYMinX(PAreaBI<S> area, java.math.BigInteger sizeX, java.math.BigInteger sizeY)
Set the sizeX and sizeY of area to sizeX and
sizeY, respectively.
The area is resized by moving its minimum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaBI<S> setSizeFromMinYMaxX(PAreaBI<S> area, java.math.BigInteger sizeX, java.math.BigInteger sizeY)
Set the sizeX and sizeY of area to sizeX and
sizeY, respectively.
The area is resized by moving its minimum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaBI<S> setSizeFromMaxYMaxX(PAreaBI<S> area, java.math.BigInteger sizeX, java.math.BigInteger sizeY)
Set the sizeX and sizeY of area to sizeX and
sizeY, respectively.
The area is resized by moving its maximum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaBI<S> setSizeFromMaxYMinX(PAreaBI<S> area, java.math.BigInteger sizeX, java.math.BigInteger sizeY)
Set the sizeX and sizeY of area to sizeX and
sizeY, respectively.
The area is resized by moving its maximum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaBI<S> scaleFromMinYMinX(PAreaBI<S> area, java.math.BigInteger x_diff, java.math.BigInteger y_diff)
Scale area by adding x_diff to the sizeX, and
y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its minimum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaBI<S> scaleFromMinYMaxX(PAreaBI<S> area, java.math.BigInteger x_diff, java.math.BigInteger y_diff)
Scale area by adding x_diff to the sizeX, and
y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its minimum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaBI<S> scaleFromMaxYMinX(PAreaBI<S> area, java.math.BigInteger x_diff, java.math.BigInteger y_diff)
Scale area by adding x_diff to the sizeX, and
y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its maximum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaBI<S> scaleFromMaxYMaxX(PAreaBI<S> area, java.math.BigInteger x_diff, java.math.BigInteger y_diff)
Scale area by adding x_diff to the sizeX, and
y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its maximum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaBI<S> scaleFromCenter(PAreaBI<S> area, java.math.BigInteger x_diff, java.math.BigInteger y_diff)
Scale area by adding x_diff to the sizeX, and
y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized from its own center.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> boolean overlaps(PAreaBI<S> a, PAreaBI<S> b)
Determine whether or not two areas overlap.
Overlapping is reflexive: overlaps(a, a) == true.
Overlapping is symmetric: overlaps(a, b) == overlaps(b, a).
Overlapping is not necessarily transitive.
S - The coordinate space of the areasa - An areab - An areatrue iff a overlaps bpublic static <S> boolean couldFitInside(PAreaBI<S> a, PAreaBI<S> b)
Determine whether or not one area could fit inside another.
Fitting is reflexive: couldFitInside(a, a) == true.
Fitting is transitive: couldFitInside(a, b) \u2192 couldFitInside(b,
c) \u2192 couldFitInside(a, c).
Fitting is not necessarily symmetric.
S - The coordinate space of the areasa - An areab - An areatrue iff a could fit inside bpublic static <S> PAreaBI<S> containing(PAreaBI<S> a, PAreaBI<S> b)
a and b.S - The coordinate space of the areasa - An areab - An areaa and bpublic static <S> boolean containsPoint(PAreaBI<S> a, java.math.BigInteger x, java.math.BigInteger y)
Determine whether or not a area contains a given point.
S - The coordinate space of the areaa - An areax - The X coordinate of the pointy - The Y coordinate of the pointtrue iff a contains (x, y)@Deprecated public static <S> PAreaBI<S> fitBetweenHorizontal(PAreaBI<S> fit, PAreaBI<S> a, PAreaBI<S> b)
fitBetweenOnX(PAreaBI, PAreaBI, PAreaBI)fit between a and b, horizontally.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An area@Deprecated public static <S> PAreaBI<S> fitBetweenVertical(PAreaBI<S> fit, PAreaBI<S> a, PAreaBI<S> b)
fitBetweenOnY(PAreaBI, PAreaBI, PAreaBI)fit between a and b, vertically.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An areapublic static <S> PAreaBI<S> fitBetweenOnX(PAreaBI<S> fit, PAreaBI<S> a, PAreaBI<S> b)
fit between a and b, horizontally.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An areapublic static <S> PAreaBI<S> fitBetweenOnY(PAreaBI<S> fit, PAreaBI<S> a, PAreaBI<S> b)
fit between a and b, vertically.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An areapublic static <S> PAreaXSplitBI<S,PAreaBI<S>> splitAlongParallelToX(PAreaBI<S> area, java.math.BigInteger y)
area along a line parallel to the X axis placed at
y units from its own minimum-y edge.S - The coordinate space of the areasarea - The area to be splity - The relative Y coordinate of the splitting edgepublic static <S> PAreaYSplitBI<S,PAreaBI<S>> splitAlongParallelToY(PAreaBI<S> area, java.math.BigInteger x)
area along a line parallel to the Y axis placed at
x units from its own minimum-x edge.S - The coordinate space of the areasarea - The area to be splitx - The relative X coordinate of the splitting edgepublic static <S> PAreaXYSplitBI<S,PAreaBI<S>> splitAlongXY(PAreaBI<S> area, java.math.BigInteger x, java.math.BigInteger y)
area along a two axis-aligned perpendicular lines that intercept at (x, y).S - The coordinate space of the areasarea - The area to be splitx - The relative X coordinate of the splitting edgey - The relative Y coordinate of the splitting edgepublic static <S> java.lang.String show(PAreaBI<S> area)
S - The coordinate space of the areaarea - The areapublic static <S> PAreaSizeBI<S> size(PAreaBI<S> area)
S - The coordinate space of the areaarea - The areapublic static <S> java.lang.String showToBuilder(PAreaBI<S> area, java.lang.StringBuilder sb)
S - The coordinate space of the areaarea - The areasb - A string builderCopyright © 2017 <code@io7m.com> http://io7m.com