Class QuadDrawingItem
The QuadDrawingItem class extends the functionality of the DrawingItem class and is specifically tailored to handle quadrilateral-related drawing operations.
| Name | Description |
|---|---|
constructor QuadDrawingItem() |
Constructor for the class. |
| getQuad() | Retrieves the current quadrilateral being used for drawing. |
| setQuad() | Sets the quadrilateral to be used for drawing. |
QuadDrawingItem
Constructor for the class.
constructor(
quad: Quadrilateral,
drawingStyleId?: number
)
Parameters
quad: the quadrilateral to be drawn, of type Quadrilateral.
drawingStyleId: [Optional] the unique ID of the DrawingStyle to apply to this DrawingItem.
Code Snippet
let cameraView = cameraEnhancer.getCameraView();
let drawingLayer = cameraView.createDrawingLayer();
let quadItem = new Dynamsoft.DCE.DrawingItem.QuadDrawingItem(
{
points:[{
x: 50,
y: 50
},{
x: 500,
y: 50
},
{
x: 500,
y: 500
},{
x: 50,
y: 500
}]
}
);
drawingLayer.addDrawingItem(quadItem);
See also
getQuad
Retrieves the current quadrilateral being used for drawing.
getQuad(): Quadrilateral;
Parameters
None.
Return Value
The current quadrilateral being used for drawing, of type Quadrilateral.
Code Snippet
quadItem.getQuad();
setQuad
Sets the quadrilateral to be used for drawing. This method allows changing the quadrilateral after the object has been instantiated.
setQuad(quad: Quadrilateral): void;
Parameters
quad: the quadrilateral to be drawn, of type Quadrilateral.
Return Value
None.
Code Snippet
quadItem.setQuad(/*A-New-Quadrilateral*/);
See also