Annotation Preferences Manager
interface AnnotationPreferencesManager
Manager providing access to annotation editing preferences.
Functions
Link copied to clipboard
abstract fun getAlpha(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Float
Gets last configured annotation alpha from preferences.
Link copied to clipboard
Retrieve annotation creator from PSPDFKitPreferences.
Link copied to clipboard
abstract fun getBorderStylePreset(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): BorderStylePreset
Gets last configured annotation border preset from preferences.
Link copied to clipboard
abstract fun getColor(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Int
Retrieve last configured color from preferences.
Link copied to clipboard
abstract fun getFillColor(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Int
Retrieve last configured fill color from preferences.
Link copied to clipboard
abstract fun getFont(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Font
Gets last configured annotation font from preferences.
Link copied to clipboard
abstract fun getLineEnds(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Pair<LineEndType, LineEndType>
Gets last configured annotation line ends types from preferences.
Link copied to clipboard
abstract fun getNoteAnnotationIcon(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): String
Gets last configured annotation icon from preferences.
Link copied to clipboard
abstract fun getOutlineColor(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Int
Retrieve last configured outline color from preferences.
Link copied to clipboard
abstract fun getOverlayText(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): String
Gets last configured overlay text from preferences.
Link copied to clipboard
abstract fun getRepeatOverlayText(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Boolean
Gets last configured repeat overlay text setting from preferences.
Link copied to clipboard
abstract fun getTextSize(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Float
Gets last configured text size from preferences.
Link copied to clipboard
abstract fun getThickness(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Float
Gets last configured annotation thickness from preferences.
Link copied to clipboard
Checks if the annotation creator has been set.
Link copied to clipboard
Returns
true
if snapping to page graphics for measurement tools is enabled.Link copied to clipboard
abstract fun setAlpha(@NonNull annotationTool: AnnotationTool, @FloatRange(from = 0.0, to = 1.0 ) alpha: Float)
abstract fun setAlpha(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @FloatRange(from = 0.0, to = 1.0 ) alpha: Float)
Sets annotation alpha to preferences.
Link copied to clipboard
abstract fun setBorderStylePreset(@NonNull annotationTool: AnnotationTool, @NonNull borderStylePreset: BorderStylePreset)
abstract fun setBorderStylePreset(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @NonNull borderStylePreset: BorderStylePreset)
Sets annotation border preset to preferences.
Link copied to clipboard
abstract fun setColor(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @ColorInt color: Int)
Sets annotation color to preferences.
Link copied to clipboard
abstract fun setFillColor(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @ColorInt color: Int)
Sets annotation fill color to preferences.
Link copied to clipboard
abstract fun setFont(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @NonNull font: Font)
Sets annotation font to preferences.
Link copied to clipboard
abstract fun setLineEnds(@NonNull annotationTool: AnnotationTool, @NonNull lineEnd1: LineEndType, @NonNull lineEnd2: LineEndType)
abstract fun setLineEnds(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @NonNull lineEnd1: LineEndType, @NonNull lineEnd2: LineEndType)
Sets line end types to preferences.
Link copied to clipboard
Enables snapping to page graphics for measurement tools.
Link copied to clipboard
abstract fun setNoteAnnotationIcon(@NonNull annotationTool: AnnotationTool, @NonNull @NoteAnnotation.IconName iconName: String)
abstract fun setNoteAnnotationIcon(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @NonNull @NoteAnnotation.IconName iconName: String)
Sets annotation icon name to preferences.
Link copied to clipboard
abstract fun setOutlineColor(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @ColorInt color: Int)
Sets annotation outline color to preferences.
Link copied to clipboard
abstract fun setOverlayText(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @NonNull overlayText: String)
Sets the overlay text to preferences.
Link copied to clipboard
abstract fun setRepeatOverlayText(@NonNull annotationTool: AnnotationTool, repeatOverlayText: Boolean)
abstract fun setRepeatOverlayText(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, repeatOverlayText: Boolean)
Sets the last configured repeat overlay text setting to preferences.
Link copied to clipboard
abstract fun setTextSize(@NonNull annotationTool: AnnotationTool, @FloatRange(from = 1.0 ) textSize: Float)
abstract fun setTextSize(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @FloatRange(from = 1.0 ) textSize: Float)
Sets text size to preferences.
Link copied to clipboard
abstract fun setThickness(@NonNull annotationTool: AnnotationTool, @FloatRange(from = 0.0 ) thickness: Float)
abstract fun setThickness(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant, @FloatRange(from = 0.0 ) thickness: Float)
Sets annotation thickness to preferences.