us.zuercher.gpx2map.plotter
Class Shape

java.lang.Object
  extended by us.zuercher.gpx2map.plotter.AbstractShape
      extended by us.zuercher.gpx2map.plotter.Shape

public class Shape
extends AbstractShape

Shape extends AbstractShape to draw arbitrary shapes at predetermined locations.

Author:
Stephan Zuercher

Field Summary
private  Collection<Pixel> pixels
          Pixel data used to render the Shape.
private  int startDrawingRow
          Minimum Y coordinate of all pixels.
 
Fields inherited from class us.zuercher.gpx2map.plotter.AbstractShape
pixelsByRow, zOrdering
 
Constructor Summary
Shape(Collection<Pixel> pixels)
          Constructs a new Shape that draws the given Pixels.
 
Method Summary
 void computePixels(Dimension bounds)
          Organizes this Shape's Pixels as necessary for plotting.
 int startDrawingRow()
          Returns the starting row of shape 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

pixels

private Collection<Pixel> pixels
Pixel data used to render the Shape.


startDrawingRow

private final int startDrawingRow
Minimum Y coordinate of all pixels.

Constructor Detail

Shape

public Shape(Collection<Pixel> pixels)
Constructs a new Shape that draws the given Pixels.

Parameters:
pixels - shape data
Method Detail

startDrawingRow

public int startDrawingRow()
Returns the starting row of shape data.

Specified by:
startDrawingRow in class AbstractShape
Returns:
the starting row of shape data.
See Also:
AbstractShape.startDrawingRow()

computePixels

public void computePixels(Dimension bounds)
Organizes this Shape's Pixels as necessary for plotting.

Specified by:
computePixels in class AbstractShape
Parameters:
bounds - the image dimensions
See Also:
AbstractShape.computePixels(Dimension)