AnnotationPreferencesManager

Manager providing access to annotation editing preferences.

Functions

Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
abstract fun getAlpha(@NonNull annotationTool: AnnotationTool): Float
@FloatRange(from = 0.0, to = 1.0)
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
Gets last configured annotation border preset from preferences.
Link copied to clipboard
abstract fun getColor(@NonNull annotationTool: AnnotationTool): Int
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): Int
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): Font
abstract fun getFont(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Font
Gets last configured annotation font from preferences.
Link copied to clipboard
Gets last configured annotation line ends types from preferences.
Link copied to clipboard
Gets last configured annotation icon from preferences.
Link copied to clipboard
abstract fun getOutlineColor(@NonNull annotationTool: AnnotationTool): Int
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): String
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): Boolean
abstract fun getRepeatOverlayText(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Boolean
Gets last configured repeat overlay text setting from preferences.
Link copied to clipboard
@FloatRange(from = 1.0)
abstract fun getTextSize(@NonNull annotationTool: AnnotationTool): Float
@FloatRange(from = 1.0)
abstract fun getTextSize(@NonNull annotationTool: AnnotationTool, @NonNull toolVariant: AnnotationToolVariant): Float
Gets last configured text size from preferences.
Link copied to clipboard
@FloatRange(from = 0.0)
abstract fun getThickness(@NonNull annotationTool: AnnotationTool): Float
@FloatRange(from = 0.0)
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, @ColorInt color: Int)
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, @ColorInt color: Int)
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 font: Font)
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
abstract fun setMeasurementSnappingEnabled(enabled: Boolean)
Enables snapping to page graphics for measurement tools.
Link copied to clipboard
abstract fun setNoteAnnotationIcon(@NonNull annotationTool: AnnotationTool, @NonNull @NoteAnnotation.IconName iconName: String)
Sets annotation icon name to preferences.
Link copied to clipboard
abstract fun setOutlineColor(@NonNull annotationTool: AnnotationTool, @ColorInt color: Int)
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 overlayText: String)
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.