DrawSquarePoint Method
Syntax
CWMachineVision.DrawSquarePoint Overlay, Point, SideLength, DrawMode [, Color]
Return Type
On success, this method returns 0. On failure, this function returns a negative number.
Purpose
Draws a square 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 square point.
Point As CWIMAQPoint
The center point of the square point.
SideLength As Long
The length of each side of the square.
DrawMode As CWIMAQDrawModes
Defines how to draw the rectangle.
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.DrawSquarePoint CWIMAQViewer1.Image.Overlays(1), Point, 5, cwimaqOverlayModePaint