java.lang.Object | |
↳ | com.pdftron.pdf.StrokeOutlineBuilder |
StrokeOutlineBuilder is a class used to generate a stroke outline. The main purpose of this class is to generate an outline given a variable width stroke from pressure data from a stylus. This class is still in the experimental stages. The API is not yet finalized and it should not be used for production.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | StrokeOutlineBuilder.TipOptions |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StrokeOutlineBuilder(double strokeWidth)
Create a StrokeOutlineBuilder given a reference width.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addPoint(double x, double y, double pressure)
Add a stroke point to the curve given position (x, y) and pressure.
| ||||||||||
double[] |
getLastSegmentOutline(int numPoints, StrokeOutlineBuilder.TipOptions options)
Returns the stroke outline Bezier curve generated from the last
numPoints number of points added.
| ||||||||||
double[] |
getOutline()
Returns the entire stroke outline Bezier curve, including the
curves generated at the start and end stroke tips.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a StrokeOutlineBuilder given a reference width. The width of the stroke outline will be based on this reference width, where the minimum width will be (0.6 * width) and the maximum width will be (1.4 * width) This class is still in the experimental stages. The API is not yet finalized and it should not be used for production.
strokeWidth | used to constrain the stroke thickness |
---|
Add a stroke point to the curve given position (x, y) and pressure. This class is still in the experimental stages. The API is not yet finalized and it should not be used for production.
x | x-coordinate |
---|---|
y | y-coordinate |
pressure | value at (x, y) used to vary the stroke thickness |
Returns the stroke outline Bezier curve generated from the last numPoints number of points added. Also generates the end stroke tip curve if specified. This class is still in the experimental stages. The API is not yet finalized and it should not be used for production.
numPoints | last number of points used to generate the stroke outline Bezier curve |
---|---|
options | whether to add the end tip to the resulting outline |
Returns the entire stroke outline Bezier curve, including the curves generated at the start and end stroke tips. This class is still in the experimental stages. The API is not yet finalized and it should not be used for production.