Signature

abstract class Signature : Parcelable

Represents a single signature (or signature item). To create an InkAnnotation or from this signature use the toInkAnnotation and toStampAnnotation methods. You can check the signature annotation type through getAnnotationType.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Indicates that the bitmap has not been set.
Link copied to clipboard
val ID_NOT_SET: Long = -1
Indicates that the id has not been set.

Functions

Link copied to clipboard
open fun create(@NonNull bitmap: Bitmap, @NonNull rect: RectF, @Nullable biometricSignatureData: BiometricSignatureData, drawWidthRatio: Float): Signature
open fun create(@ColorInt inkColor: Int, lineWidthPdf: Float, @NonNull lines: List<List<PointF>>, @Nullable biometricSignatureData: BiometricSignatureData, drawWidthRatio: Float): Signature
Creates the Signature.
Link copied to clipboard
open fun fromJson(@NonNull signatureJson: JSONObject): Signature
open fun fromJson(id: Long, @NonNull signatureJson: JSONObject): Signature
Creates a signature object by parsing the provided JSON object.
Link copied to clipboard
Gets the annotation type of the signature, which can either be InkAnnotation or StampAnnotation.
Link copied to clipboard
Gets the biometric data that was collected with this signature.
Link copied to clipboard
Gets the bitmap used for rendering the image signature, or null if the signature is not an image signature.
Link copied to clipboard
abstract fun getBitmapIdentifier(): Int
Gets the bitmap identifier used for rendering the image signature, or BITMAP_NOT_SET if the signature is not represented by a bitmap.
Link copied to clipboard
Returns bounding box of the signature data in pdf coordinates.
Link copied to clipboard
abstract fun getId(): Long
Signature id number used in signature database.
Link copied to clipboard
abstract fun getInkColor(): Int
Gets color used for signature ink.
Link copied to clipboard
abstract fun getLines(): List<List<PointF>>
Access list of signature lines.
Link copied to clipboard
abstract fun getLineWidth(): Float
Gets signature line width.
Link copied to clipboard
Gets the ratio of signature width to width of the drawing view used when drawing the signature.
Link copied to clipboard
abstract fun getStampRect(): RectF
Bounding rectangle for this signature's bitmap.
Link copied to clipboard
open fun textToBitmap(@NonNull text: String, @NonNull font: Font, @ColorInt color: Int, @FloatRange(from = 0) scaleFactor: Float, @NonNull displayMetrics: DisplayMetrics): Bitmap
Creates a bitmap from text that the user typed and a font the user chose.
Link copied to clipboard
open fun toInkAnnotation(@IntRange(from = 0) pageIndex: Int): InkAnnotation
open fun toInkAnnotation(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull touchPoint: PointF): InkAnnotation
open fun toInkAnnotation(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull targetRect: RectF): InkAnnotation
Builds ink annotation from signature data.
Link copied to clipboard
Converts a signature into a JSON object.
Link copied to clipboard
open fun toStampAnnotation(@IntRange(from = 0) pageIndex: Int): StampAnnotation
open fun toStampAnnotation(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull touchPoint: PointF): StampAnnotation
open fun toStampAnnotation(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull targetRect: RectF): StampAnnotation
Builds stamp annotation from signature data.