DrawLine Method

NI Vision for Visual Basic

DrawLine Method

Syntax

CWIMAQVision.DrawLine SourceImage, DestImage, x1, y1, x2, y2, DrawMode [, GrayLevel = 0]

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Obsolete—Use DrawLine2 instead. Draws a line on an image.

Remarks

Use this method with U8, I16, and SGL images.

Parameters

SourceImage As CWIMAQImage

The input image.

DestImage As CWIMAQImage

The resulting image.

x1 As Long

The x-coordinate of the start point.

y1 As Long

The y-coordinate of the start point.

x2 As Long

The x-coordinate of the end point.

y2 As Long

The y-coordinate of the end point.

DrawMode As CWIMAQDrawModes

Defines how to draw the line. Valid values are cwimaqDrawModeFrame and cwimaqDrawModeInvFrame.

GrayLevel As Variant

[Optional] The pixel value that the method uses for drawing if you set DrawMode to cwimaqDrawModeFrame.

This parameter has a default value of 0.

See Also

DrawLine2