DrawCircularPoint Method

NI Vision for Visual Basic

DrawCircularPoint Method

Syntax

CWMachineVision.DrawCircularPoint Overlay, Point, Diameter, DrawMode [, Color]

Return Type

CWIMAQDrawModes

You can use the following constants with this data type:

  • cwimaqDrawModeFrame—Frame mode. Draws the contour of the shape in the color that you specify.
  • cwimaqDrawModeInvFrame—Inverse frame mode. Draws the contour of the shape using the inverse of the pixel values.
  • cwimaqDrawModeInvPaint—Inverse paint mode. Draws the contour and interior of the shape using the inverse of the pixel values.
  • cwimaqDrawModePaint—Paint mode. Draws the contour and interior of the shape in the color that you specify.

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

Purpose

Draws a circular point on the input overlay.

Remarks

This function is used by many of the CWMachineVision methods to draw their results. It is exposed as a convenience method.

Parameters

Overlay As CWIMAQOverlay

The overlay onto which to draw the circular point.

Point As CWIMAQPoint

The center of the circular point.

Diameter As Long

The diameter, in pixels, of the circular point.

DrawMode As CWIMAQDrawModes

Defines how to draw the circle.

Color As Variant

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

Example

'Get the selected point from the viewer
Dim Point As New CWIMAQPoint
CWMachineVision1.GetSelectedPointFromViewer CWIMAQViewer1, Point

'Draw the point
CWMachineVision1.DrawCircularPoint CWIMAQViewer1.Image.Overlays(1), Point, 5, cwimaqOverlayModePaint

See Also

CWIMAQOverlay.DrawOval

DrawPatternMatch

DrawSquarePoint

GetSelectedPointFromViewer