public abstract class CPDFAnnotation
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CPDFAnnotation.AppearanceType |
static class |
CPDFAnnotation.BorderEffectIntensity |
static class |
CPDFAnnotation.CPDFBorderEffectType |
static interface |
CPDFAnnotation.Flags
A set of flags specifying various characteristics of the annotation.
|
static class |
CPDFAnnotation.MarkState |
static class |
CPDFAnnotation.MediaSourceType
Media resource type
|
static class |
CPDFAnnotation.ReviewState |
static class |
CPDFAnnotation.Type
Annotation types
|
| Modifier and Type | Field and Description |
|---|---|
long |
annotPtr |
int |
index |
CPDFPage |
pdfPage |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addToPage() |
abstract void |
applyAnnotationAttr(CPDFAnnotationUndoAttr annotationAttr) |
void |
attachPage(CPDFPage pdfPage) |
void |
close()
When the object is no longer in use, call this method to release resources.
|
CPDFReplyAnnotation |
createReplyAnnotation()
Create a reply annotation.
|
void |
disableListenAttrChanged(boolean recordCurrentStatus)
Do not listen to attribute changes.
|
void |
enableListenAttrChanged()
Listen for attribute changes.
|
boolean |
equal(CPDFAnnotation annotation) |
boolean |
equal(long annotPtr1) |
CPDFReplyAnnotation[] |
getAllReplyAnnotations()
Get all reply annotations to the annotation.
|
abstract CPDFAnnotationUndoAttr |
getAnnotationAttr() |
int |
getAnnotIndexFromNative() |
long |
getAnnotPtr() |
boolean |
getAppearance(android.graphics.Bitmap bitmap)
Gets annotation appearance with Bitmap.
|
boolean |
getAppearanceByPixel(android.graphics.Bitmap bitmap,
CPDFAnnotation.AppearanceType type)
Gets annotation appearance by pixel with Bitmap.
|
java.lang.String |
getAppearanceDebugInfo() |
int |
getApRotation()
Gets rotation angle of annotation appearance.
|
CPDFAnnotation.BorderEffectIntensity |
getBordEffectIntensity() |
CPDFAnnotation.CPDFBorderEffectType |
getBordEffectType() |
float |
getBorderWidth()
Gets border width of annotation.
|
java.lang.String |
getContent()
Gets annotation content.
|
CPDFDate |
getCreationDate()
Gets the creation date of annotation.
|
int |
getFlags()
Gets annotation flags.
|
CPDFAnnotation.MarkState |
getMarkedAnnotState()
Get the mark state of the reply annotation.
|
java.lang.String |
getName()
Not in use currently
|
CPDFDate |
getRecentlyModifyDate()
Gets the modification date of annotation.
|
android.graphics.RectF |
getRect()
Gets annotation rectangle.
|
CPDFAnnotation.ReviewState |
getReviewAnnotState()
Get the review state of the reply annotation.
|
android.graphics.PointF[] |
getRotateRectPoint() |
int |
getRotation() |
android.graphics.RectF |
getSourceRect() |
int |
getStampBaseApRotationDegrees() |
java.lang.String |
getStampImageSourcePath() |
java.lang.String |
getTitle()
Not in use currently
|
CPDFAnnotation.Type |
getType()
Gets annotation type, more:
CPDFAnnotation.Type |
android.graphics.PointF[] |
getVertices() |
boolean |
hasAp()
Whether annotation has appearance.
|
boolean |
hasImageAppearance() |
boolean |
isAllowCorrectAnnotationAp()
Whether to allow to correct annotation appearance
|
boolean |
isHidden()
This is a convenience property that checks for `CPDFAnnotationFlagHidden` in `flags`.
|
boolean |
isLocked()
This is a convenience property that checks for `CPDFAnnotationFlagLocked` in `flags`.
|
boolean |
isReadOnly()
This is a convenience property that checks for `CPDFAnnotationFlagReadOnly` in `flags`.
|
boolean |
isReplyAnnotation() |
boolean |
isValid()
Whether annotation object is valid.
|
void |
markStaleFromPageCache() |
boolean |
moveAnnotIndex(int annotIndex) |
boolean |
removeAp()
Removes annotation appearance.
|
boolean |
removeFromPage()
Removes annotation from PDF page
|
void |
setAllowCorrectAnnotationAp(boolean allowCorrectAnnotationAp)
Sets whether to allow to correct annotation appearance
|
boolean |
setAnnotTop() |
boolean |
setBordEffectIntensity(CPDFAnnotation.BorderEffectIntensity intensity) |
boolean |
setBordEffectType(CPDFAnnotation.CPDFBorderEffectType type) |
boolean |
setBorderWidth(float width)
Sets border width of annotation.
|
boolean |
setContent(java.lang.String content)
Sets annotation content.
|
boolean |
setCreationDate(CPDFDate date)
Sets the creation date of annotation.
|
boolean |
setFlags(int flag)
Sets annotation flag.
|
boolean |
setHidden(boolean isHidden)
This is a convenience property that checks for `CPDFAnnotationFlagHidden` in `flags`.
|
boolean |
setLocked(boolean isLocked)
This is a convenience property that checks for `CPDFAnnotationFlagLocked` in `flags`.
|
boolean |
setMarkedAnnotState(CPDFAnnotation.MarkState markState)
Set mark state of the reply annotation.
|
boolean |
setName(java.lang.String name)
Not in use currently
|
void |
setOnAnnotationChangedListener(OnAnnotationChangedListener onAnnotationChanged) |
boolean |
setReadOnly(boolean isReadOnly)
This is a convenience property that checks for `CPDFAnnotationFlagReadOnly` in `flags`.
|
boolean |
setRecentlyModifyDate(CPDFDate date)
Sets the modification date of annotation.
|
boolean |
setRect(android.graphics.RectF rect)
Sets annotation rectangle.
|
boolean |
setReviewAnnotState(CPDFAnnotation.ReviewState reviewState)
Set the review state of the reply annotation.
|
boolean |
setRotation(int angle) |
boolean |
setSourceRect(android.graphics.RectF rect) |
boolean |
setStampBaseApRotationDegrees(int rotationDegrees) |
boolean |
setStampImageSourcePath(java.lang.String imagePath) |
boolean |
setTitle(java.lang.String title)
Not in use currently
|
boolean |
setVertices(android.graphics.PointF[] pointArr) |
boolean |
updateAp()
Updates annotation appearance.
|
boolean |
updateApWithBitmap(android.graphics.Bitmap bitmap)
Upadates annotation appearance by Bitmap.
|
boolean |
updateApWithBitmap(android.graphics.Bitmap bitmap,
boolean correctRotation) |
boolean |
updateApWithBitmap(android.graphics.Bitmap bitmap,
boolean correctRotation,
CPDFImageScaleType imageScaleType) |
boolean |
updateApWithBitmapFitXY(android.graphics.Bitmap bitmap,
boolean correctRotation) |
boolean |
updateApWithBitmapFitXY(android.graphics.Bitmap bitmap,
int rotation) |
boolean |
updateApWithImage(java.lang.String imagePath,
java.lang.String smaskPath)
Update annotation appearance with image.
|
public long annotPtr
public CPDFPage pdfPage
public int index
public boolean setMarkedAnnotState(CPDFAnnotation.MarkState markState)
markState - Mark state.public CPDFAnnotation.MarkState getMarkedAnnotState()
public boolean setReviewAnnotState(CPDFAnnotation.ReviewState reviewState)
reviewState - Review state.public CPDFAnnotation.ReviewState getReviewAnnotState()
public abstract CPDFAnnotationUndoAttr getAnnotationAttr()
public abstract void applyAnnotationAttr(CPDFAnnotationUndoAttr annotationAttr)
public CPDFAnnotation.Type getType()
CPDFAnnotation.Typepublic boolean isReplyAnnotation()
public boolean isValid()
public void markStaleFromPageCache()
public boolean setVertices(android.graphics.PointF[] pointArr)
public boolean setBordEffectType(CPDFAnnotation.CPDFBorderEffectType type)
public boolean setBordEffectIntensity(CPDFAnnotation.BorderEffectIntensity intensity)
public android.graphics.PointF[] getVertices()
public CPDFAnnotation.CPDFBorderEffectType getBordEffectType()
public CPDFAnnotation.BorderEffectIntensity getBordEffectIntensity()
public boolean setRect(android.graphics.RectF rect)
CPDFPage.convertRectToPage(boolean, float, float, RectF).rect - Rectangle on the page.public android.graphics.RectF getRect()
CPDFPage.convertRectToPage(boolean, float, float, RectF).public boolean setFlags(int flag)
flag - Annotation flag.public int getFlags()
public boolean setHidden(boolean isHidden)
isHidden - True is hide,false otherwisepublic boolean isHidden()
public boolean setReadOnly(boolean isReadOnly)
isReadOnly - True is readOnly,false otherwisepublic boolean isReadOnly()
public boolean setLocked(boolean isLocked)
isLocked - True is locked,false is unlockedpublic boolean isLocked()
public boolean setBorderWidth(float width)
width - Border width of annotation.public float getBorderWidth()
public boolean setContent(java.lang.String content)
content - Annotation content.public java.lang.String getContent()
public boolean setCreationDate(CPDFDate date)
date - Creation date of annotation.public CPDFDate getCreationDate()
public boolean setRecentlyModifyDate(CPDFDate date)
date - Modification date of annotation.public CPDFDate getRecentlyModifyDate()
public boolean setTitle(java.lang.String title)
public java.lang.String getTitle()
public boolean setName(java.lang.String name)
public java.lang.String getName()
public boolean hasAp()
public java.lang.String getAppearanceDebugInfo()
public boolean hasImageAppearance()
public boolean removeAp()
public int getApRotation()
public int getStampBaseApRotationDegrees()
public boolean setStampBaseApRotationDegrees(int rotationDegrees)
public java.lang.String getStampImageSourcePath()
public boolean setStampImageSourcePath(java.lang.String imagePath)
public boolean updateAp()
public boolean updateApWithImage(java.lang.String imagePath,
java.lang.String smaskPath)
imagePath - Original image pathsmaskPath - Mask image pathpublic boolean updateApWithBitmap(android.graphics.Bitmap bitmap)
bitmap - Image resource.public boolean updateApWithBitmap(android.graphics.Bitmap bitmap,
boolean correctRotation)
public boolean updateApWithBitmapFitXY(android.graphics.Bitmap bitmap,
boolean correctRotation)
public boolean updateApWithBitmapFitXY(android.graphics.Bitmap bitmap,
int rotation)
public boolean updateApWithBitmap(android.graphics.Bitmap bitmap,
boolean correctRotation,
CPDFImageScaleType imageScaleType)
public boolean getAppearance(android.graphics.Bitmap bitmap)
bitmap - Bitmappublic boolean getAppearanceByPixel(android.graphics.Bitmap bitmap,
CPDFAnnotation.AppearanceType type)
bitmap - Bitmappublic boolean isAllowCorrectAnnotationAp()
public void setAllowCorrectAnnotationAp(boolean allowCorrectAnnotationAp)
allowCorrectAnnotationAp - Whether to allow to correct annotation appearancepublic boolean removeFromPage()
public boolean addToPage()
public boolean equal(CPDFAnnotation annotation)
public boolean equal(long annotPtr1)
public long getAnnotPtr()
public void setOnAnnotationChangedListener(OnAnnotationChangedListener onAnnotationChanged)
public void disableListenAttrChanged(boolean recordCurrentStatus)
CPDFUndoManager will not record the state when attributes change.
Generally used when you need to refresh data in real time and update the UI, to prevent recording a lot of useless data.recordCurrentStatus - Whether to record the current annotation state. If true,
the current annotation state will be added to CPDFUndoManager when enableListenAttrChanged() is called,
and you can use CPDFUndoManager.undo() to restore it.
Otherwise, the opposite.public void enableListenAttrChanged()
CPDFUndoManager will record the state when attributes change.public void close()
public boolean setAnnotTop()
public int getAnnotIndexFromNative()
public boolean moveAnnotIndex(int annotIndex)
public void attachPage(CPDFPage pdfPage)
public CPDFReplyAnnotation createReplyAnnotation()
public CPDFReplyAnnotation[] getAllReplyAnnotations()
public boolean setRotation(int angle)
public int getRotation()
public android.graphics.RectF getSourceRect()
public boolean setSourceRect(android.graphics.RectF rect)
public android.graphics.PointF[] getRotateRectPoint()