public class SketchLayer extends CanvasLayer
Constructor and Description |
---|
SketchLayer()
Create a new layer that is not in a pane.
|
SketchLayer(CanvasPane pane)
Create a new layer within the given pane.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getCanvasPane, getLayerBounds, getParent, getToolTipText, getTransformContext, repaint, repaint, setParent
public SketchLayer()
public SketchLayer(CanvasPane pane)
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)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.