StampAnnotation

Represents a stamp or annotationBitmap annotation on the page.

Constructors

Link copied to clipboard
constructor(@IntRange(from = 0) pageIndex: Int, @NonNull rect: RectF, @NonNull compressedBitmap: Array<Byte>)
Creates a new stamp annotation with the passed bitmap as contents.
constructor(@IntRange(from = 0) pageIndex: Int, @NonNull rect: RectF, @NonNull bitmap: Bitmap)
Creates a new stamp annotation with the passed bitmap as contents.
constructor(@IntRange(from = 0) pageIndex: Int, @NonNull rect: RectF, @Nullable stampType: StampType)
Creates a new standard stamp annotation.
constructor(@IntRange(from = 0) pageIndex: Int, @NonNull rect: RectF, @NonNull title: String)
Creates a new stamp with custom title.
constructor(@NonNull properties: AnnotationPropertyManager, markDirty: Boolean, @Nullable imageResourceId: String)
Intended for internal usage only
constructor(@NonNull properties: AnnotationPropertyManager, markDirty: Boolean, @Nullable bitmap: Bitmap)
Intended for internal usage only

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
Returns a bitmap from this stamp annotation if there is any.
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 stamp in degrees.
Link copied to clipboard
Returns type of this stamp if it's one of the standard types listed in StampType.
Link copied to clipboard
Returns text in second line of the stamp if any is available.
Link copied to clipboard
Returns text in first line of the stamp if any is available.
Link copied to clipboard
Gets the annotation type of the annotation.
Link copied to clipboard
open fun hasBitmap(): Boolean
Checks whether annotation is an annotationBitmap annotation.
Link copied to clipboard
Returns true if this Annotation can be rotated in the UI.
Link copied to clipboard
open fun setBitmap(@NonNull bitmap: Bitmap)
open fun setBitmap(@NonNull compressedBitmap: Array<Byte>)
Sets a custom bitmap for this stamp annotation.
Link copied to clipboard
open fun setIsSignature(isSignature: Boolean)
Sets whether this annotation is an electronic signature annotation.
Link copied to clipboard
open fun setRotation(rotation: Int)
open fun setRotation(rotation: Int, adjustBounds: Boolean)
open fun setRotation(rotation: Int, @NonNull contentSize: Size)
open fun setRotation(rotation: Int, @NonNull contentSize: Size, adjustBounds: Boolean)
Sets the rotation of this stamp.
Link copied to clipboard
open fun setStampType(@Nullable stampType: StampType)
Sets the type of stamp this is.
Link copied to clipboard
open fun setSubtitle(@Nullable subtitle: String)
Sets text displayed in a second smaller line of the stamp.
Link copied to clipboard
open fun setTitle(@Nullable title: String)
Sets text displayed in the first line of the stamp.
Link copied to clipboard
Produces Instant JSON representation of this annotation.
Link copied to clipboard
open fun updateTransformationProperties(@NonNull newBoundingBox: RectF, @NonNull oldBoundingBox: RectF)
Annotations may override this method to transform their properties (i.e.