You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -44,11 +44,11 @@ We will start with the following code which defines a page that has a CameraEnha
44
44
45
45
## Add a DrawingLayer
46
46
47
-
All shapes are drawn on specific [`DrawingLayer`](../../api-reference/drawinglayer.md)s. The first step in drawing a shape is to create a **DrawingLayer**.
47
+
All shapes are drawn on specific [`DrawingLayer`](../../api-reference/drawinglayer.md)s. The first step in drawing a shape is to create a **DrawingLayer** on the viewer.
48
48
49
49
```javascript
50
50
functiondrawShapes(){
51
-
let drawingLayer =cameraEnhancer.createDrawingLayer();
51
+
let drawingLayer =cameraView.createDrawingLayer();
52
52
}
53
53
```
54
54
@@ -59,7 +59,7 @@ An `DrawingItem` is the basic shape that can be drawn. The SDK classify **Drawin
59
59
The following code shows how to define these types of **DrawingItems**:
60
60
61
61
```javascript
62
-
let drawingLayer =view.createDrawingLayer();
62
+
let drawingLayer =cameraView.createDrawingLayer();
63
63
let rect =newDynamsoft.DCE.RectDrawingItem({x:100,y:100,width:300,height:300});
64
64
let line =newDynamsoft.DCE.LineDrawingItem({startPoint:{x:600, y:600}, endPoint:{x:1050, y:400}});
65
65
let text =newDynamsoft.DCE.TextDrawingItem("TESTING...",{x:20,y:20,width:100,height:100});
@@ -70,7 +70,7 @@ let img = new Dynamsoft.DCE.ImageDrawingItem(document.getElementById('testIMG'),
70
70
71
71
```javascript
72
72
import { DrawingItem } from "dynamsoft-camera-enhancer";
73
-
let drawingLayer = view.createDrawingLayer();
73
+
let drawingLayer = cameraView.createDrawingLayer();
74
74
let rect = new DrawingItem.RectDrawingItem({x: 100,y: 100,width: 300,height: 300});
75
75
let line = new DrawingItem.LineDrawingItem({startPoint:{x: 600, y: 600}, endPoint:{x: 1050, y: 400}});
76
76
let text = new DrawingItem.TextDrawingItem("TESTING...",{x: 20,y: 20,width: 100,height: 100});
@@ -88,12 +88,12 @@ After **DrawingItems** have been defined, simply call `addDrawingItems()` to dra
88
88
89
89
```javascript
90
90
functiondrawShapes(){
91
-
let drawingLayer =view.createDrawingLayer();
91
+
let drawingLayer =cameraView.createDrawingLayer();
92
92
let rect =newDynamsoft.DCE.RectDrawingItem({x:100,y:100,width:300,height:300});
93
93
let line =newDynamsoft.DCE.LineDrawingItem({startPoint:{x:600, y:600}, endPoint:{x:1050, y:400}});
94
94
let text =newDynamsoft.DCE.TextDrawingItem("TESTING...",{x:20,y:20,width:100,height:100});
95
95
let quad =newDynamsoft.DCE.QuadDrawingItem({points:[{x:600,y:100},{x:500,y:300},{x:700,y:300},{x:700,y:100}]});
96
-
let img =newDynamsoft.DCE..ImageDrawingItem(document.getElementById('testIMG'),{x:200,y:200,width:300,height:300},true);
96
+
let img =newDynamsoft.DCE.ImageDrawingItem(document.getElementById('testIMG'),{x:200,y:200,width:300,height:300},true);
0 commit comments