LineAnnotation

Represents a line on the page.

Constructors

Link copied to clipboard
constructor(@IntRange(from = 0) pageIndex: Int, point1: PointF, point2: PointF)

Creates a new line annotation.

constructor(@IntRange(from = 0) pageIndex: Int, point1: PointF, point2: PointF, scale: Scale, precision: MeasurementPrecision)

Creates a measurement distance annotation. Will throw an exception if Measurement Tools are not licensed.

Types

Link copied to clipboard
object Companion

Factories and helpers for LineAnnotation.

Properties

Link copied to clipboard

Starting and ending point of this line in PDF coordinates.

Link copied to clipboard
open override val type: AnnotationType

Gets the annotation type of the annotation.

Functions

Link copied to clipboard
open override fun getCopy(): LineAnnotation

Gets a copy of this annotation with the page index and object number reset.

Link copied to clipboard
open override fun getLineEnds(): Pair<LineEndType, LineEndType>

Returns current line ending styles for this line.

Link copied to clipboard
open override fun setLineEnds(lineEnd1: LineEndType, lineEnd2: LineEndType)

Sets line ending style for this line.

Link copied to clipboard
fun setPoints(point1: PointF, point2: PointF)

Sets a starting and ending point of the line in PDF coordinates.