DrawRect Method

NI Vision for Visual Basic

DrawRect Method

Syntax

CWIMAQVision.DrawRect SourceImage, DestImage, Left, Top, Width, Height, DrawMode [, GrayLevel = 0]

Return Type

Long

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

Purpose

Obsolete—Use DrawRect2 instead. Draws a rectangle 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.

Left As Long

The left edge of the rectangle.

Top As Long

The top edge of the rectangle.

Width As Long

The width of the rectangle.

Height As Long

The height of the rectangle.

DrawMode As CWIMAQDrawModes

Defines how to draw the rectangle.

GrayLevel As Variant

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

This parameter has a default value of 0.

See Also

DrawRect2