public class CalligraphyPathWriter extends PathWriter
There are two separate shape bodies being written. If you paint them separately: this creates an "over" and "under" effect. If you paint them the same color: then this class is basically a java.awt.Stroke.
| Constructor and Description |
|---|
CalligraphyPathWriter(float angle, float offset1, float offset2, GeneralPath
Create a new
CalligraphyPathWriter.
|
CalligraphyPathWriter(float angle, float offset1, float offset2, PathWriter
Create a new
CalligraphyPathWriter.
|
public CalligraphyPathWriter(float angle,
float offset1,
float offset2,
GeneralPath destination)
CalligraphyPathWriter.
angle - the angle of the nib in this path.
offset1 - the offset of one side of the traced shape. One side of shape you trace will be offset by:
It is possible for this value to be zero, which means one side of this path will exactly line up with the original shape being traced.
If both offsets are equal: then no new path segments will be visible because they will be pencil then.
To achieve a simple stroke: one offset should be (+width/2), and the other offset should be (-width/2).
offset2 - the offset of the other side of the traced shape. This side of shape will be offset by:
destination - the destination for the data to write.
public CalligraphyPathWriter(float angle,
float offset1,
float offset2,
PathWriter dest1,
PathWriter dest2)
CalligraphyPathWriter.
angle - the angle of the nib in this path.
offset1 - the offset of one side of the traced shape. One side of shape you trace will be offset by:
It is possible for this value to be zero, which means one side of this path will exactly line up with the original shape being traced.
If both offsets are equal: then no new path segments will be visible because they will be pencil then.
To achieve a simple stroke: one offset should be (+width/2), and the other offset should be (-width/2).
offset2 - the offset of the other side of the traced shape. This side of shape will be offset by:
dest1 - the destination for half of the calligraphic shape.
dest2 - the destination for the other half. This may be the same as
dest1 if you plan on painting this path at the same time with the same fill.
public void moveTo(float x,
float y)public void lineTo(float x,
float y)public void quadTo(float cx,
float cy,
float x,
float y)public void curveTo(float cx1,
float cy1,
float cx2,
float cy2,
float x,
float y)public void closePath()
public void write(Shapes)
public void flush()