QuadDrawingItem Class
QuadDrawingItem
is a subclass of DrawingItem
. Dynamsoft Camera Enhancer will draw the QuadDrawingItem
on the UI if it is created and added to the DCECameraView
or DCEImageEditorView
.
class com.dynamsoft.dce.QuadDrawingItem extends DrawingItem
Method | Descriptions |
---|---|
QuadDrawingItem |
The constructor of QuadDrawingItem . Create an instance of QuadDrawingItem . |
getMediaType |
Get the media type of the QuadDrawingItem . |
getQuad |
Get the Quad of the QuadDrawingItem . |
getDrawingStyleId |
Get the drawing style of the current drawing item. |
setDrawingStyleId |
Set the drawing style of the current drawing item. |
getState |
Get the state of the current drawing item. |
setState |
Set the state of the current drawing item. |
QuadDrawingItem
The constructor of QuadDrawingItem
. Create an instance of QuadDrawingItem
.
public QuadDrawingItem(com.dynamsoft.core.Quadrilateral quad);
Parameters
quad
: The Quadrilateral
that indicates the location of the QuadDrawingItem
.
Code Snippet
DrawingItem drawingItem = new QuadDrawingItem(quad);
getMediaType
Get the media type of the QuadDrawingItem
.
public EnumDrawingItemMeidaType getMediaType();
Return Value
The media type of the QuadDrawingItem
.
Code Snippet
EnumDrawingItemMediaType mediaType = drawingItem.getMediaType();
getQuad
Get the Quad
of the QuadDrawingItem
.
public com.dynamsoft.core.Quadrilateral getQuad();
Return Value
The Quadrilateral
that indicates the location of the QuadDrawingItem
.
Code Snippet
com.dynamsoft.core.Quadrilateral quad = drawingItem.getQuad();
getDrawingStyleId
Get the ID of the DrawingStyle
that is applied on this DrawingItem
.
public int getDrawingStyleId();
Return Value
An int value that representing the style ID.
Code Snippet
int styleId = drawingItem.getDrawingStyleId();
setDrawingStyleId
Set a DrawingStyle
by ID for the DrawingItem
.
public void setDrawingStyleId(int style);
Parameters
style
: An int value that representing the style ID.
Code Snippet
drawingItem.setDrawingStyleId(0);
getState
Get the status of the DrawingItem
.
public EnumDrawingItemState getState();
Return Value
The value that indicates the state of the DrawingItem
. View all available DrawingItem
states in EnumDrawingItemState
.
Code Snippet
EnumDrawingItemState state = drawingItem.getState();
setState
Set the status of the DrawingItem
.
public void setState(EnumDrawingItemState state);
Parameters
state
: The value that indicates the state of the DrawingItem
. View all available DrawingItem
states in EnumDrawingItemState
.
Code Snippet
drawingItem.setState(EnumDrawingItemState.DIS_SELECTED)