|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.CanvasLayer
diva.sketch.SketchLayer
public class SketchLayer
A layer class that is specialized to make sketching strokes fast. This layer only paints the last segment of a hand-drawn stroke, so it doesn't have to redraw any of the layers behind it.
Constructor Summary | |
---|---|
SketchLayer()
Create a new layer that is not in a pane. |
|
SketchLayer(CanvasPane pane)
Create a new layer within the given pane. |
Method Summary | |
---|---|
void |
appendStroke(double x,
double y)
This completes a line segement with start point (_prevX,prevY) and (x,y) and asks the shape to paint itself. |
void |
finishStroke()
Finish the current stroke and clear the layer. |
void |
setLineWidth(float width)
Set the pen width used to paint the shape. |
void |
setPenColor(Color c)
Set the pen color used to paint the shape. |
void |
startStroke(double x,
double y)
This sets the start point (_prevX, _prevY) of the line segment to be drawn. |
Methods inherited from class diva.canvas.CanvasLayer |
---|
getCanvasPane, getLayerBounds, getParent, getToolTipText, getTransformContext, repaint, repaint, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SketchLayer()
public SketchLayer(CanvasPane pane)
Method Detail |
---|
public void appendStroke(double x, double y)
public void finishStroke()
public void setLineWidth(float width)
public void setPenColor(Color c)
public void startStroke(double x, double y)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |