- 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 ShapegetShape()Returns aShapefor this object at the default scale (1).getShape(double scale) Returns a scaledShapefor this object (default scale is 1).static Pnt2d[]getShapePoints(Shape shape) default Shape[]default Shape[]getShapes(double scale) Returns a fixed sequence ofShapeitems for drawing this object, which must contain at least one item.
-
Method Details
-
getShape
Returns a scaledShapefor 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, forPnt2dit specifies the size of the marker (seePnt2d.getShape(double).- Parameters:
scale- the scale of the shape- Returns:
- a
Shapeinstance
-
getShape
Returns aShapefor this object at the default scale (1).- Returns:
- a
Shapeinstance
-
getShapes
Returns a fixed sequence ofShapeitems for drawing this object, which must contain at least one item. This is to produce graphic representations that are too complex for a singleShapeitem. 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, aGeometricEllipsereturns 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
Shapeitems
-
getShapes
-
getShapePoints
-