Resource Base
Table of contents

Class LineDrawingItem

The LineDrawingItem class extends the functionality of the DrawingItem class and is specifically tailored to handle line-related drawing operations.

Name Description
constructor LineDrawingItem() Constructor for the class.
getLine() Retrieves the current line being used for drawing.
setLine() Sets the line to be used for drawing.

LineDrawingItem

Constructor for the class.

constructor(
    line: LineSegment,
    drawingStyleId?: number
)

Parameters

line: the line to be drawn, of type LineSegment.

drawingStyleId: [Optional] the unique ID of the DrawingStyle to apply to this DrawingItem.

Code Snippet

let cameraView = cameraEnhancer.getCameraView();
let drawingLayer = cameraView.createDrawingLayer();
let lineItem = new Dynamsoft.DCE.LineDrawingItem(
    {
        startPoint:
        {
            x: 50, 
            y: 50
        }, 
        endPoint:
        {
            x: 500, 
            y: 500
        }
    }
);
drawingLayer.addDrawingItem(lineItem);

See also

LineSegment

getLine

Retrieves the current line being used for drawing.

getLine(): LineSegment;

Parameters

None.

Return Value

The current line being used for drawing, of type LineSegment.

Code Snippet

lineItem.getLine();

setLine

Sets the line to be used for drawing. This method allows changing the line after the object has been instantiated.

setLine(line: LineSegment): void;

Parameters

line: the line to be drawn, of type LineSegment.

Return Value

None.

Code Snippet

lineItem.setLine(/*A-New-Line*/);

See also

LineSegment

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version(4.0.2)
  • Version 4.x
    • Version 4.0.1
    • Version 4.0.0
  • Version 3.x
    • Version 3.3.10
    • Version 3.3.9
    • Version 3.3.8
    • Version 3.3.7
    • Version 3.3.6
    • Version 3.3.5
    • Version 3.3.4
    • Version 3.3.3
    • Version 3.3.2
    • Version 3.3.1
    • Version 3.3.0
    • Version 3.2.0
    • Version 3.1.0
    • Version 3.0.1
    • Version 3.0.0
  • Version 2.x
    • Version 2.3.5
    • Version 2.3.2
    • Version 2.3.1
    • Version 2.3.0
    • Version 2.1.4
    • Version 2.1.3
    • Version 2.1.0
    • Version 2.0.0
Change +