|
|||||||||
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.Line
public class Line
Line extends AbstractShape
to draw a line with a given color
and thickness.
Field Summary | |
---|---|
private Color |
color
Line color. |
private Point |
end
Ending point. |
private Point |
start
Starting point. |
private int |
thickness
Line thickness, in pixels. |
Fields inherited from class us.zuercher.gpx2map.plotter.AbstractShape |
---|
pixelsByRow, zOrdering |
Constructor Summary | |
---|---|
Line(Point start,
Point end,
Color color,
int thickness)
Constructs a new Line with the given end-points, color and thicnkess. |
Method Summary | |
---|---|
void |
computePixels(Dimension bounds)
Compute the Pixels necessary to draw this line. |
Color |
getColor()
Returns the Line's Color . |
Point |
getEnd()
Returns the ending point of the line. |
Point |
getStart()
Returns the starting point of the line. |
int |
getThickenedEndY()
Returns the Y coordinate for the ending point of the line, with line thickness taken in to account. |
int |
getThickenedStartY()
Returns the Y coordinate for the starting point of the line, with line thickness taken in to account. |
int |
startDrawingRow()
Computes the start Y coordinate for this line. |
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 final Point start
end
.
private final Point end
start
.
private final Color color
private final int thickness
Constructor Detail |
---|
public Line(Point start, Point end, Color color, int thickness)
start
- starting pointend
- ending pointcolor
- line colorthickness
- line thickness, in pixelsMethod Detail |
---|
public Point getStart()
public Point getEnd()
public int getThickenedStartY()
public int getThickenedEndY()
public Color getColor()
Color
.
Color
.public int startDrawingRow()
startDrawingRow
in class AbstractShape
public void computePixels(Dimension bounds)
Pixels
necessary to draw this line.
computePixels
in class AbstractShape
bounds
- the image dimensions
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |