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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this shape contains the specified point.Returns the smallest possible rectangular bounding box that can fit this shape.default Shape
reposition
(float offsetX, float offsetY) Returns a newShape
instance that is repositioned by the specified X and Y offset.reposition
(Point2D offset) Returns a newShape
instance that is repositioned by the specified X and Y offset.
-
Field Details
-
EPSILON
static final float EPSILON- See Also:
-
-
Method Details
-
contains
Returns whether this shape contains the specified point. -
getBoundingBox
Rect getBoundingBox()Returns the smallest possible rectangular bounding box that can fit this shape. -
reposition
Returns a newShape
instance that is repositioned by the specified X and Y offset. -
reposition
Returns a newShape
instance that is repositioned by the specified X and Y offset.
-