final class Centers extends Object
Modifier and Type | Method and Description |
---|---|
(package private) static Point2D |
centerOf(Area area)
Find and return the center of the specified area using its bounds rectangle.
|
(package private) static Point2D |
centerOf(Area area,
Point2D center)
Find and return the specified center of the specified area using its bounds rectangle.
|
(package private) static Point2D |
centerOf(Rectangle2D rectangle)
Find and return the center of the specified rectangle.
|
(package private) static Point2D |
centerOf(Rectangle2D rectangle,
Point2D center)
Find and return the specified center of the specified rectangle.
|
(package private) static Point2D |
centerOf(Shape shape)
Find and return the center of the specified shape using its bounds rectangle.
|
(package private) static Point2D |
centerOf(Shape shape,
Point2D center)
Find and return the specified center of the specified shape using its bounds rectangle.
|
(package private) static Point2D |
centroidOf(Area area)
Find and return an approximate centroid of the specified area using
an evolutionary algorithm.
|
(package private) static Point2D |
centroidOf(Area area,
Point2D centroid)
Find and return the specified approximate centroid of the specified area using
an evolutionary algorithm.
|
(package private) static Point2D |
centroidOf(Area area,
Point2D centroid,
Random random)
Find and return the specified approximate centroid of the specified area using
an evolutionary algorithm.
|
static Point2D centerOf(Shape shape)
shape
- shape, must not be nullstatic Point2D centerOf(Shape shape, Point2D center)
shape
- shape, must not be nullcenter
- center, must not be nullstatic Point2D centerOf(Rectangle2D rectangle)
rectangle
- rectangle, must not be nullstatic Point2D centerOf(Rectangle2D rectangle, Point2D center)
rectangle
- rectangle, must not be nullcenter
- center, must not be nullstatic Point2D centerOf(Area area)
area
- area, must not be nullstatic Point2D centerOf(Area area, Point2D center)
area
- area, must not be nullcenter
- center, must not be nullstatic Point2D centroidOf(Area area)
area
- area, must not be nullstatic Point2D centroidOf(Area area, Point2D centroid)
area
- area, must not be nullcentroid
- centroid, must not be nullstatic Point2D centroidOf(Area area, Point2D centroid, Random random)
area
- area, must not be nullcentroid
- centroid, must not be nullrandom
- source of randomnessCopyright (c) 2009-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).