Package nl.colorize.multimedialib.math
Interface Shape
- All Known Implementing Classes:
Circle,Line,Polygon,Rect,SegmentedLine
public interface Shape
Shared interface for all two-dimensional shapes. Shapes use coordinates
with float precision, and instances are immutable.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this shape contains the specified point.Returns the smallest possible rectangular bounding box that can fit this shape.default Shapereposition(float offsetX, float offsetY) Returns a newShapeinstance that is repositioned by the specified X and Y offset.reposition(Point2D offset) Returns a newShapeinstance that is repositioned by the specified offset.
-
Field Details
-
EPSILON
static final float EPSILON- See Also:
-
-
Method Details
-
getBoundingBox
Rect getBoundingBox()Returns the smallest possible rectangular bounding box that can fit this shape. -
getCenter
Point2D getCenter() -
contains
Returns whether this shape contains the specified point. -
reposition
Returns a newShapeinstance that is repositioned by the specified offset. -
reposition
Returns a newShapeinstance that is repositioned by the specified X and Y offset.
-