- All Known Implementing Classes:
AlgebraicLine
,AxisAlignedBoundingBox
,ConvexHull
,Corner
,GeometricCircle
,GeometricEllipse
,HessianLine
,HoughLine
,LineSegment2d
,LocalMinMaxFinder.ExtremalPoint
,PixelMap.Pixel
,Pnt2d.PntDouble
,Pnt2d.PntInt
,SiftDescriptor
,SlopeInterceptLine
,Triangle2D
public interface ShapeProducer
Implementing classes know how to create an AWT
Shape
.-
Method Summary
Modifier and TypeMethodDescriptiondefault Shape
getShape()
Returns aShape
for this object at the default scale (1).getShape
(double scale) Returns a scaledShape
for this object (default scale is 1).static Pnt2d[]
getShapePoints
(Shape shape) default Shape[]
default Shape[]
getShapes
(double scale) Returns a fixed sequence ofShape
items for drawing this object, which must contain at least one item.
-
Method Details
-
getShape
Returns a scaledShape
for this object (default scale is 1). Must be defined by implementing classes. The interpretation of the scale factor is left to the implementing class. For example, forPnt2d
it specifies the size of the marker (seePnt2d.getShape(double)
.- Parameters:
scale
- the scale of the shape- Returns:
- a
Shape
instance
-
getShape
Returns aShape
for this object at the default scale (1).- Returns:
- a
Shape
instance
-
getShapes
Returns a fixed sequence ofShape
items for drawing this object, which must contain at least one item. This is to produce graphic representations that are too complex for a singleShape
item. The returned shapes may also be displayed with different strokes or colors.By default, this method returns a single item which is the primary shape (obtained by
getShape(double)
). Implementing classes should override this method if more than one shape must be returned For example, aGeometricEllipse
returns three shape items: (a) the ellipse curve, (b) the center mark, (c) the major axes (seeGeometricEllipse.getShapes(double)
).- Parameters:
scale
- a scale factor (may be used or ignored)- Returns:
- sequence of
Shape
items
-
getShapes
-
getShapePoints
-