Package com.bc.ceres.swing.figure
Interface Symbol
-
- All Known Implementing Classes:
ImageSymbol
,NamedSymbol
,PointSymbol
,ShapeSymbol
public interface Symbol
The graphical representation of point figures. Symbol geometry is provided in symbol coordinates using view units.- Since:
- Ceres 0.13
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
draw(Rendering rendering, FigureStyle style)
Draws the symbol on the given rendering using the given style.Rectangle2D
getBounds()
The bounds of the symbol.boolean
isHitBy(double x, double y)
Tests weather this symbol is hit by the given point.
-
-
-
Method Detail
-
draw
void draw(Rendering rendering, FigureStyle style)
Draws the symbol on the given rendering using the given style. The rendering's graphics is transformed so that drawing can be done directly in symbol coordinates using view units, e.g.rendering.getGraphics().draw(symbolShape);
orrendering.getGraphics().drawRenderedImage(symbolImage, null);
- Parameters:
rendering
- The rendering.style
- The style.
-
isHitBy
boolean isHitBy(double x, double y)
Tests weather this symbol is hit by the given point.- Parameters:
x
- The X-coordinate of the point in symbol coordinates using view units.y
- The Y-coordinate of the point in symbol coordinates using view units.- Returns:
true
, if so.
-
getBounds
Rectangle2D getBounds()
The bounds of the symbol.- Returns:
- The bounds of the symbol in symbol coordinates using view units.
-
-