Package omero.model
Interface SmartShape
-
- All Known Implementing Classes:
SmartEllipseI
,SmartLineI
,SmartMaskI
,SmartPathI
,SmartPointI
,SmartPolygonI
,SmartPolylineI
,SmartRectI
,SmartTextI
public interface SmartShape
Orthogonal interface hierarchy of types for working with theShape
hierarchy.- Since:
- Beta4.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SmartShape.PointCallback
Callback interface passed every point which is within the area of this shape.static class
SmartShape.Util
Utility class used as a mixin by all of theSmartShape
implementations.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
areaPoints(SmartShape.PointCallback action)
Calls theSmartShape.PointCallback
with all of the x/y coordinates which are within the shape.java.awt.Shape
asAwtShape()
Converts the currentSmartShape
to aShape
.java.util.List<Point>
asPoints()
Provides some, possibly lossy, bounding polygon of thisSmartShape
via points.void
randomize(java.util.Random random)
Initializes this shape with completely random data.
-
-
-
Method Detail
-
areaPoints
void areaPoints(SmartShape.PointCallback action)
Calls theSmartShape.PointCallback
with all of the x/y coordinates which are within the shape.- Parameters:
action
- the callback to call
-
asAwtShape
java.awt.Shape asAwtShape()
Converts the currentSmartShape
to aShape
. This is useful for determining paths and included points.- Returns:
- the AWT shape
-
asPoints
java.util.List<Point> asPoints()
Provides some, possibly lossy, bounding polygon of thisSmartShape
via points.- Returns:
- the bounding polygon
-
randomize
void randomize(java.util.Random random)
Initializes this shape with completely random data.- Parameters:
random
- a random number generator
-
-