layout | title | description | keywords | needGenerateH3Content | needAutoGenerateSidebar | noTitleIndex |
---|---|---|---|---|---|---|
default-layout |
DrawingItem - DynamsoftCameraEnhancer Android Edition API Reference |
The class DrawingItem of DynamsoftCameraEnhancer represents a base class for drawing items, which can be added to drawing layers to draw basic graphics on the view. |
drawing item, Java, Kotlin |
true |
true |
true |
The DrawingItem
class represents a base class for drawing items, which can be added to drawing layers to draw basic graphics on the view.
Assembly: package com.dynamsoft.dce
class DrawingItem
Method | Description |
---|---|
setDrawingStyleId |
Set the DrawingStyle of the DrawingItem . If a DrawingItem holds a drawing style ID, it will not use the default style of its layer. |
getDrawingStyleId |
Get the DrawingStyle of the DrawingItem . |
setState |
Set the state of the DrawingItem . |
getState |
Get the state of the DrawingItem . |
getCoordinateBase |
Get the coordinate base of the DrawingItem . The coordinate base is image by default. |
getMediaType |
Get the media type of the DrawingItem . |
addNote |
Add a note to the DrawingItem . |
getNote |
Get the specified Note . |
hasNote |
Check whether the specified Note exists. |
updateNote |
Update the content of the specified Note . |
deleteNote |
Remove the specified Note with the specified name. |
getAllNotes |
Get all Notes of this DrawingItem. |
clearNotes |
Remove all Notes of this DrawingItem. |
Set the DrawingStyle
of the DrawingItem
. If a DrawingItem
holds a drawing style ID, it will not use the default style of its layer.
void setDrawingStyleId(int style){}
Parameters
style
: Specifiy a style ID for the DrawingItem
.
Get the DrawingStyle
of the DrawingItem
.
int getDrawingStyleId(){}
Return Value
The style ID of the DrawingItem
.
Set the state of the DrawingItem
.
void setState(@EnumDrawingItemState int state){}
Parameters
state
: The state of the DrawingItem
.
The state of the DrawingItem
.
@EnumDrawingItemState int getState(){}
Return Value
The state of the DrawingItem
.
Get the coordinate base of the DrawingItem
. The coordinate base is image by default.
@EnumCoordinateBase int getCoordinateBase(){}
Return Value
The coordinate base of the DrawingItem
.
An abstract method to get the media type of the DrawingItem
.
abstract int getMediaType(){}
Return Value
The media type of the DrawingItem
.
Add a note to the DrawingItem
.
void addNote(Note note, boolean replace){}
Parameters
note
: The Note
object to add.
replace
: Whether to replace the previous one when there already exists a Note
with the same name.
Get the specified Note
.
Note getNote(String noteName){}
Parameters
noteName
: The name of the Note
.
Return Value
The specified Note
object.
Check whether the specified Note
exists.
boolean hasNote(String noteName){}
Parameters
noteName
: The name of the Note
.
Return Value
Whether the specified Note
exists.
Update the content of the specified Note
.
boolean updateNote(String noteName, String content, boolean mergeContent){}
Parameters
name
: The name of the Note
.
content
: The content to add or replace with.
mergeContent
: If true, merge the new content to the previous content. Otherwise, replace it.
Remove the specified Note
with the specified name.
void deleteNote(String noteName){}
Parameters
name
: The name of the Note
.
Get all Notes
of this DrawingItem.
Note[] getAllNotes(){}
Return Value
An array of Note
.
Remove all Notes
of this DrawingItem.
void clearNotes(){}