public class

AnnotationPropertyPreviewView

extends AppCompatImageView
java.lang.Object
   ↳ AppCompatImageView
     ↳ com.pdftron.pdf.utils.AnnotationPropertyPreviewView

Class Overview

An image view for showing annotation preview based on annotation style

Summary

Public Constructors
AnnotationPropertyPreviewView(Context context)
AnnotationPropertyPreviewView(Context context, AttributeSet attrs)
AnnotationPropertyPreviewView(Context context, AttributeSet attrs, int defStyle)
Public Methods
void setAnnotType(int annotType)
Sets annotation type
void setBorderStyle(ShapeBorderStyle borderStyle)
void setDrawInnerOuterStroke(boolean drawStroke)
Sets whether draw inner and outer stroke color if border color or fill color is the same as parent background color
void setDrawTransparentBackground(boolean draw)
Sets whether to draw transparent background
void setFontPath(String fontPath)
Sets font path to preview
void setInnerOuterStrokeColor(int color)
Sets inner and outer stroke color if border color or fill color is the same as parent background color
void setLineEndStyle(LineEndingStyle lineEndStyle)
void setLineStartStyle(LineEndingStyle lineStartStyle)
void setLineStyle(LineStyle lineStyle)
void setParentBackgroundColor(int color)
Sets parent view background color.
void setPreviewText(String text)
Sets the preview text for freetext annotation and text markup annotation
void setShowPressurePreview(boolean showPressurePreview)
Sets whether to show pressure sensitive thickness preview for signatures.
void setUseStrokeRatio(boolean useStrokeRatio)
Sets whether to use stroke ratio for drawing preview
void updateFillPreview(int stroke, int fill, double thickness, double opacity)
Updates preview based on give style
void updateFillPreview(AnnotStyle annotStyle)
Updates preview based on annotation style
void updateFreeTextStyle(int textColor, float textSizeRatio)
update free text color and size
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AnnotationPropertyPreviewView (Context context)

public AnnotationPropertyPreviewView (Context context, AttributeSet attrs)

public AnnotationPropertyPreviewView (Context context, AttributeSet attrs, int defStyle)

Public Methods

public void setAnnotType (int annotType)

Sets annotation type

Parameters
annotType The annotation type

public void setBorderStyle (ShapeBorderStyle borderStyle)

public void setDrawInnerOuterStroke (boolean drawStroke)

Sets whether draw inner and outer stroke color if border color or fill color is the same as parent background color

Parameters
drawStroke true then draw inner and outer stroke

public void setDrawTransparentBackground (boolean draw)

Sets whether to draw transparent background

public void setFontPath (String fontPath)

Sets font path to preview

Parameters
fontPath The font path

public void setInnerOuterStrokeColor (int color)

Sets inner and outer stroke color if border color or fill color is the same as parent background color

Parameters
color stroke color

public void setLineEndStyle (LineEndingStyle lineEndStyle)

public void setLineStartStyle (LineEndingStyle lineStartStyle)

public void setLineStyle (LineStyle lineStyle)

public void setParentBackgroundColor (int color)

Sets parent view background color. If parent view background color matches annotation color, it will draw a border around annotation in case the preview looks invisible

Parameters
color The parent view background color.

public void setPreviewText (String text)

Sets the preview text for freetext annotation and text markup annotation

Parameters
text preview text

public void setShowPressurePreview (boolean showPressurePreview)

Sets whether to show pressure sensitive thickness preview for signatures.

Parameters
showPressurePreview true to show pressure sensitive thickness preview, false otherwise

public void setUseStrokeRatio (boolean useStrokeRatio)

Sets whether to use stroke ratio for drawing preview

Parameters
useStrokeRatio true then use stroke ratio, false otherwise

public void updateFillPreview (int stroke, int fill, double thickness, double opacity)

Updates preview based on give style

Parameters
stroke The stroke color
fill The fill color of
thickness The thickness
opacity The opacity

public void updateFillPreview (AnnotStyle annotStyle)

Updates preview based on annotation style

Parameters
annotStyle The annotation style

public void updateFreeTextStyle (int textColor, float textSizeRatio)

update free text color and size

Parameters
textColor text color
textSizeRatio text size ratio, [0..1]