FreeTextAnnotation

Represents a free text annotation on the page. The annotation’s text color comes from the color property of Annotation.

Constructors

Link copied to clipboard
constructor(@IntRange(from = 0) pageIndex: Int, @NonNull rect: RectF, @Nullable contents: String)
Creates a new FreeText annotation.
constructor(@NonNull properties: AnnotationPropertyManager, markDirty: Boolean)
Intended for internal usage only.

Types

Link copied to clipboard
Possible styles of free text annotation.
Link copied to clipboard
Possible values for the alignment of the text.

Functions

Link copied to clipboard
This adjusts the annotations bounding box to the smallest possible size that will encompass the rotated annotations at it's default size.
Link copied to clipboard
Gets the points used to describe the call out line.
Link copied to clipboard
Gets the font name set for usage with this FreeTextAnnotation.
Link copied to clipboard
Returns type (also called intent) of the free text annotation.
Link copied to clipboard
The line end for the call out line.
Link copied to clipboard
Returns the minimum size of the annotation.
Link copied to clipboard
open fun getRotation(): Int
Returns the clockwise rotation of this free text annotation in degrees.
Link copied to clipboard
Gets the insets that are applied to the text.
Link copied to clipboard
Returns the text justification used by this free text annotation.
Link copied to clipboard
open fun getTextSize(): Float
Returns the text size set to this annotation.
Link copied to clipboard
Returns text stroke color of this annotation.
Link copied to clipboard
Gets the annotation type of the annotation.
Link copied to clipboard
Returns the vertical text alignment used by this free text annotation.
Link copied to clipboard
open fun isResizable(): Boolean
Check if the annotation is resizable, or if this is a non-resizable annotation.
Link copied to clipboard
Returns true if this Annotation can be rotated in the UI.
Link copied to clipboard
open fun resizeToFitText(@NonNull annotationConfigurationRegistry: AnnotationConfigurationRegistry, @NonNull pageSize: Size)
Resizes the annotation to fit the text.
Link copied to clipboard
open fun setCallOutPoints(@NonNull points: List<PointF>)
Sets the call out points for this free text annotation.
Link copied to clipboard
open fun setContentSize(@Nullable contentSize: RectF, adjustedForPageRotation: Boolean)
Sets the inner bounds that are used when rotating the annotation.
Link copied to clipboard
Sets the annotation flags for this annotation.
Link copied to clipboard
open fun setFontName(@Nullable fontName: String)
Sets the font name to be used by this FreeTextAnnotation.
Link copied to clipboard
Sets the type (also called intent) of the free text annotations.
Link copied to clipboard
open fun setLineEnd(@NonNull lineEnd: LineEndType)
Sets the line end for the call out line.
Link copied to clipboard
open fun setRotation(rotation: Int)
open fun setRotation(rotation: Int, @NonNull contentSize: Size, adjustBounds: Boolean)
Sets the rotation of this free text annotation.
Link copied to clipboard
open fun setTextInsets(@NonNull edgeInsets: EdgeInsets)
Sets the insets that are applied to the text.
Link copied to clipboard
Sets the text justification to use.
Link copied to clipboard
open fun setTextSize(textSize: Float)
Sets the text size of this annotation.
Link copied to clipboard
open fun setTextStrokeColor(@ColorInt color: Int)
Sets the color of annotations text stroke.
Link copied to clipboard
Sets the vertical text alignment to use.
Link copied to clipboard
open fun updateTransformationProperties(@NonNull newBoundingBox: RectF, @NonNull oldBoundingBox: RectF)
Annotations may override this method to transform their properties (i.e.