DCEImageEditorView
DCEImageEditorView is the class that enable users to add UI configurations on a static image.
class com.dynamsoft.dce.DCEImageEditorView
| Method Name | Description |
|---|---|
setOriginalImage |
Set the background image of the view with an original image. |
getOriginalImage |
Get the current backgroud image. |
getDrawingLayer |
Get the DCEDrawingLayer instance with the layer ID. |
createDrawingLayer |
Create a user-defined DCEDrawingLayer instance. |
getSelectedDrawingItem |
Get the selected drawing item. |
setOriginalImage
Set the background image of the view with an original image.
public void setOriginalImage(ImageData imageData);
Parameters
imageData: The imageData of the image.
Code Snippet
mIEV = (DCEImageEditorView) findViewById(R.id.iev);
mImgData = getIntent().getIntExtra("imagedata");
mIEV.setOriginalImage(mImgData);
getOriginalImage
Get the current backgroud image.
public ImageData getOriginalImage();
Return Value
The imageData of the image.
Code Snippet
ImageData image = imageEditorView.getOriginalImage();
getDrawingLayer
Get the instance of the target DrawingLayer. The target DrawingLayer will be created if it does not exist.
public DCEDrawingLayer getDrawingLayer(int id);
Parameters
id: The id of the DrawingLayer.
Available ID List
| Layer | ID |
|---|---|
| DDN_LAYER_ID | 1 |
| DBR_LAYER_ID | 2 |
| DLR_LAYER_ID | 3 |
| USER_DEFINED_LAYER_BASE_ID | 100 |
Return Value
An instance of DCEDrawingLayer.
Code Snippet
DCEDrawingLayer drawingLayer = dceImageEditorView.getDrawingLayer(DCEDrawingLayer.DDN_LAYER_ID);
createDrawingLayer
Create a user-defined DrawingLayer instance.
public DCEDrawingLayer createDrawingLayer();
Return Value
An instance of DCEDrawingLayer.
Code Snippet
DCEDrawingLayer drawingLayer = dceImageEditorView.createDrawingLayer();
getSelectedDrawingItem
Get the user selected DrawingItem.
public DrawingItem getSelectedDrawingItem();
Return Value
An instance of DrawingItem.
Code Snippet
DrawingItem drawingItem = dceImageEditorView.getSelectedDrawingItem();