Package org.djutils.draw
Interface Drawable2d
- All Known Implementing Classes:
Bounds2d,DirectedPoint2d,LineSegment2d,Point2d,Polygon2d,PolyLine2d,Ray2d
Drawable2d is the interface that all drawable objects that use 2D coordinates must implement.
Copyright (c) 2020-2025 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the bounding rectangle of the object in absolute coordinates.default intReturn the number of dimensions.Methods inherited from interface org.djutils.draw.Drawable
getPointList, size, toString, toString, toString, toStringMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getAbsoluteBounds
Bounds2d getAbsoluteBounds()Retrieve the bounding rectangle of the object in absolute coordinates.- Returns:
- the bounding box of the object in absolute coordinates
-
getDimensions
default int getDimensions()Description copied from interface:DrawableReturn the number of dimensions.- Specified by:
getDimensionsin interfaceDrawable<Point2d>- Returns:
- the number of dimensions
-