DrawOval2 Method

NI Vision for Visual Basic

DrawOval2 Method

Syntax

CWIMAQVision.DrawOval2 SourceImage, DestImage, Oval, DrawMode [, GrayLevel = 0]

Return Type

Long

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

Purpose

Draws an oval on an image.

Remarks

Use this method with U8, U16, I16, SGL, RGB32, and HSL32 images.

Parameters

SourceImage As CWIMAQImage

The input image.

DestImage As CWIMAQImage

The resulting image.

Oval As CWIMAQOval

Defines the oval to draw.

DrawMode As CWIMAQDrawModes

Defines how to draw the oval.

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.

Example

Dim i As New CWIMAQImage
Dim o As New CWIMAQOval

' Draw an oval on the image in Viewer1.
' Store the result in i.
o.Initialize 10, 20, 50, 100
CWIMAQVision1.DrawOval2 CWIMAQViewer1.Image, i, o, _
                        cwimaqDrawModeInvPaint