public final class AreasBI
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 AreaBI |
alignCenter(AreaBI outer,
AreaBI inner) |
Align the area
inner such that the center of the area is equal to
the center of outer. |
static AreaBI |
alignHorizontallyCenter(AreaBI outer,
AreaBI inner) |
Deprecated.
|
static AreaBI |
alignHorizontallyMaxX(AreaBI outer,
AreaBI inner) |
Deprecated.
|
static AreaBI |
alignHorizontallyMaxXOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Deprecated.
|
static AreaBI |
alignHorizontallyMinX(AreaBI outer,
AreaBI inner) |
Deprecated.
|
static AreaBI |
alignHorizontallyMinXOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Deprecated.
|
static AreaBI |
alignMaxYMaxX(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignMaxYMaxXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static AreaBI |
alignMaxYMaxXOffset(AreaBI outer,
AreaBI 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 AreaBI |
alignMaxYMinX(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignMaxYMinXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static AreaBI |
alignMaxYMinXOffset(AreaBI outer,
AreaBI 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 AreaBI |
alignMinYMaxX(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignMinYMaxXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static AreaBI |
alignMinYMaxXOffset(AreaBI outer,
AreaBI 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 AreaBI |
alignMinYMinX(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignMinYMinXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets. |
static AreaBI |
alignMinYMinXOffset(AreaBI outer,
AreaBI 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 AreaBI |
alignOnXCenter(AreaBI outer,
AreaBI inner) |
Align the area
inner along the X axis in the center of outer. |
static AreaBI |
alignOnXMaxX(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignOnXMaxXOffset(AreaBI,
AreaBI, java.math.BigInteger) with a zero offset. |
static AreaBI |
alignOnXMaxXOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Align the area
inner along the X axis against the inside maximum-x edge
of outer. |
static AreaBI |
alignOnXMinX(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignOnXMinXOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset. |
static AreaBI |
alignOnXMinXOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Align the area
inner along the X axis against the inside minimum-x edge
of outer. |
static AreaBI |
alignOnYCenter(AreaBI outer,
AreaBI inner) |
Align the area
inner along the Y axis in the center of outer. |
static AreaBI |
alignOnYMaxY(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignOnYMaxYOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset. |
static AreaBI |
alignOnYMaxYOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Align the area
inner along the Y axis against the inside maximum-y edge
of outer. |
static AreaBI |
alignOnYMinY(AreaBI outer,
AreaBI inner) |
Equivalent to calling
alignOnYMinYOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset. |
static AreaBI |
alignOnYMinYOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Align the area
inner along the Y axis against the inside minimum-y edge
of outer. |
static AreaBI |
alignVerticallyCenter(AreaBI outer,
AreaBI inner) |
Deprecated.
|
static AreaBI |
alignVerticallyMaxY(AreaBI outer,
AreaBI inner) |
Deprecated.
|
static AreaBI |
alignVerticallyMaxYOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Deprecated.
|
static AreaBI |
alignVerticallyMinY(AreaBI outer,
AreaBI inner) |
Deprecated.
|
static AreaBI |
alignVerticallyMinYOffset(AreaBI outer,
AreaBI inner,
java.math.BigInteger offset) |
Deprecated.
|
static AreaBI |
containing(AreaBI a,
AreaBI b) |
Construct a area that will contain both
a and b. |
static boolean |
contains(AreaBI a,
AreaBI b) |
Determine whether or not one area contains another.
|
static boolean |
containsPoint(AreaBI a,
java.math.BigInteger x,
java.math.BigInteger y) |
Determine whether or not a area contains a given point.
|
static boolean |
couldFitInside(AreaBI a,
AreaBI b) |
Determine whether or not one area could fit inside another.
|
static AreaBI |
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 AreaBI |
fitBetweenHorizontal(AreaBI fit,
AreaBI a,
AreaBI b) |
Deprecated.
|
static AreaBI |
fitBetweenOnX(AreaBI fit,
AreaBI a,
AreaBI b) |
Attempt to fit
fit between a and b, horizontally. |
static AreaBI |
fitBetweenOnY(AreaBI fit,
AreaBI a,
AreaBI b) |
Attempt to fit
fit between a and b, vertically. |
static AreaBI |
fitBetweenVertical(AreaBI fit,
AreaBI a,
AreaBI b) |
Deprecated.
|
static AreaBI |
hollowOut(AreaBI 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 AreaBI |
hollowOutEvenly(AreaBI outer,
java.math.BigInteger offset) |
Equivalent to calling
hollowOut(AreaBI, java.math.BigInteger, java.math.BigInteger,
java.math.BigInteger, java.math.BigInteger) with offset for all offset parameters. |
static AreaBI |
moveAbsolute(AreaBI area,
java.math.BigInteger x,
java.math.BigInteger y) |
Move the given area to
(x, y). |
static AreaBI |
moveRelative(AreaBI area,
java.math.BigInteger x,
java.math.BigInteger y) |
Move the given area by
(x, y). |
static AreaBI |
moveToOrigin(AreaBI area) |
Move the given area to
(0, 0). |
static boolean |
overlaps(AreaBI a,
AreaBI b) |
Determine whether or not two areas overlap.
|
static AreaBI |
scaleFromCenter(AreaBI 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 AreaBI |
scaleFromMaxYMaxX(AreaBI 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 AreaBI |
scaleFromMaxYMinX(AreaBI 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 AreaBI |
scaleFromMinYMaxX(AreaBI 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 AreaBI |
scaleFromMinYMinX(AreaBI 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 AreaBI |
setSizeFromCenter(AreaBI area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static AreaBI |
setSizeFromMaxYMaxX(AreaBI area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static AreaBI |
setSizeFromMaxYMinX(AreaBI area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static AreaBI |
setSizeFromMinYMaxX(AreaBI area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static AreaBI |
setSizeFromMinYMinX(AreaBI area,
java.math.BigInteger sizeX,
java.math.BigInteger sizeY) |
Set the sizeX and sizeY of
area to sizeX and
sizeY, respectively. |
static java.lang.String |
show(AreaBI area) |
|
static java.lang.String |
showToBuilder(AreaBI area,
java.lang.StringBuilder sb) |
|
static AreaSizeBI |
size(AreaBI area) |
|
static AreaXSplitBI<AreaBI> |
splitAlongParallelToX(AreaBI 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 AreaYSplitBI<AreaBI> |
splitAlongParallelToY(AreaBI 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 AreaXYSplitBI<AreaBI> |
splitAlongXY(AreaBI 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 AreaBI 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).x - 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 boolean contains(AreaBI a, AreaBI 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.
a - Area Ab - Area Btrue iff a contains bpublic static AreaBI moveRelative(AreaBI area, java.math.BigInteger x, java.math.BigInteger y)
(x, y).area - The areax - The amount to move on the X axisy - The amount to move on the Y axispublic static AreaBI moveAbsolute(AreaBI area, java.math.BigInteger x, java.math.BigInteger y)
(x, y).area - The areax - The position to which to move on the X axisy - The position to which to move on the Y axispublic static AreaBI moveToOrigin(AreaBI area)
(0, 0).area - The areapublic static AreaBI alignOnXCenter(AreaBI outer, AreaBI inner)
inner along the X axis in the center of outer.outer - The outer areainner - The inner areapublic static AreaBI alignOnXMinX(AreaBI outer, AreaBI inner)
alignOnXMinXOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner areapublic static AreaBI alignOnXMinXOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset - The offset from the edgepublic static AreaBI alignOnXMaxX(AreaBI outer, AreaBI inner)
alignOnXMaxXOffset(AreaBI,
AreaBI, java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner areapublic static AreaBI alignOnXMaxXOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset - The offset from the edgepublic static AreaBI alignOnYMinY(AreaBI outer, AreaBI inner)
alignOnYMinYOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner areapublic static AreaBI alignOnYMinYOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset - The offset from the edgepublic static AreaBI alignOnYMaxY(AreaBI outer, AreaBI inner)
alignOnYMaxYOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner areapublic static AreaBI alignOnYMaxYOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset - The offset from the edgepublic static AreaBI alignOnYCenter(AreaBI outer, AreaBI inner)
inner along the Y axis in the center of outer.outer - The outer areainner - The inner area@Deprecated public static AreaBI alignHorizontallyCenter(AreaBI outer, AreaBI inner)
alignOnXCenter(AreaBI, AreaBI)inner horizontally in the center of outer.outer - The outer areainner - The inner area@Deprecated public static AreaBI alignHorizontallyMinX(AreaBI outer, AreaBI inner)
alignOnXMinX(AreaBI, AreaBI)alignHorizontallyMinXOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner area@Deprecated public static AreaBI alignHorizontallyMinXOffset(AreaBI outer, AreaBI inner, java.math.BigInteger offset)
alignOnXMinXOffset(AreaBI, AreaBI, 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.outer - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static AreaBI alignHorizontallyMaxX(AreaBI outer, AreaBI inner)
alignOnXMaxX(AreaBI, AreaBI)alignHorizontallyMaxXOffset(AreaBI,
AreaBI, java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner area@Deprecated public static AreaBI alignHorizontallyMaxXOffset(AreaBI outer, AreaBI inner, java.math.BigInteger offset)
alignOnXMaxXOffset(AreaBI, AreaBI, 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.outer - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static AreaBI alignVerticallyMinY(AreaBI outer, AreaBI inner)
alignOnYMinY(AreaBI, AreaBI)alignVerticallyMinYOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner area@Deprecated public static AreaBI alignVerticallyMinYOffset(AreaBI outer, AreaBI inner, java.math.BigInteger offset)
alignOnYMinYOffset(AreaBI, AreaBI, 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.outer - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static AreaBI alignVerticallyMaxY(AreaBI outer, AreaBI inner)
alignOnYMaxY(AreaBI, AreaBI)alignVerticallyMaxYOffset(AreaBI, AreaBI,
java.math.BigInteger) with a zero offset.outer - The outer areainner - The inner area@Deprecated public static AreaBI alignVerticallyMaxYOffset(AreaBI outer, AreaBI inner, java.math.BigInteger offset)
alignOnYMaxYOffset(AreaBI, AreaBI, 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.outer - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static AreaBI alignVerticallyCenter(AreaBI outer, AreaBI inner)
alignOnYCenter(AreaBI, AreaBI)inner vertically in the center of outer.outer - The outer areainner - The inner areapublic static AreaBI alignMinYMinX(AreaBI outer, AreaBI inner)
alignMinYMinXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.outer - The outer areainner - The inner areapublic static AreaBI alignMinYMinXOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset_x - The offset from the minimum-x edgeoffset_y - The offset from the minimum-y edgepublic static AreaBI alignMinYMaxX(AreaBI outer, AreaBI inner)
alignMinYMaxXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.outer - The outer areainner - The inner areapublic static AreaBI alignMinYMaxXOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset_x - The offset from the maximum-x edgeoffset_y - The offset from the minimum-y edgepublic static AreaBI alignMaxYMinX(AreaBI outer, AreaBI inner)
alignMaxYMinXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.outer - The outer areainner - The inner areapublic static AreaBI alignMaxYMinXOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset_x - The offset from the minimum-x edgeoffset_y - The offset from the maximum-y edgepublic static AreaBI alignMaxYMaxX(AreaBI outer, AreaBI inner)
alignMaxYMaxXOffset(AreaBI, AreaBI,
java.math.BigInteger, java.math.BigInteger) with zero offsets.outer - The outer areainner - The inner areapublic static AreaBI alignMaxYMaxXOffset(AreaBI outer, AreaBI 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.outer - The outer areainner - The inner areaoffset_x - The offset from the maximum-x edgeoffset_y - The offset from the maximum-y edgepublic static AreaBI alignCenter(AreaBI outer, AreaBI inner)
inner such that the center of the area is equal to
the center of outer.outer - The outer areainner - The inner areapublic static AreaBI hollowOut(AreaBI 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.outer - 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 AreaBI hollowOutEvenly(AreaBI outer, java.math.BigInteger offset)
hollowOut(AreaBI, java.math.BigInteger, java.math.BigInteger,
java.math.BigInteger, java.math.BigInteger) with offset for all offset parameters.outer - The containing areaoffset - The offset from each edge (must be non-negative)public static AreaBI setSizeFromCenter(AreaBI 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.
area - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static AreaBI setSizeFromMinYMinX(AreaBI 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.
area - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static AreaBI setSizeFromMinYMaxX(AreaBI 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.
area - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static AreaBI setSizeFromMaxYMaxX(AreaBI 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.
area - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static AreaBI setSizeFromMaxYMinX(AreaBI 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.
area - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static AreaBI scaleFromMinYMinX(AreaBI 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.
area - The areax_diff - The X differencey_diff - The Y differencepublic static AreaBI scaleFromMinYMaxX(AreaBI 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.
area - The areax_diff - The X differencey_diff - The Y differencepublic static AreaBI scaleFromMaxYMinX(AreaBI 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.
area - The areax_diff - The X differencey_diff - The Y differencepublic static AreaBI scaleFromMaxYMaxX(AreaBI 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.
area - The areax_diff - The X differencey_diff - The Y differencepublic static AreaBI scaleFromCenter(AreaBI 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.
area - The areax_diff - The X differencey_diff - The Y differencepublic static boolean overlaps(AreaBI a, AreaBI 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.
a - An areab - An areatrue iff a overlaps bpublic static boolean couldFitInside(AreaBI a, AreaBI 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.
a - An areab - An areatrue iff a could fit inside bpublic static AreaBI containing(AreaBI a, AreaBI b)
a and b.a - An areab - An areaa and bpublic static boolean containsPoint(AreaBI a, java.math.BigInteger x, java.math.BigInteger y)
Determine whether or not a area contains a given point.
a - An areax - The X coordinate of the pointy - The Y coordinate of the pointtrue iff a contains (x, y)@Deprecated public static AreaBI fitBetweenHorizontal(AreaBI fit, AreaBI a, AreaBI b)
fitBetweenOnX(AreaBI, AreaBI, AreaBI)fit between a and b, horizontally.fit - The area to be fitteda - An areab - An area@Deprecated public static AreaBI fitBetweenVertical(AreaBI fit, AreaBI a, AreaBI b)
fitBetweenOnY(AreaBI, AreaBI, AreaBI)fit between a and b, vertically.fit - The area to be fitteda - An areab - An areapublic static AreaBI fitBetweenOnX(AreaBI fit, AreaBI a, AreaBI b)
fit between a and b, horizontally.fit - The area to be fitteda - An areab - An areapublic static AreaBI fitBetweenOnY(AreaBI fit, AreaBI a, AreaBI b)
fit between a and b, vertically.fit - The area to be fitteda - An areab - An areapublic static AreaXSplitBI<AreaBI> splitAlongParallelToX(AreaBI area, java.math.BigInteger y)
area along a line parallel to the X axis placed at
y units from its own minimum-y edge.area - The area to be splity - The relative Y coordinate of the splitting edgepublic static AreaYSplitBI<AreaBI> splitAlongParallelToY(AreaBI area, java.math.BigInteger x)
area along a line parallel to the Y axis placed at
x units from its own minimum-x edge.area - The area to be splitx - The relative X coordinate of the splitting edgepublic static AreaXYSplitBI<AreaBI> splitAlongXY(AreaBI area, java.math.BigInteger x, java.math.BigInteger y)
area along a two axis-aligned perpendicular lines that intercept at (x, y).area - The area to be splitx - The relative X coordinate of the splitting edgey - The relative Y coordinate of the splitting edgepublic static java.lang.String show(AreaBI area)
area - The areapublic static AreaSizeBI size(AreaBI area)
area - The areapublic static java.lang.String showToBuilder(AreaBI area, java.lang.StringBuilder sb)
area - The areasb - A string builderCopyright © 2017 <code@io7m.com> http://io7m.com