java.lang.Object | |
↳ | com.pdftron.pdf.utils.PressureInkUtils |
Helper class used to create custom Pressure Sensitive appearances for Ink annotations. Custom appearance uses pressure information to determine the thickness of the strokes.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | PressureInkUtils.EraserData |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PressureInkUtils() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
clearThicknessList(Annot annot)
Clears the thickness list that contains varying stroke thickness
information for each stroke in the given Ink annotation
| ||||||||||
static void | eraseSubPath(Ink ink, int index) | ||||||||||
static List<double[]> |
generateOutlines(List<List<PointF>> pathList, List<List<Float>> thicknessesList, float baseThickness)
Create a stroke outline given a stroke (i.e.
| ||||||||||
static List<double[]> | getThicknessArrays(Ink ink) | ||||||||||
static List<List<Float>> |
getThicknessList(Ink ink)
Stores the thickness list that contains varying stroke thickness
information for each stroke in the given Ink annotation
Must be wrapped in a read lock | ||||||||||
static boolean |
isPressureSensitive(Annot ink)
Checks whether the Ink annotation contains pressure information.
| ||||||||||
static boolean |
refreshCustomAppearanceForNewAnnot(PDFViewCtrl pdfViewCtrl, Annot annot)
Adds a custom Ink appearance to an new Annotation that uses Pressure sensitive
ink information stored in the Annot.
| ||||||||||
static boolean |
refreshCustomInkAppearanceForExistingAnnot(Annot annot)
Adds a custom Ink appearance to an existing Annotation that uses Pressure sensitive
ink information stored in the Annot.
| ||||||||||
static void |
setInkList(Ink ink, List<List<PointF>> inkList)
Clears the ink list in the ink annotation and sets a new one
| ||||||||||
static void |
setThicknessList(Ink annot, List<List<Float>> thicknessesList)
Stores the given thickness list which contains varying stroke thickness
information for each stroke in the given Ink annotation
| ||||||||||
static void |
updateInkPointsOnMoveToNewPage(PDFViewCtrl pdfViewCtrl, Annot inkAnnot, int currentPage, int newPage, RectF currentScreenRect, RectF newAnnotScreenRect)
Updates the Ink points based on the new page number and new screen rect of the annotation
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Clears the thickness list that contains varying stroke thickness information for each stroke in the given Ink annotation
annot | the annotation with thickness list that we want to clear |
---|
PDFNetException |
---|
Create a stroke outline given a stroke (i.e. list of points) and a list of thicknesses
pathList | the stroke points to generate outline |
---|---|
thicknessesList | the thickness information for each point |
baseThickness | the base thickness to reference for annotation |
ink | Ink Annotation that may contain a thickness list |
---|
PDFNetException |
---|
Stores the thickness list that contains varying stroke thickness information for each stroke in the given Ink annotation
Must be wrapped in a read lock
ink | Ink Annotation that may contain a thickness list |
---|
PDFNetException |
---|
Checks whether the Ink annotation contains pressure information.
ink | the ink annotation to check |
---|
PDFNetException |
---|
Adds a custom Ink appearance to an new Annotation that uses Pressure sensitive ink information stored in the Annot.
Must be called wrapped in a write lock
annot | Ink annotation with the appearance that we want to update |
---|
Adds a custom Ink appearance to an existing Annotation that uses Pressure sensitive ink information stored in the Annot.
Must be called wrapped in a write lock
annot | Ink annotation with the appearance that we want to update |
---|
Clears the ink list in the ink annotation and sets a new one
ink | the ink annotation to set the ink list to |
---|---|
inkList | the ink list containing a list of stroke points |
PDFNetException |
---|
Stores the given thickness list which contains varying stroke thickness information for each stroke in the given Ink annotation
annot | the ink annotation with thickness list that we want to clear |
---|---|
thicknessesList | thickness list that we want to add to the annotation |
PDFNetException |
---|
Updates the Ink points based on the new page number and new screen rect of the annotation
pdfViewCtrl | the PDFViewCtrl |
---|---|
inkAnnot | the annotation that was moved |
currentPage | the page number of the annotation before it was moved |
newPage | the page number of the annotation after it was moved |
currentScreenRect | the screen rect of the annotation before it was moved |
newAnnotScreenRect | the screen rect of the annotation after it was moved |