ShapeAnnotation

abstract class ShapeAnnotation : Annotation

Abstract base-class of all shape annotations: LineAnnotation, SquareAnnotation, CircleAnnotation, PolygonAnnotation, PolylineAnnotation. Shape annotations can also be measurement annotations if created using the measurement tools included with the Measurement Tools license component.

Inheritors

Properties

Link copied to clipboard
open override val isMeasurement: Boolean

Returns true when the annotation is a measurement annotation. Measurement annotations can be:

Link copied to clipboard

Returns the MeasurementPrecision of this shape annotation if this is a measurement, null if not. This information can also be taken from Annotation.measurementInfo.

Link copied to clipboard
open override val measurementScale: Scale?

Returns the Scale of this shape annotation if this is a measurement, null if not. This information can also be taken from Annotation.measurementInfo.

Link copied to clipboard
open override val minimumSize: Size

Returns the minimum size of the annotation.

Functions

Link copied to clipboard
open override fun setMeasurementPrecision(precision: MeasurementPrecision)

Sets the MeasurementPrecision of this shape annotation. Throws an InvalidNutrientLicenseException if measurement tools are not licensed.

Link copied to clipboard
open override fun setMeasurementScale(scale: Scale)

Sets the Scale of this shape annotation. Throws an InvalidNutrientLicenseException if measurement tools are not licensed.

Link copied to clipboard
open override fun updateTransformationProperties(newBoundingBox: RectF, oldBoundingBox: RectF)

Annotations may override this method to transform their properties (i.e. points, rects, sizes) whenever the bounding box of the annotation changed.