public final class SpenObjectImage extends SpenObjectShape
SpenObjectShape since 4.0.0.SpenObjectShapeBase.ConnectedInfo| Modifier and Type | Field and Description |
|---|---|
static int |
BORDER_TYPE_DOT
Deprecated.
As of 4.0.0, replaced by
SpenLineStyleEffect. |
static int |
BORDER_TYPE_IMAGE
Deprecated.
As of 4.0.0, do not support.
|
static int |
BORDER_TYPE_NONE
Deprecated.
As of 4.0.0, replaced by
SpenLineStyleEffect. |
static int |
BORDER_TYPE_SHADOW
Deprecated.
As of 4.0.0, do not support..
|
static int |
BORDER_TYPE_SQUARE
Deprecated.
As of 4.0.0, replaced by
SpenLineStyleEffect. |
AUTO_FIT_BOTH, AUTO_FIT_HORIZONTAL, AUTO_FIT_NONE, AUTO_FIT_VERTICAL, CURSOR_POS_END, CURSOR_POS_START, ELLIPSIS_DOTS, ELLIPSIS_NONE, ELLIPSIS_TRIANGLE, FILL_TYPE_DARKEN, FILL_TYPE_DARKENLESS, FILL_TYPE_LIGHTEN, FILL_TYPE_LIGHTENLESS, FILL_TYPE_NORMAL, FILL_TYPE_TRANSPARENT, GRAVITY_BOTTOM, GRAVITY_CENTER, GRAVITY_TOP, IME_ACTION_DONE, IME_ACTION_GO, IME_ACTION_NEXT, IME_ACTION_NONE, IME_ACTION_PREVIOUS, IME_ACTION_SEARCH, IME_ACTION_SEND, IME_ACTION_UNSPECIFIED, INPUT_TYPE_DATETIME, INPUT_TYPE_NONE, INPUT_TYPE_NUMBER, INPUT_TYPE_PHONE, INPUT_TYPE_TEXT, TYPE_10_POINT_STAR, TYPE_32_POINT_STAR, TYPE_4_POINT_STAR, TYPE_5_POINT_STAR, TYPE_8_POINT_STAR, TYPE_ARC, TYPE_BENT_ARROW, TYPE_BENT_UP_ARROW, TYPE_BEVEL, TYPE_BLOCK_ARC, TYPE_CAN, TYPE_CHEVRON, TYPE_CHORD, TYPE_CIRCULAR_ARROW, TYPE_CROSS, TYPE_CUBE, TYPE_CURVED_DOWN_ARROW, TYPE_CURVED_LEFT_ARROW, TYPE_CURVED_RIGHT_ARROW, TYPE_CURVED_UP_ARROW, TYPE_DIAMOND, TYPE_DONUT, TYPE_DOUBLE_WAVE, TYPE_DOWN_ARROW, TYPE_DOWN_ARROW_CALLOUT, TYPE_DOWN_RIBBON, TYPE_EXPLOSION_1, TYPE_EXPLOSION_2, TYPE_FLOWCHART_CARD, TYPE_FLOWCHART_DELAY, TYPE_FLOWCHART_DISPLAY, TYPE_FLOWCHART_DOCUMENT, TYPE_FLOWCHART_MANUAL_INPUT, TYPE_FLOWCHART_OFF_PAGE_CONNECTOR, TYPE_FLOWCHART_PREDEFINED_PROCESS, TYPE_FLOWCHART_PUNCHED_TAPE, TYPE_FLOWCHART_SEQUENTIAL_ACCESS_STORAGE, TYPE_FLOWCHART_STORED_DATA, TYPE_FLOWCHART_TERMINATOR, TYPE_FOLDED_CORNER, TYPE_HEART, TYPE_HEXAGON, TYPE_HORIZONTAL_SCROLL, TYPE_L_SHAPE, TYPE_LEFT_ARROW, TYPE_LEFT_ARROW_CALLOUT, TYPE_LEFT_BRACE, TYPE_LEFT_BRACKET, TYPE_LEFT_RIGHT_ARROW, TYPE_LEFT_RIGHT_ARROW_CALLOUT, TYPE_LEFT_RIGHT_UP_ARROW, TYPE_LEFT_UP_ARROW, TYPE_LIGHTNING_BOLT, TYPE_MOON, TYPE_NO_SYMBOL, TYPE_NOTCHED_RIGHT_ARROW, TYPE_OVAL, TYPE_OVAL_CALLOUT, TYPE_PARALLELOGRAM, TYPE_PENTAGON, TYPE_PIE, TYPE_PLAQUE, TYPE_QUAD_ARROW, TYPE_QUAD_ARROW_CALLOUT, TYPE_RECTANGLE, TYPE_RECTANGULAR_CALLOUT, TYPE_REGULAR_PENTAGON, TYPE_RIGHT_ARROW, TYPE_RIGHT_ARROW_CALLOUT, TYPE_RIGHT_BRACE, TYPE_RIGHT_BRACKET, TYPE_RIGHT_TRIANGLE, TYPE_ROUNDED_RECTANGLE, TYPE_ROUNDED_RECTANGULAR_CALLOUT, TYPE_SMILEY_FACE, TYPE_STRIPED_RIGHT_ARROW, TYPE_SUN, TYPE_TRAPEZOID, TYPE_TRIANGLE, TYPE_U_TURN_ARROW, TYPE_UNKNOWN, TYPE_UP_ARROW, TYPE_UP_ARROW_CALLOUT, TYPE_UP_DOWN_ARROW, TYPE_UP_DOWN_ARROW_CALLOUT, TYPE_UP_RIBBON, TYPE_VERTICAL_SCROLL, TYPE_WAVECONNECTION_MODE_LOOSELY_COUPLED, CONNECTION_MODE_TIGHTLY_COUPLEDOBJECT_MINIMUM_SIZE, RESIZE_OPTION_DISABLE, RESIZE_OPTION_FREE, RESIZE_OPTION_KEEP_RATIO, SPEN_INFINITY_FLOAT, SPEN_INFINITY_INT, TYPE_CONTAINER, TYPE_IMAGE, TYPE_LINE, TYPE_NONE, TYPE_SHAPE, TYPE_STROKE, TYPE_TEXT_BOX| Constructor and Description |
|---|
SpenObjectImage()
Creates an SpenObjectImage instance
|
SpenObjectImage(boolean isTemplateObject)
Creates an SpenObjectImage instance with the specified template status.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearChangedFlag()
Clear the set changed flag.
The changed flag is set when object data is changed using the API. If this object is saved by SpenPageDoc, clear the flag. |
void |
copy(SpenObjectBase source)
Copy data from the Image object.
|
int |
getBorderType()
Deprecated.
As of 4.0.0, replaced by
SpenLineStyleEffect without an image boarder. |
Rect |
getCropRect()
Deprecated.
As of 4.0.0, do not support anymore.
|
RectF |
getDrawnRect()
Get the region that the rectangle takes up in the viewport.
|
float |
getHintTextVerticalOffset()
Deprecated.
As of 4.0.0, do not support.
|
Bitmap |
getImage()
Get the image bitmap.
|
Bitmap |
getImageBorder()
Deprecated.
As of 4.0.0, do not support.
|
float |
getImageBorderBottomWidth()
Deprecated.
As of 4.0.0, do not support.
|
float |
getImageBorderLeftWidth()
Deprecated.
As of 4.0.0, do not support.
|
Rect |
getImageBorderNinePatchRect()
Deprecated.
As of 4.0.0, do not support.
|
String |
getImageBorderPath()
Deprecated.
As of 4.0.0, do not support.
|
float |
getImageBorderRightWidth()
Deprecated.
As of 4.0.0, do not support.
|
float |
getImageBorderTopWidth()
Deprecated.
As of 4.0.0, do not support.
|
String |
getImagePath()
Get the source image file path.
|
int |
getLineBorderColor()
Deprecated.
As of 4.0.0, replaced by
SpenLineColorEffect. |
float |
getLineBorderWidth()
Deprecated.
As of 4.0.0, replaced by
SpenLineStyleEffect. |
Rect |
getNinePatchRect()
Get the nine patch rectangle.
|
boolean |
getTransparency()
Check if transparency is enabled for the image.
|
boolean |
isChanged()
Check if the object is changed.
The changed flag is set when object data is changed using the API. If this object is saved by SpenPageDoc, clear the flag. |
void |
setBorderType(int type)
Deprecated.
As of 4.0.0, replaced by
SpenLineStyleEffect without an image boarder. |
void |
setCropRect(Rect cropRect)
Deprecated.
As of 4.0.0, do not support anymore.
|
void |
setHintTextVerticalOffset(float offset)
Deprecated.
As of 4.0.0, do not support.
|
void |
setImage(Bitmap image)
Set the specified image.
|
void |
setImage(Bitmap image,
Rect ninePatchRect)
Set the specified image with the specified nine patch rectangle.
If crop information is already set, ignore the specified nine patch rectangle. To apply the specified nine patch, remove the crop information. In 3.x version, when this is called, flip information should be removed. |
void |
setImage(String filePath)
Set the image from the specified file.
In 3.x version, when this is called, flip information should be removed. |
void |
setImage(String filePath,
Rect ninePatchRect)
Set the image from the specified file with the specified nine patch rectangle.
If crop information is already set, ignore the specified nine patch rectangle. To apply the specified nine patch, remove the crop information. In 3.x version, when this is called, flip information should be removed. |
void |
setImageBorder(Bitmap image,
Rect ninePatchRect)
Deprecated.
As of 4.0.0, do not support.
|
void |
setImageBorderWidth(float left,
float top,
float right,
float bottom)
Deprecated.
As of 4.0.0, do not support.
|
void |
setLineBorderColor(int color)
Deprecated.
As of 4.0.0, replaced by
SpenLineColorEffect. |
void |
setLineBorderWidth(float width)
Deprecated.
As of 4.0.0, replaced by
SpenLineStyleEffect. |
void |
setRect(RectF rect,
boolean regionOnly)
Set the specified rectangle of the region.
ObjectImage forwards the regionOnly parameter to ObjectBase. |
void |
setTransparency(boolean transparency)
Enable or disable transparency for the image.
If transparency is enabled, the transparent area of the image should be ignored when you call the SpenPageDoc.findObject~ methods. If transparency is not enabled, the SpenPageDoc.findObject~ methods should consider the entire area of image to be opaque. |
appendTextParagraph, appendTextSpan, contain, findTextParagraph, findTextSpan, getAutoFitOption, getBottomBaseMargin, getBottomMargin, getControlPoint, getControlPoint, getControlPointCount, getCursorPosition, getEllipsisType, getFillEffect, getFillEffectType, getFillPath, getFillPath, getFillPathCount, getGravity, getHintText, getHintTextColor, getHintTextFontSize, getIMEActionType, getLeftBaseMargin, getLeftMargin, getPath, getPath, getRightBaseMargin, getRightMargin, getShapeType, getText, getTextInputType, getTextParagraph, getTextSpan, getTopBaseMargin, getTopMargin, getVerticalPan, insertText, insertTextAtCursor, isFlippedHorizontally, isFlippedVertically, isHintTextEnabled, isTextReadOnlyEnabled, moveControlPoint, parseHyperText, removeAllText, removeText, removeTextParagraph, removeTextSpan, replaceText, resetFillEffect, setAutoFitOption, setCursorPosition, setEllipsisType, setFillEffect, setGravity, setHintText, setHintTextColor, setHintTextEnabled, setHintTextFontSize, setIMEActionType, setMargin, setShapeType, setText, setTextInputType, setTextParagraph, setTextReadOnlyEnabled, setTextSpan, setVerticalPangetConnectedInfoCount, getConnectionMode, getLineColorEffect, getLineStyleEffect, getMagneticConnectionInfo, getMagneticConnectionPoint, getMagneticConnectionPoint, getMagneticConnectionPointCount, getNearestMagneticConnectionPointIndex, resetLineColorEffect, resetLineStyleEffect, setConnectionMode, setLineColorEffect, setLineStyleEffectattachFile, detachFile, equals, getAttachedFile, getExtraDataByteArray, getExtraDataInt, getExtraDataString, getExtraDataStringArray, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getRect, getResizeOption, getRotation, getRuntimeHandle, getSorDataInt, getSorDataString, getSorInfo, getSorPackageLink, getTemplateProperty, getType, getUserId, hasExtraDataByteArray, hasExtraDataInt, hasExtraDataString, hasExtraDataStringArray, hashCode, hasSorDataInt, hasSorDataString, isFlipEnabled, isMovable, isOutOfViewEnabled, isRecorded, isRotatable, isSelectable, isVisible, removeExtraDataByteArray, removeExtraDataInt, removeExtraDataString, removeExtraDataStringArray, removeSorDataInt, removeSorDataString, setExtraDataByteArray, setExtraDataInt, setExtraDataString, setExtraDataStringArray, setFlipEnabled, setMaxSize, setMinSize, setMovable, setOutOfViewEnabled, setRecorded, setResizeOption, setRotatable, setRotation, setSelectable, setSorDataInt, setSorDataString, setSorInfo, setSorPackageLink, setUserId, setVisibilitypublic static final int BORDER_TYPE_NONE
SpenLineStyleEffect.setBorderType(int),
getBorderType(),
Constant Field Valuespublic static final int BORDER_TYPE_SQUARE
SpenLineStyleEffect.setBorderType(int),
getBorderType(),
Constant Field Valuespublic static final int BORDER_TYPE_SHADOW
setBorderType(int),
getBorderType(),
Constant Field Valuespublic static final int BORDER_TYPE_DOT
SpenLineStyleEffect.setBorderType(int),
getBorderType(),
Constant Field Valuespublic static final int BORDER_TYPE_IMAGE
setBorderType(int),
getBorderType(),
setImageBorder(Bitmap image, Rect ninePatchRect),
Constant Field Valuespublic SpenObjectImage()
public SpenObjectImage(boolean isTemplateObject)
isTemplateObject - Set to true to create a template object.public void setImage(Bitmap image)
SpenFillImageEffect internally.image - The bitmap. if the bitmap is NULL, initialize.bitmap as an image file internally, If you do not need the
bitmap anymore, the bitmap.IllegalArgumentException - Thrown if the image is recycled.OutOfMemoryError - Thrown if not enough memory to create compress bitmap.public void setImage(String filePath)
filePath - The image file path.IllegalArgumentException - Thrown if filePath is invalid or null.OutOfMemoryError - Thrown if not enough memory to create compress bitmap.public void setImage(Bitmap image, Rect ninePatchRect)
image - The bitmap image.ninePatchRect - The center rectangle of the nine patch.IllegalArgumentException - Thrown if the image is recycled.OutOfMemoryError - Thrown if not enough memory to create compress bitmap.setImage(Bitmap),
setCropRect(Rect)public void setImage(String filePath, Rect ninePatchRect)
filePath - The path of the image file.ninePatchRect - The center rectangle of the nine patch.IllegalArgumentException - Thrown if the filePath is invalid.OutOfMemoryError - Thrown if not enough memory to create compress bitmap.public Rect getNinePatchRect()
RectF information.public Bitmap getImage()
public String getImagePath()
setImage(android.graphics.Bitmap)public void setRect(RectF rect, boolean regionOnly)
regionOnly parameter to ObjectBase.setRect in class SpenObjectBaserect - The rectangle of region.regionOnly - Set to true to not allow the internal data to be changed, set to false to let rectangle change the
internal data.public void setImageBorder(Bitmap image, Rect ninePatchRect)
image - The image border bitmap.ninePatchRect - The center rectangle of the nine patch.IllegalArgumentException - Thrown if the image passed is a recycled image.getImageBorderPath(),
getImageBorderNinePatchRect()public Bitmap getImageBorder()
public String getImageBorderPath()
setImageBorder(Bitmap image, Rect ninePatchRect)public Rect getImageBorderNinePatchRect()
setImageBorder(Bitmap image, Rect ninePatchRect)public void setCropRect(Rect cropRect)
cropRect information.cropRect - The rectangle to be cropped.public Rect getCropRect()
public void setLineBorderColor(int color)
SpenLineColorEffect.color - The ARGB8888 format color to set border.public int getLineBorderColor()
SpenLineColorEffect.public void setLineBorderWidth(float width)
SpenLineStyleEffect.width - The border width in pixels.IllegalArgumentException - Thrown if the width is less than 0.public float getLineBorderWidth()
SpenLineStyleEffect.public void setImageBorderWidth(float left,
float top,
float right,
float bottom)
left - The border left width in pixels.top - The border top width in pixels.right - The border right width in pixels.bottom - The border bottom width in pixels.IllegalArgumentException - Thrown if the arguments passed are invalid.public float getImageBorderLeftWidth()
setImageBorderWidth(float left, float top, float right, float bottom)public float getImageBorderTopWidth()
setImageBorderWidth(float left, float top, float right, float bottom)public float getImageBorderRightWidth()
setImageBorderWidth(float left, float top, float right, float bottom)public float getImageBorderBottomWidth()
setImageBorderWidth(float left, float top, float right, float bottom)public void setBorderType(int type)
SpenLineStyleEffect without an image boarder.type - The border typeIllegalArgumentException - Thrown if the border type passed is invalid.BORDER_TYPE_DOTpublic int getBorderType()
SpenLineStyleEffect without an image boarder.BORDER_TYPE_DOTpublic void setTransparency(boolean transparency)
transparency - Set to true to enable transparency for the image.SpenPageDoc.findObjectAtPosition(int, float, float),
SpenPageDoc.findObjectInClosedCurve(int, PointF[]),
SpenPageDoc.findObjectInRect(int, RectF, boolean)public boolean getTransparency()
true, transparency is enabled for the image.setTransparency(boolean)public void setHintTextVerticalOffset(float offset)
offset - The vertical offset of the hint text in pixels.IllegalArgumentException - If offset is less than 0.public float getHintTextVerticalOffset()
public void clearChangedFlag()
SpenObjectBaseclearChangedFlag in class SpenObjectBasepublic boolean isChanged()
SpenObjectBaseisChanged in class SpenObjectBasetrue if object data is changed or created. Otherwise false.public RectF getDrawnRect()
SpenObjectBasegetDrawnRect in class SpenObjectBaseSpenObjectBase.getRect()public void copy(SpenObjectBase source)
copy in class SpenObjectShapeBasesource - The source object.IllegalArgumentException - Thrown if class type is different.
Or if source is null.SpenObjectShapeBase.copy(SpenObjectBase)