MakeRotatedRectangle Method

NI Vision for Visual Basic

MakeRotatedRectangle Method

Syntax

CWIMAQVision.MakeRotatedRectangle CenterX, CenterY, Width, Height, Angle

Return Type

CWIMAQRotatedRectangle

The new rotated rectangle.

Purpose

Creates a CWIMAQRotatedRectangle object given the properties of the rotated rectangle.

Parameters

CenterX As Single

The x-coordinate of the center point of the rotated rectangle.

CenterY As Single

The y-coordinate of the center point of the rotated rectangle.

Width As Single

The width of the rotated rectangle.

Height As Single

The height of the rotated rectangle.

Angle As Single

The angle of the rotated rectangle.

Example

Private Sub Run_Click()
    'Remove all regions from the viewer
    CWIMAQViewer1.Regions.RemoveAll
    
    'Use Make functions to add regions to the viewer
    CWIMAQViewer1.Regions.AddAnnulus CWIMAQVision1.MakeAnnulus(50, 50, 5, 40, 45, 315)
    CWIMAQViewer1.Regions.AddLine CWIMAQVision1.MakeLine(30, 140, 140, 30)
    CWIMAQViewer1.Regions.AddOval CWIMAQVision1.MakeOval(55, 35, 125, 90)
    CWIMAQViewer1.Regions.AddPoint CWIMAQVision1.MakePoint(19, 81)
    CWIMAQViewer1.Regions.AddRectangle CWIMAQVision1.MakeRectangle(43, 23, 175, 75)
    CWIMAQViewer1.Regions.AddRotatedRectangle CWIMAQVision1.MakeRotatedRectangle(130.5, 60.5, 175, 75, 15)
End Sub

See Also

MakeAnnulus

MakeArc

MakeLine

MakeOval

MakePoint

MakePoints

MakeRectangle