public class SpenCapturePage extends Object
| Constructor and Description |
|---|
SpenCapturePage(Context context)
Creates an SpenCapturePage instance.
|
| Modifier and Type | Method and Description |
|---|---|
Bitmap |
capturePage(float ratio)
Get the bitmap of the current page at the specified resizing ratio.
|
Bitmap |
captureRect(RectF rect)
Get the bitmap of the specified area.
|
void |
close()
Close the captured page.
|
void |
compressPage(String filename,
float ratio)
Compress the current page into a PNG file with the specified file name and the specified resizing ratio.
|
boolean |
isHyperTextViewEnabled()
Check if the hypertext view is enabled.
|
boolean |
isThumbnailEnabled()
Check if the thumbnail is enabled.
|
void |
setHyperTextViewEnabled(boolean enable)
Enable or disable the hypertext view.
|
void |
setPageDoc(SpenPageDoc pageDoc)
Set the specified SpenPageDoc instance.
|
void |
setThumbnailEnabled(boolean enable)
Enable or disable storing the thumbnail.
|
public SpenCapturePage(Context context)
context - The Context for your application.public void setPageDoc(SpenPageDoc pageDoc)
pageDoc - The SpenPageDoc instance.public void compressPage(String filename, float ratio)
filename - The file name for the PNG file that you want to createratio - The resizing ratio for the PNG file.
Ratio must be greater than 0 and below 5. ( 0 < ratio <= 5)OutOfMemoryError - if not enough memory to create compress bitmapIllegalArgumentException - if create bitmap with size exceeds 32bits
or if create bitmap failed when invalid datapublic Bitmap captureRect(RectF rect)
rect - The area to capture.OutOfMemoryError - thrown if not enough memory to create captured .public Bitmap capturePage(float ratio)
ratio - The ratio when capture pageOutOfMemoryError - thrown if not enough memory to create captured bitmap.public void close()
public void setHyperTextViewEnabled(boolean enable)
enable - Set to true to enable the hypertext view, set to false to disable the hypertext view.public boolean isHyperTextViewEnabled()
public void setThumbnailEnabled(boolean enable)
enable - Set to true to enable the thumbnail, set to false to disable the thumbnail.public boolean isThumbnailEnabled()