DrawConnectedPoints Method

NI Vision for Visual Basic

DrawConnectedPoints Method

Syntax

CWIMAQOverlay.DrawConnectedPoints Points, DrawMode [, Color]

Purpose

Draws multiple connected points, either a polyline or a polygon, on the overlay.

Parameters

Points As CWIMAQPoints

The points to draw.

DrawMode As CWIMAQOverlayModes

Defines how to draw the points. Valid inputs are cwimaqOverlayModeFrame and cwimaqOverlayModePaint.

Color As Variant

[Optional] The color of the overlay. If not supplied, the DefaultColor value is used.

Example

Private Sub Run_Click()
    'Create a points collection
    Dim Points As New CWIMAQPoints
    Points.Initialize Array(100, 125, 150, 125, 100), Array(125, 150, 125, 100, 125)
    
    'Overlay the points
    CWIMAQViewer1.Image.Overlays(1).DrawConnectedPoints Points, cwimaqOverlayModeFrame
End Sub