DrawRegions Method

NI Vision for Visual Basic

DrawRegions Method

Syntax

CWIMAQOverlay.DrawRegions Regions [, Color]

Purpose

Draws a regions collection to the overlay.

Parameters

Regions As CWIMAQRegions

The regions to overlay.

Color As Variant

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

Example

Private Sub Run_Click()
    'Overlay the regions on the viewer onto the viewer's image
    CWIMAQViewer1.Image.Overlays(1).DrawRegions CWIMAQViewer1.Regions, vbYellow
    
    'Remove all regions from the viewer
    CWIMAQViewer1.Regions.RemoveAll
End Sub