java.lang.Object | |
↳ | com.pdftron.pdf.model.ink.InkItem |
Known Direct Subclasses |
Class used to describe all ink stroke related data.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public final float | baseThickness | ||||||||||
public final int | color | ||||||||||
public List<PointF> | currentActiveStroke | ||||||||||
public final List<List<PointF>> | finishedStrokes | ||||||||||
public final String | id | ||||||||||
public final boolean | isStylus | ||||||||||
public final float | opacity | ||||||||||
public final int | pageNumber | ||||||||||
public Paint | paint | ||||||||||
public float | paintThickness | ||||||||||
public List<PointF> | previousStroke | ||||||||||
public boolean | shouldAnimateUndoRedo |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
InkItem(String id, List<PointF> currentActiveStroke, List<List<PointF>> finishedStrokes, int pageNumber, int color, float opacity, float baseThickness, float paintThickness, boolean isStylus) | |||||||||||
InkItem(int pageNumber, int color, float opacity, float baseThickness, boolean isStylus, PDFViewCtrl pdfViewCtrl) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | addPoint(float x, float y, float pressure, int action) | ||||||||||
void |
clearCurrentActiveStroke()
This method is used if the current stroke is interrupted, for example if the stroke is actually a zoom even
then we cancel it.
| ||||||||||
InkItem |
copy()
Create a copy of an InkItem and return it.
| ||||||||||
void |
draw(Canvas canvas, PDFViewCtrl pdfViewCtrl, Matrix transform, PointF offset)
When draw, we will lazy populate the paths for the finished strokes (this is done by
converting page points via convPagePtToHorizontalScrollingPt).
| ||||||||||
boolean | equals(Object obj) | ||||||||||
Paint | getPaint(PDFViewCtrl pdfViewCtrl) | ||||||||||
int | hashCode() | ||||||||||
void | reset() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This method is used if the current stroke is interrupted, for example if the stroke is actually a zoom even then we cancel it.
Create a copy of an InkItem and return it. Note that Paint is not copied as it's always lazy initialized
When draw, we will lazy populate the paths for the finished strokes (this is done by converting page points via convPagePtToHorizontalScrollingPt). When the viewer zooms, we will need to delete the old paths and re-calculate/re-populate new paths.