|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.zuercher.gpx2map.plotter.ImageMarkerStyle
public class ImageMarkerStyle
ImageMarkerStyle implements MarkerStyle
to provide markers based
on the contents of an image file. Images are loaded via
CompositeImageFactory
. Supported formats are therefore the formats supported
by that factory.
Field Summary | |
---|---|
private boolean |
hasAlpha
Flag indicating whether image data has alpha channel or not. |
private int |
height
Image height. |
private File |
imageFile
Image file. |
private int[][][] |
rasterLines
Image raster line data. |
private int |
width
Image width. |
Constructor Summary | |
---|---|
ImageMarkerStyle(File imageFile)
Constructs a new ImageMarkerStyle from the given image location. |
Method Summary | |
---|---|
int |
getHeight()
Returns the marker's height. |
String |
getName()
Returns this ImageMarkerStyle's name. |
AbstractShape |
getShape(Point center,
int radius,
Color color)
Returns a ImageShape based on the contents of the image file given during construction. |
int |
getWidth()
Returns the marker's width. |
boolean |
hasConstantDimensions()
Returns true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final File imageFile
private final int width
private final int height
private final boolean hasAlpha
private final int[][][] rasterLines
Constructor Detail |
---|
public ImageMarkerStyle(File imageFile) throws IOException
imageFile
- location of an image file
IOException
- if there's an error reading the image file.Method Detail |
---|
public String getName()
getName
in interface MarkerStyle
public boolean hasConstantDimensions()
hasConstantDimensions
in interface MarkerStyle
MarkerStyle.hasConstantDimensions()
public int getHeight()
getHeight
in interface MarkerStyle
MarkerStyle.getHeight()
public int getWidth()
getWidth
in interface MarkerStyle
MarkerStyle.getWidth()
public AbstractShape getShape(Point center, int radius, Color color)
getShape
in interface MarkerStyle
center
- center point of the marker shaperadius
- size of the marker shape (see above)color
- marker color
MarkerStyle.getShape(Point, int, Color)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |