Companion

object Companion

Properties

Link copied to clipboard
const val ID_NOT_SET: Long

Indicates that the id has not been set.

Functions

Link copied to clipboard
fun createInkSignature(@ColorInt inkColor: Int, lineWidthPdf: Float, lines: List<List<PointF>>, biometricSignatureData: BiometricSignatureData? = null, drawWidthRatio: Float = 1.0f): Signature

Helper method to create an ink signature. See Signature constructor for details on parameters.

Link copied to clipboard
fun createStampSignature(bitmap: Bitmap, stampRect: RectF, biometricSignatureData: BiometricSignatureData? = null, drawWidthRatio: Float = 1.0f): Signature

Helper method to create a stamp signature. See Signature constructor for details on parameters.

Link copied to clipboard
fun fromJson(signatureJson: JSONObject): Signature

Creates a signature object by parsing the provided JSON object. The JSON object you provide should be initially obtained via toJson.

fun fromJson(id: Long, signatureJson: JSONObject): Signature

Creates a signature object by parsing the provided JSON object. The JSON object you provide should be initially obtained via toJson. This method also allows you to specify an id which will be assigned to the signature created from the given JSON. This id will also be assigned by the framework when retrieving the signatures from the default storage.

Link copied to clipboard
fun textToBitmap(text: String, font: Font, @ColorInt color: Int, @FloatRange(from = 0.0) scaleFactor: Float, displayMetrics: DisplayMetrics): Bitmap

Creates a bitmap from text that the user typed and a font the user chose.