Modifier and Type | Method and Description |
---|---|
static Point2D |
atPosition(Bounds bounds,
Pos position) |
static Point2D |
atPositionFactors(Bounds bounds,
Point2D positionFactors) |
static Point2D |
computePositionFactors(Pos position) |
public static Point2D atPosition(Bounds bounds, Pos position)
bounds
- the given boundsposition
- the position within the boundsposition
to computePositionFactors(Pos)
.public static Point2D atPositionFactors(Bounds bounds, Point2D positionFactors)
bounds
- the given boundspositionFactors
- a Point2D
object whose x and y values represent percentages
(0.0 = 0% and 1.0 = 100%). As an example, an x value of 0 will return
Bounds.getMinX()
, 1.0 will return Bounds.getMaxX()
, and 0.5 will return
bounds.getMinX() + (bounds.getWidth() * positionFactors.getX()
.positionFactors
.public static Point2D computePositionFactors(Pos position)
position
- the positionPoint2D
that can be used as a positionFactor
object in
atPositionFactors(Bounds, Point2D)
.