DCEImageEditorView
DCEImageEditorView is the class that enable users to add UI configurations on a static image.
- Objective-C
- Swift
@interface DCEImageEditorView : UIViewclass DCEImageEditorView : UIView
| 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 an original image for the view.
- Objective-C
- Swift
- (void) setOriginalImage:(ImageData)imageData;func setOriginalImage(_ imageData: iImageData)
Parameters
imageData: The imageData of the image.
Code Snippet
- Objective-C
- Swift
[_imageEditorView setOriginalImage:imageData];imageEditorView.setOriginalImage(imageData)
getOriginalImage
- Objective-C
- Swift
- (ImageData*) getOriginalImage;func getOriginalImage() -> iImageData
Return Value
The imageData of the image.
Code Snippet
- Objective-C
- Swift
ImageData* imageData = [imageEditorView getOriginalImage];let imageData = imageEditorView.getOriginalImage()
getDrawingLayer
- Objective-C
- Swift
- (DCEDrawingLayer*) getDrawingLayer:(NSInteger)id;func getDrawingLayer(_ layerId: Int) -> DCEDrawingLayer
Parameters
id: The id of the drawing layer.
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
The targeting instance of DCEDrawingLayer.
Code Snippet
- Objective-C
- Swift
DCEDrawingLayer* drawingLayer = [imageEditorView getDrawingLayer:DBR_LAYER_ID];let drawingLayer = imageEditorView.getDrawingLayer(DBR_LAYER_ID)
createDrawingLayer
- Objective-C
- Swift
- (DCEDrawingLayer*) createDrawingLayer;func createDrawingLayer() -> DCEDrawingLayer
Return Value
A user-defined drawing layer.
Code Snippet
- Objective-C
- Swift
DCEDrawingLayer* drawingLayer = [imageEditorView createDrawingLayer];let drawingLayer = imageEditorView.createDrawingLayer()
getSelectedDrawingItem
- Objective-C
- Swift
- (DrawingItem*) getSelectedDrawingItem;func getSelectedDrawingItem() -> DrawingItem?
Return Value
Code Snippet
- Objective-C
- Swift
DrawingItem* item = [imageEditorView getSelectedDrawingItem];let item = imageEditorView.getSelectedDrawingItem()