public class Stroke
extends java.lang.Object
StrokePoint
Modifier and Type | Field and Description |
---|---|
long |
id
Unique identifier of the stroke object.
|
Constructor and Description |
---|
Stroke(vialab.SMT.Touch t,
Canvas c)
Default constructor creates a Stroke object and stores the coordinated of
the Touch object translated to the coordinate space of the Canvas.
|
Modifier and Type | Method and Description |
---|---|
StrokePoint |
getLastPoint() |
java.util.Vector<StrokePoint> |
getPath() |
void |
render(processing.core.PGraphics g)
Render the stroke based on the Brush and Paint objects.
|
void |
update(vialab.SMT.Touch t)
Update the stroke by adding the coordinates of the given Touch object
translated to the coordinate space of the Canvas to it.
|
public long id
public Stroke(vialab.SMT.Touch t, Canvas c)
t
- Touch objectc
- Canvaspublic void update(vialab.SMT.Touch t)
t
- Touch objectpublic void render(processing.core.PGraphics g)
g
- PGraphics to render the stroke into.Brush.renderStroke(Stroke, int, PGraphics)
,
Paint.getColour()
public java.util.Vector<StrokePoint> getPath()
public StrokePoint getLastPoint()