public class SpenSurfaceView extends SurfaceView implements SpenSettingViewInterface, SpenSettingViewPenInterface, SpenSettingViewEraserInterface, SpenSettingViewRemoverInterface, SpenSettingViewTextInterface, SpenSettingViewShapeInterface, SpenSettingViewSelectionInterface
SpenSettingViewPenInterface.SpenBackgroundColorChangeListener| Modifier and Type | Field and Description |
|---|---|
static int |
PAGE_TRANSITION_EFFECT_LEFT
Page transition towards the left.
|
static int |
PAGE_TRANSITION_EFFECT_RIGHT
Page transition towards the right.
|
static int |
PAGE_TRANSITION_EFFECT_TYPE_SHADOW
Shadow transition for the page.
|
static int |
PAGE_TRANSITION_EFFECT_TYPE_SLIDE
Slide transition for page.
|
static int |
REPLAY_STATE_PAUSED
Replay is paused.
|
static int |
REPLAY_STATE_PLAYING
Replay is playing.
|
static int |
REPLAY_STATE_STOPPED
Replay is stopped.
|
static String |
STROKE_FRAME_KEY
Key stroke frame.
|
static int |
STROKE_FRAME_RETAKE
Retake stroke frame.
|
static int |
STROKE_FRAME_TAKE
Take stroke frame.
|
ACTION_COLOR_PICKER, ACTION_ERASER, ACTION_GESTURE, ACTION_NONE, ACTION_RECOGNITION, ACTION_SELECTION, ACTION_STROKE, ACTION_STROKE_REMOVER, ACTION_TEXT, TOOL_ERASER, TOOL_FINGER, TOOL_MOUSE, TOOL_MULTI_TOUCH, TOOL_PEN_BUTTON, TOOL_SPEN, TOOL_UNKNOWN| Constructor and Description |
|---|
SpenSurfaceView(Context context)
Creates an SpenSurfaceView instance.
|
SpenSurfaceView(Context context,
AttributeSet attrs)
Creates an SpenSurfaceView instance with the specified XML attributes.
|
SpenSurfaceView(Context context,
AttributeSet attrs,
int defStyle)
Creates an SpenSurfaceView instance with the specified XML attributes and a class-specific default
style.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelStroke()
Cancel the drawing stroke.
|
void |
cancelStrokeFrame()
Cancel strokeframe which is running now
|
Bitmap |
captureCurrentView(boolean includeBlank)
Get the bitmap of the current view.
|
Bitmap |
capturePage(float ratio)
Get the bitmap of the current page.
|
void |
changeStrokeFrame(SpenObjectContainer objectContainer)
Change from image of strokeframe to original frame or beautify frame
|
void |
clearHighlight()
Clear all highlighted areas.
|
void |
close()
Close the canvas view.
|
void |
closeControl()
Exit the Base Control.
|
Bitmap |
drawObjectList(ArrayList<SpenObjectBase> objectList)
Draw the specified object list and return the bitmap.
|
int |
getBlankColor()
Get the blank color.
|
int |
getCanvasHeight()
Get the current canvas height.
|
int |
getCanvasWidth()
Get the current canvas width.
|
SpenControlBase |
getControl()
Get the current control.
|
SpenSettingEraserInfo |
getEraserSettingInfo()
Get the eraser settings information.
|
PointF |
getFrameStartPosition()
Get the position of the real view.
|
float |
getMaxZoomRatio()
Get the maximum zoom ratio of the view.
|
float |
getMinZoomRatio()
Get the minimum zoom ratio of the view.
|
PointF |
getPan()
Get the current pan position.
|
SpenSettingPenInfo |
getPenSettingInfo()
Get the Pen settings information.
|
SpenSettingRemoverInfo |
getRemoverSettingInfo()
Get the Remover settings information.
|
int |
getReplayState()
Get the object replay state.
|
SpenSettingSelectionInfo |
getSelectionSettingInfo()
Get the selection settings information.
|
SpenSettingShapeInfo |
getShapeSettingInfo()
Get the Shape settings information.
|
ArrayList<SpenObjectStroke> |
getTemporaryStroke()
Get the list that was saved after the temporary stroke operation.
|
SpenSettingTextInfo |
getTextSettingInfo()
Get the text settings information.
|
int |
getToolTypeAction(int toolType)
Get the action of the specified tool type.
|
PointF |
getZoomPadPosition()
Get the position of the zoompad.
|
float |
getZoomRatio()
Get the zoom ratio of the view.
|
boolean |
isDottedLineEnabled()
Check if dotted line display is enabled.
|
boolean |
isHorizontalSmartScrollEnabled()
Check if horizontal smart scrolling is enabled.
|
boolean |
isHyperTextViewEnabled()
Check if the hypertext view is enabled.
|
boolean |
isScrollBarEnabled()
Check if the scroll bar is enabled.
|
boolean |
isSmartScaleEnabled()
Check if smart scaling is enabled.
|
boolean |
isToolTipEnabled()
Check if tool tips are enabled.
|
boolean |
isVerticalSmartScrollEnabled()
Check if vertical smart scrolling is enabled.
|
boolean |
isZoomable()
Check if zoom mode is enabled for the view.
|
boolean |
isZoomPadEnabled()
Check if the zoompad is enabled.
|
boolean |
onHoverEvent(MotionEvent event)
Called when a hover event occurs.
|
boolean |
onTouchEvent(MotionEvent event)
Called when a touch event is dispatched to a view.
|
void |
pauseReplay()
Pause replaying the objects drawn on the canvas.
|
void |
resumeReplay()
Resume replaying the objects drawn on the canvas.
|
void |
retakeStrokeFrame(Activity activity,
ViewGroup canvasLayout,
SpenObjectContainer strokeFrameContainer,
SpenStrokeFrameListener listener)
Retake StrokeFrame.
|
void |
setBackgroundColorChangeListener(Object object,
SpenSettingViewPenInterface.SpenBackgroundColorChangeListener listener)
Sets the background color changed event listener.
|
void |
setBlankColor(int color)
Set the specified blank color.
|
void |
setColorPickerListener(SpenColorPickerListener listener)
Sets the specified SpenColorPickerListener instance to receive color picker events.
|
void |
setControl(SpenControlBase control)
Set the specified control to the canvas.
|
void |
setControlListener(SpenControlListener listener)
Set the specified SpenControlListener instance to receive canvas control events.
|
void |
setDottedLineEnabled(boolean enable,
int intervalHeight,
int color,
int thickness,
float[] pathIntervals,
float phase)
Enable or disable dotted line display.
|
void |
setEraserChangeListener(SpenEraserChangeListener listener)
Set the specified SpenEraserChangeListener instance to receive eraser settings events.
|
void |
setEraserSettingInfo(SpenSettingEraserInfo info)
Set the specified eraser settings information.
|
void |
setFlickListener(SpenFlickListener listener)
Set the specified SpenFlickListener instance to receive flick events.
|
void |
setHighlight(ArrayList<SpenHighlightInfo> highlightInfo)
Set the specified highlight area.
|
void |
setHorizontalSmartScrollEnabled(boolean enable,
Rect leftScrollRegion,
Rect rightScrollRegion,
int responseTime,
int velocity)
Enable or disable horizontal smart scrolling.
|
void |
setHoverListener(SpenHoverListener listener)
Set the specified SpenHoverListener instance to receive hover events.
|
void |
setHyperTextListener(SpenHyperTextListener listener)
Set the specified SpenHyperTextListener instance to receive hypertext events.
|
void |
setHyperTextViewEnabled(boolean enable)
Enable or disable the hypertext view.
|
void |
setLongPressListener(SpenLongPressListener listener)
Set the specified SpenLongPressListener instance to receive long press events.
|
boolean |
setMaxZoomRatio(float ratio)
Set the specified maximum zoom ratio of the view.
|
boolean |
setMinZoomRatio(float ratio)
Set the specified minimum zoom ratio of the view.
|
boolean |
setPageDoc(SpenPageDoc pageDoc,
boolean isUpdate)
Set the specified PageDoc instance to the current view.
|
boolean |
setPageDoc(SpenPageDoc pageDoc,
int direction,
int type,
float centerY)
Set the specified PageDoc instance with the specified direction and transition type to the current view.
|
void |
setPageEffectListener(SpenPageEffectListener listener)
Set the specified SpenPageEffectListener instance to receive page effect events.
|
void |
setPan(PointF position)
Set the specified pan position and move to the position in the view.
|
void |
setPenChangeListener(SpenPenChangeListener listener)
Set the specified SpenPenChangeListener instance to receive Pen settings events.
|
void |
setPenDetachmentListener(SpenPenDetachmentListener listener)
Set the specified SpenPenDetachmentListener instance to receive Pen detachment events.
|
void |
setPenSettingInfo(SpenSettingPenInfo info)
Set the specified Pen settings information.
|
void |
setPreTouchListener(SpenTouchListener listener)
Set the specified SpenTouchListener instance to receive pre-touch events.
|
void |
setRemoverChangeListener(SpenRemoverChangeListener listener)
Set the specified SpenRemoverChangeListener instance to receive Remover events.
|
void |
setRemoverSettingInfo(SpenSettingRemoverInfo info)
Set the specified Remover settings information.
|
void |
setReplayListener(SpenReplayListener listener)
Set the specified SpenReplayListener instance to receive replay events.
|
void |
setReplayPosition(int index)
Set the specified position for replaying objects drawn on the canvas when replaying is paused.
|
void |
setReplaySpeed(int speed)
Set the specified speed for replaying objects drawn on the canvas.
|
void |
setScrollBarEnabled(boolean enable)
Enable or disable the canvas view scrollbar.
|
void |
setSelectionChangeListener(SpenSelectionChangeListener listener)
Set the specified SpenSelectionChangeListener instance to receive selection events.
|
void |
setSelectionSettingInfo(SpenSettingSelectionInfo info)
Set the specified selection settings information.
|
void |
setShapeChangeListener(SpenShapeChangeListener listener)
Set the specified SpenShapeChangeListener instance to receive text settings events.
|
void |
setShapeSettingInfo(SpenSettingShapeInfo info)
Set the specified Shape settings information.
|
void |
setSmartScaleEnabled(boolean enable,
Rect region,
int effectFrame,
int zoomOutResponseTime,
float zoomRatio)
Enable or disable smart scaling.
|
void |
setTextChangeListener(SpenTextChangeListener listener)
Set the specified SpenTextChangeListener instance to receive text settings events.
|
void |
setTextSettingInfo(SpenSettingTextInfo info)
Set the specified text settings information.
|
void |
setToolTipEnabled(boolean enable)
Enable or disable tool tips.
|
void |
setToolTypeAction(int toolType,
int action)
Set the specified action for the specified tool type.
|
void |
setTouchListener(SpenTouchListener listener)
Set the specified SpenTouchListener instance to receive touch events.
|
void |
setVerticalSmartScrollEnabled(boolean enable,
Rect topScrollRegion,
Rect bottomScrollRegion,
int responseTime,
int velocity)
Enable or disable vertical smart scrolling.
|
void |
setZoom(float centerX,
float centerY,
float ratio)
Set the specified zoom ratio of the view.
|
void |
setZoomable(boolean enable)
Enable or disable the zoom mode of the view.
|
void |
setZoomListener(SpenZoomListener listener)
Set the specified SpenZoomListener instance to receive zoom events.
|
void |
setZoomPadListener(SpenZoomPadListener listener)
Set the specified SpenZoomPadListener instance to receive zoom pad events.
|
void |
setZoomPadPosition(PointF point)
Set the specified the position of zoompad.
|
void |
startReplay()
Start replaying the objects drawn on the canvas.
|
void |
startTemporaryStroke()
Enable the cancel stroke mode.
|
void |
startZoomPad()
Starts the zoompad mode.
|
void |
stopReplay()
Stop replaying the objects drawn on the canvas.
|
void |
stopTemporaryStroke()
Disable the cancel stroke mode.
|
void |
stopZoomPad()
Stop the zoompad mode.
|
void |
takeStrokeFrame(Activity activity,
ViewGroup canvasLayout,
List<SpenObjectStroke> strokeList,
SpenStrokeFrameListener listener)
Take StrokeFrame.
|
void |
update()
Update the canvas.
|
void |
updateRedo(SpenPageDoc.HistoryUpdateInfo[] userDataList)
Update the screen after executing the redo command.
|
void |
updateScreen()
Update the screen.
|
void |
updateScreenFrameBuffer()
Deprecated.
|
void |
updateUndo(SpenPageDoc.HistoryUpdateInfo[] userDataList)
Update the screen after executing the undo command.
|
public static final int PAGE_TRANSITION_EFFECT_LEFT
setPageDoc(SpenPageDoc, int, int, float),
Constant Field Valuespublic static final int PAGE_TRANSITION_EFFECT_RIGHT
setPageDoc(SpenPageDoc, int, int, float),
Constant Field Valuespublic static final int PAGE_TRANSITION_EFFECT_TYPE_SHADOW
setPageDoc(SpenPageDoc, int, int, float),
Constant Field Valuespublic static final int PAGE_TRANSITION_EFFECT_TYPE_SLIDE
setPageDoc(SpenPageDoc, int, int, float),
Constant Field Valuespublic static final int REPLAY_STATE_STOPPED
getReplayState(),
Constant Field Valuespublic static final int REPLAY_STATE_PLAYING
getReplayState(),
Constant Field Valuespublic static final int REPLAY_STATE_PAUSED
getReplayState(),
Constant Field Valuespublic static final String STROKE_FRAME_KEY
public static final int STROKE_FRAME_TAKE
public static final int STROKE_FRAME_RETAKE
public SpenSurfaceView(Context context)
context - The Context for your application.SpenSurfaceView(Context, AttributeSet),
SpenSurfaceView(Context, AttributeSet, int)public SpenSurfaceView(Context context, AttributeSet attrs)
context - The Context for your application.attrs - The XML attributes for the view.SpenSurfaceView(Context),
SpenSurfaceView(Context, AttributeSet, int)public SpenSurfaceView(Context context, AttributeSet attrs, int defStyle)
context - The Context for your application.attrs - The XML attributes for the view.defStyle - The default style to apply to this view.
Set to 0 to apply no style beyond what is included in the theme.
This can be an attribute resource value retrieved from the current theme or an explicit style
resource.SpenSurfaceView(Context),
SpenSurfaceView(Context, AttributeSet)public void close()
public void update()
@Deprecated public void updateScreenFrameBuffer()
public void updateScreen()
public void updateUndo(SpenPageDoc.HistoryUpdateInfo[] userDataList)
userDataList - The data list for the previous state.public void updateRedo(SpenPageDoc.HistoryUpdateInfo[] userDataList)
userDataList - The data list for the previous state.public boolean onTouchEvent(MotionEvent event)
onTouchEvent in class Viewevent - The MotionEvent instance that contains the event information.public boolean onHoverEvent(MotionEvent event)
onHoverEvent in class Viewevent - The MotionEvent instance that contains the event information.public Bitmap captureCurrentView(boolean includeBlank)
includeBlank - Set to true to include a blank in the captured bitmap, set to false to capture only the screen without
the blank.OutOfMemoryError - Thrown if device run out of memorypublic Bitmap capturePage(float ratio)
ratio - The ratio to apply to the captured image.OutOfMemoryError - thrown if not enough memory to create captured bitmap.IllegalArgumentException - if create bitmap with size exceeds 32bits with 32bits OSNegativeArraySizeException - if create bitmap with size exceeds 32bits with 64bits OSpublic void setToolTypeAction(int toolType,
int action)
setToolTypeAction in interface SpenSettingViewInterfacetoolType - The tool type.
The valid values are:
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_UNKNOWN,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_FINGER,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_SPEN,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_MOUSE,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_ERASER,
For more information, see Field Detail in the SpenSettingViewInterface class reference.action - The action for the tool.
The valid values are:
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_NONE,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_GESTURE,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_STROKE,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_ERASER,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_COLOR_PICKER,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_SELECTION,
For more information, see Field Detail in the SpenSettingViewInterface class reference.public int getToolTypeAction(int toolType)
getToolTypeAction in interface SpenSettingViewInterfacetoolType - The tool type.
The valid values are:
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_UNKNOWN,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_FINGER,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_SPEN,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_MOUSE,
SpenSettingViewInterface. SpenSettingViewInterface.TOOL_ERASER,
For more information, see Field Detail in the SpenSettingViewInterface class reference.SpenSettingViewInterface.ACTION_NONE,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_GESTURE,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_STROKE,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_ERASER,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_COLOR_PICKER,
SpenSettingViewInterface. SpenSettingViewInterface.ACTION_SELECTION,
For more information, see Field Detail in the SpenSettingViewInterface class reference.public void setZoomable(boolean enable)
enable - Set to true to enable the zoom mode, set to false to disable the zoom mode.public boolean isZoomable()
public void setZoom(float centerX,
float centerY,
float ratio)
centerX - The X coordinate in pixels for the center.centerY - The Y coordinate in pixels for the center.ratio - The zoom ratio.public float getZoomRatio()
public PointF getFrameStartPosition()
public boolean setMaxZoomRatio(float ratio)
ratio - The maximum zoom ratio.public float getMaxZoomRatio()
public boolean setMinZoomRatio(float ratio)
ratio - The minimum zoom ratio.public float getMinZoomRatio()
public void setPan(PointF position)
position - The pan position.NullPointerException - If position is set nullpublic PointF getPan()
public void setBlankColor(int color)
color - The blank color.public int getBlankColor()
public int getCanvasWidth()
getCanvasWidth in interface SpenSettingViewInterfacepublic int getCanvasHeight()
getCanvasHeight in interface SpenSettingViewInterfacepublic void setBackgroundColorChangeListener(Object object, SpenSettingViewPenInterface.SpenBackgroundColorChangeListener listener)
setBackgroundColorChangeListener in interface SpenSettingViewPenInterfaceobject - Object layout which changed background color.listener - The callback listener for Changed BackgroundColorpublic void setTextSettingInfo(SpenSettingTextInfo info)
setTextSettingInfo in interface SpenSettingViewTextInterfaceinfo - The text settings information object.SpenSettingTextInfopublic SpenSettingTextInfo getTextSettingInfo()
getTextSettingInfo in interface SpenSettingViewTextInterfaceSpenSettingTextInfopublic void setPenSettingInfo(SpenSettingPenInfo info)
setPenSettingInfo in interface SpenSettingViewPenInterfaceinfo - The Pen settings information object.SpenSettingPenInfopublic SpenSettingPenInfo getPenSettingInfo()
getPenSettingInfo in interface SpenSettingViewPenInterfaceSpenSettingPenInfopublic void setEraserSettingInfo(SpenSettingEraserInfo info)
setEraserSettingInfo in interface SpenSettingViewEraserInterfaceinfo - The eraser settings information object.SpenSettingEraserInfopublic SpenSettingEraserInfo getEraserSettingInfo()
getEraserSettingInfo in interface SpenSettingViewEraserInterfaceSpenSettingEraserInfopublic void setRemoverSettingInfo(SpenSettingRemoverInfo info)
setRemoverSettingInfo in interface SpenSettingViewRemoverInterfaceinfo - The Remover settings information object.IllegalArgumentException - Thrown if info is null.SpenSettingRemoverInfopublic SpenSettingRemoverInfo getRemoverSettingInfo()
getRemoverSettingInfo in interface SpenSettingViewRemoverInterfaceSpenSettingRemoverInfopublic void setSelectionSettingInfo(SpenSettingSelectionInfo info)
setSelectionSettingInfo in interface SpenSettingViewSelectionInterfaceinfo - The selection settings information object.IllegalArgumentException - Thrown if info is null.SpenSettingSelectionInfopublic SpenSettingSelectionInfo getSelectionSettingInfo()
getSelectionSettingInfo in interface SpenSettingViewSelectionInterfaceSpenSettingSelectionInfopublic void setShapeSettingInfo(SpenSettingShapeInfo info)
setShapeSettingInfo in interface SpenSettingViewShapeInterfaceinfo - The Shape settings information object.SpenSettingShapeInfopublic SpenSettingShapeInfo getShapeSettingInfo()
getShapeSettingInfo in interface SpenSettingViewShapeInterfaceSpenSettingShapeInfopublic boolean setPageDoc(SpenPageDoc pageDoc, boolean isUpdate)
pageDoc - The PageDoc instance that you want to set.isUpdate - Set to true to update the screen, set to false to not update the screen.OutOfMemoryError - Thrown if there is insufficient memory available.public boolean setPageDoc(SpenPageDoc pageDoc, int direction, int type, float centerY)
pageDoc - The PageDoc instance that you want to set.direction - The page direction.
The valid values are: PAGE_TRANSITION_EFFECT_LEFT, PAGE_TRANSITION_EFFECT_RIGHT,
For more information, see Field Detail in this class reference.type - The page transition effect.
The valid values are: PAGE_TRANSITION_EFFECT_TYPE_SHADOW,
PAGE_TRANSITION_EFFECT_TYPE_SLIDE,
For more information, see Field Detail in this class reference.centerY - The position to move to after setPageDoc is called.OutOfMemoryError - Thrown if there is insufficient memory available.public void setSmartScaleEnabled(boolean enable,
Rect region,
int effectFrame,
int zoomOutResponseTime,
float zoomRatio)
enable - Set to true to enable smart scaling, set to false to disable smart scaling.region - The region in which smart scaling operates.effectFrame - The number of zoom effect frames.zoomOutResponseTime - The time to wait after hover exit event for the zoom out operation to start.zoomRatio - The hover zoom ratio.IllegalArgumentException - Thrown if region is null.public boolean isSmartScaleEnabled()
public void setHorizontalSmartScrollEnabled(boolean enable,
Rect leftScrollRegion,
Rect rightScrollRegion,
int responseTime,
int velocity)
enable - Set to true to enable horizontal smart scrolling, set to false to disable horizontal smart scrolling.leftScrollRegion - The region in which left smart scrolling operates.rightScrollRegion - The region in which right smart scrolling operates.responseTime - The time to wait after the hover exit event for the scroll activity to start.velocity - The scroll velocity in pixels.public boolean isHorizontalSmartScrollEnabled()
public void setVerticalSmartScrollEnabled(boolean enable,
Rect topScrollRegion,
Rect bottomScrollRegion,
int responseTime,
int velocity)
enable - Set to true to enable vertical smart scrolling, set to false to disable vertical smart scrolling.topScrollRegion - The region in which top smart scrolling operates.bottomScrollRegion - The region in which bottom smart scrolling operates.responseTime - The time to wait after the hover event for the scroll activity to start.velocity - The scroll velocity in pixels.public boolean isVerticalSmartScrollEnabled()
public void setControl(SpenControlBase control)
control - The control instance.IllegalArgumentException - Thrown if control is null.public SpenControlBase getControl()
public void closeControl()
closeControl in interface SpenSettingViewInterfacepublic void startReplay()
public void stopReplay()
public void pauseReplay()
public void resumeReplay()
public int getReplayState()
REPLAY_STATE_PAUSED, REPLAY_STATE_PLAYING,
REPLAY_STATE_STOPPED,
For more information, see Field Detail in this class reference.public void setReplaySpeed(int speed)
speed - The replay speed.
The valid values are:
0 : SPEED_SLOW
1 : SPEED_NORMAL
2 : SPEED_FAST.
The default value is SPEED_NORMALpublic void setReplayPosition(int index)
index - The object index on the canvas to set pageDoc.NullPointerException - Thrown when the native canvas is null or the index passed is less than 0.public void setDottedLineEnabled(boolean enable,
int intervalHeight,
int color,
int thickness,
float[] pathIntervals,
float phase)
enable - Set to true to enable dotted line display, set to false to disable dotted line display.intervalHeight - The interval of the dotted line height.color - The dotted line color.thickness - The dotted line thickness in pixels.pathIntervals - The array of ON and OFF distances for the dotted line.phase - The offset for the intervals array of the dotted line in pixels.public boolean isDottedLineEnabled()
public void setHighlight(ArrayList<SpenHighlightInfo> highlightInfo)
highlightInfo - The highlight information object.public void clearHighlight()
public void startTemporaryStroke()
public void stopTemporaryStroke()
public ArrayList<SpenObjectStroke> getTemporaryStroke()
startTemporaryStroke(),
stopTemporaryStroke()public void setScrollBarEnabled(boolean enable)
enable - Set to true to enable the scroll bar, set to false to disable the scroll bar.public boolean isScrollBarEnabled()
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 setToolTipEnabled(boolean enable)
enable - Set to true to enable tool tips, set to false to disable tool tips.public boolean isToolTipEnabled()
public void setZoomPadPosition(PointF point)
point - The position of the zoom pad.public PointF getZoomPadPosition()
public void startZoomPad()
public void stopZoomPad()
public boolean isZoomPadEnabled()
public Bitmap drawObjectList(ArrayList<SpenObjectBase> objectList)
objectList - The list of objects to draw.public void cancelStroke()
public void setPreTouchListener(SpenTouchListener listener)
listener - The SpenTouchListener instance to receive pre-touch events.public void setTouchListener(SpenTouchListener listener)
listener - The SpenTouchListener instance to receive touch events.public void setHoverListener(SpenHoverListener listener)
listener - The SpenHoverListener instance to receive hover events.public void setLongPressListener(SpenLongPressListener listener)
listener - The SpenLongPressListener instance to receive long press events.public void setReplayListener(SpenReplayListener listener)
listener - The SpenReplayListener instance to receive replay events.public void setColorPickerListener(SpenColorPickerListener listener)
listener - The SpenColorPickerListener instance to receive color picker events.public void setZoomListener(SpenZoomListener listener)
listener - The SpenZoomListener instance to receive zoom events.public void setPageEffectListener(SpenPageEffectListener listener)
listener - The SpenPageEffectListener instance to receive page effect events.public void setPenDetachmentListener(SpenPenDetachmentListener listener)
listener - The SpenPenDetachmentListener instance to receive Pen detachment events.public void setPenChangeListener(SpenPenChangeListener listener)
listener - The SpenPenChangeListener instance to receive Pen settings events.public void setEraserChangeListener(SpenEraserChangeListener listener)
listener - The SpenEraserChangeListener instance to receive eraser settings events.public void setRemoverChangeListener(SpenRemoverChangeListener listener)
listener - The SpenRemoverChangeListener instance to receive Remover events.public void setTextChangeListener(SpenTextChangeListener listener)
listener - The SpenTextChangeListener instance to receive text settings events.public void setShapeChangeListener(SpenShapeChangeListener listener)
listener - The SpenShapeChangeListener instance to receive text settings events.public void setSelectionChangeListener(SpenSelectionChangeListener listener)
listener - The SpenSelectionChangeListener instance to receive selection events.public void setControlListener(SpenControlListener listener)
listener - The SpenControlListener instance to receive canvas control events.public void setFlickListener(SpenFlickListener listener)
listener - The SpenFlickListener instance to receive flick events.public void setHyperTextListener(SpenHyperTextListener listener)
listener - The SpenHyperTextListener instance to receive hypertext events.public void setZoomPadListener(SpenZoomPadListener listener)
listener - The SpenZoomPadListener instance to receive zoom pad events.public void takeStrokeFrame(Activity activity, ViewGroup canvasLayout, List<SpenObjectStroke> strokeList, SpenStrokeFrameListener listener)
activity - The activity contains stroke framecanvasLayout - The Layout that view of StrokeFrame to insertstrokeList - The StrokeList for making StrokeFramelistener - The callback listener for result of takeStrokeFrameIllegalArgumentException - Thrown if activity or canvasLayout or strokeList is null.public void retakeStrokeFrame(Activity activity, ViewGroup canvasLayout, SpenObjectContainer strokeFrameContainer, SpenStrokeFrameListener listener)
activity - The activity contains stroke framecanvasLayout - The Layout that view of StrokeFrame to insertstrokeFrameContainer - The ObjectContainer received by OnComplete generated by takeStrokeFrame APIlistener - The callback listener for result of retakeStrokeFrameIllegalArgumentException - Thrown if activity or canvasLayout or strokeFrameContainer or
listener is null.public void changeStrokeFrame(SpenObjectContainer objectContainer)
objectContainer - The ObjectContainer received by OnComplete generated by takeStrokeFrame APIIllegalArgumentException - Thrown if objectContainer is null.public void cancelStrokeFrame()