StampAnnotation

Represents a stamp or annotationBitmap annotation on the page.

Constructors

Link copied to clipboard
constructor(@IntRange(from = 0) pageIndex: Int, rect: RectF, compressedBitmap: ByteArray)

Creates a new stamp annotation with the passed bitmap as contents.

constructor(@IntRange(from = 0) pageIndex: Int, rect: RectF, bitmap: Bitmap)

Creates a new stamp annotation with the passed bitmap as contents.

constructor(@IntRange(from = 0) pageIndex: Int, rect: RectF, stampType: StampType?)

Creates a new standard stamp annotation.

constructor(@IntRange(from = 0) pageIndex: Int, rect: RectF, title: String)

Creates a new stamp with custom title.

Types

Link copied to clipboard
object Companion

Internal stamp type constants used by core.

Properties

Link copied to clipboard

Returns a bitmap from this stamp annotation if there is any.

Link copied to clipboard
open override val isUiRotationSupported: Boolean

Returns true if this Annotation can be rotated in the UI.

Link copied to clipboard
open override val minimumSize: Size

Returns the minimum size of the annotation.

Link copied to clipboard

The clockwise rotation of this stamp in degrees.

Link copied to clipboard

Type of this stamp if it's one of the standard types listed in StampType, or null if the stamp uses a non-standard title.

Link copied to clipboard

Text in second line of the stamp if any is available.

Link copied to clipboard

Text in first line of the stamp if any is available.

Link copied to clipboard
open override val type: AnnotationType

Gets the annotation type of the annotation.

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

Checks whether annotation is an annotationBitmap annotation.

Link copied to clipboard
fun setBitmap(compressedBitmap: ByteArray)

Sets a custom bitmap for this stamp annotation.

Link copied to clipboard
fun setIsSignature(isSignature: Boolean)

Sets whether this annotation is an electronic signature annotation.

Link copied to clipboard
fun setRotation(rotation: Int, contentSize: Size)

Sets the rotation of this stamp. This will adjust the bounding box so rotating the annotation will cause the bounds to change.

fun setRotation(rotation: Int, adjustBounds: Boolean)
fun setRotation(rotation: Int, contentSize: Size, adjustBounds: Boolean)

Sets the rotation of this stamp.

Link copied to clipboard
open override fun toInstantJson(): String

Produces Instant JSON representation of this annotation.

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.