Class ImageSymbol
java.lang.Object
com.bc.ceres.swing.figure.support.ImageSymbol
- All Implemented Interfaces:
Symbol
A symbol that uses an icon image.
- Since:
- Ceres 0.13
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageSymbol
createIcon
(String imageResourcePath) static ImageSymbol
createIcon
(String imageResourcePath, double refX, double refY) static ImageSymbol
createIcon
(String imageResourcePath, double refX, double refY, Class callerClass) static ImageSymbol
createIcon
(String imageResourcePath, Class callerClass) void
draw
(Rendering rendering, FigureStyle style) Draws the symbol on the given rendering using the given style.The bounds of the symbol.getImage()
double
getRefX()
double
getRefY()
boolean
isHitBy
(double x, double y) Tests weather this symbol is hit by the given point.
-
Method Details
-
createIcon
-
createIcon
-
createIcon
-
createIcon
public static ImageSymbol createIcon(String imageResourcePath, double refX, double refY, Class callerClass) -
getResourcePath
-
getImage
-
getRefX
public double getRefX()- Returns:
- The X-coordinate of the reference point.
-
getRefY
public double getRefY()- Returns:
- The Y-coordinate of the reference point.
-
draw
Description copied from interface:Symbol
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);
-
isHitBy
public boolean isHitBy(double x, double y) Description copied from interface:Symbol
Tests weather this symbol is hit by the given point. -
getBounds
Description copied from interface:Symbol
The bounds of the symbol.
-