public class

CreateBitmapFromCustomStampTask

extends CustomAsyncTask<Params, Progress, Result>
java.lang.Object
   ↳ android.os.AsyncTask<Params, Progress, Result>
     ↳ com.pdftron.pdf.utils.CustomAsyncTask<Params, Progress, Result>
       ↳ com.pdftron.pdf.asynctask.CreateBitmapFromCustomStampTask

Class Overview

A class that asynchronously generates a bitmap from a certain custom rubber stamp.

Summary

Nested Classes
interface CreateBitmapFromCustomStampTask.OnCustomStampCreatedCallback Callback interface for when the bitmap of a custom rubber stamp is created. 
[Expand]
Inherited Fields
From class android.os.AsyncTask
Public Constructors
CreateBitmapFromCustomStampTask(Context context, CustomStampOption customStampOption)
Class constructor for creating a bitmap from a custom rubber stamp.
Public Methods
static Bitmap createBitmapFromCustomStamp(CustomStampOption customStampOption, int singleLineHeight, int twoLinesHeight)
Creates a bitmap from a specific custom rubber stamp.
static Bitmap createBitmapFromCustomStamp(CustomStampOption customStampOption, int singleLineHeight, int twoLinesHeight, int width)
Creates a bitmap from a specific custom rubber stamp.
void setOnCustomStampCreatedCallback(CreateBitmapFromCustomStampTask.OnCustomStampCreatedCallback callback)
Sets the callback for when the bitmap of a custom rubber stamp is created

Sets the callback to null when the task is cancelled.

[Expand]
Inherited Methods
From class android.os.AsyncTask
From class java.lang.Object

Public Constructors

public CreateBitmapFromCustomStampTask (Context context, CustomStampOption customStampOption)

Class constructor for creating a bitmap from a custom rubber stamp.

Parameters
context The context
customStampOption A custom rubber stamp option

Public Methods

public static Bitmap createBitmapFromCustomStamp (CustomStampOption customStampOption, int singleLineHeight, int twoLinesHeight)

Creates a bitmap from a specific custom rubber stamp.

This function maintains aspect ratio. See createBitmapFromCustomStamp(CustomStampOption, int, int, int).

Parameters
customStampOption A custom rubber stamp option
singleLineHeight The height of resulting bitmap if there is no second text in stamp
twoLinesHeight The height of resulting bitmap if stamp has a second text line
Returns
  • The bitmap of a stamp

public static Bitmap createBitmapFromCustomStamp (CustomStampOption customStampOption, int singleLineHeight, int twoLinesHeight, int width)

Creates a bitmap from a specific custom rubber stamp.

Parameters
customStampOption A custom rubber stamp option
singleLineHeight The height of resulting bitmap if there is no second text in stamp
twoLinesHeight The height of resulting bitmap if stamp has a second text line
width The width of resulting bitmap; -1 if it should be obtained automatically to maintain the aspect ratio
Returns
  • The bitmap of a stamp

public void setOnCustomStampCreatedCallback (CreateBitmapFromCustomStampTask.OnCustomStampCreatedCallback callback)

Sets the callback for when the bitmap of a custom rubber stamp is created

Sets the callback to null when the task is cancelled.

Parameters
callback The callback when the task is finished