|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectus.zuercher.gpx2map.plotter.AbstractShape
us.zuercher.gpx2map.plotter.ImageShape
public class ImageShape
ImageShape extends AbstractShape to render the contents of an
image during plotting. By accepting an array of raster line data in the
constructor, a single ImageMarkerStyle or other image-based
MarkerStyle can create many ImageShapes that share references to
the same image data.
| Field Summary | |
|---|---|
private Point |
center
Center point of the rendered ImageShape. |
private boolean |
hasAlpha
Alpha channel flag. |
private int |
height
Image height, computed from rasterLines. |
private int[][][] |
rasterLines
Image raster data. |
private int |
startingRow
Starting row of image data. |
private int |
width
Image width, computed from rasterLines. |
| Fields inherited from class us.zuercher.gpx2map.plotter.AbstractShape |
|---|
pixelsByRow, zOrdering |
| Constructor Summary | |
|---|---|
ImageShape(int[][][] rasterLines,
boolean hasAlpha,
Point center)
Constructs a new ImageShape. |
|
| Method Summary | |
|---|---|
void |
computePixels(Dimension bounds)
Computes the pixels necessary to draw this shape. |
int |
startDrawingRow()
Returns the starting row of image data. |
| Methods inherited from class us.zuercher.gpx2map.plotter.AbstractShape |
|---|
getPixelRowIterator, getZOrdering, setZOrdering |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int[][][] rasterLines
private final int width
rasterLines.
private final int height
rasterLines.
private final boolean hasAlpha
private final Point center
private final int startingRow
height and
center.
| Constructor Detail |
|---|
public ImageShape(int[][][] rasterLines,
boolean hasAlpha,
Point center)
rasterLines
is never modified and may be safely reused for another ImageShape.
The dimensios of rasterLines is [height][width][depth],
where depth is 3 when hasAlpha is false and
4 if hasAlpha is true.
rasterLines - image datahasAlpha - alpha channel flagcenter - center point of rendered image| Method Detail |
|---|
public void computePixels(Dimension bounds)
computePixels in class AbstractShapebounds - the image dimensionsAbstractShape.computePixels(Dimension)public int startDrawingRow()
startDrawingRow in class AbstractShapeAbstractShape.startDrawingRow()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||