DrawCrosshair Method
Syntax
CWMachineVision.DrawCrosshair Overlay, Point, Radius [, Color]
Return Type
On success, this method returns 0. On failure, this function returns a negative number.
Purpose
Draws a crosshair centered at the specified point.
Remarks
This function is used by CWMachineVision.DrawPatternMatch. It is exposed as a convenience method.
Parameters
Overlay As CWIMAQOverlay
The overlay onto which to draw the crosshair.
Point As CWIMAQPoint
The center point of the crosshair.
Radius As Long
The radius of the crosshair.
Color As Variant
[Optional] The color of the overlay. If not supplied, the DefaultColor property of the CWIMAQOverlay object is used.
Example
'Get the currently selected point from the viewer Dim Point As New CWIMAQPoint CWMachineVision1.GetSelectedPointFromViewer CWIMAQViewer1, Point 'Draw the point CWMachineVision1.DrawCrosshair CWIMAQViewer1.Image.Overlays(1), Point, 5, vbGreen