AGI STK X 11Send comments on this topic.
Set Method (AgDrawElemRect)
See Also
Left
The x-coordinate of the left edge of this rectangle (in the control's window coordinates).
Top
The y-coordinate of the top edge of this rectangle (in the control's window coordinates).
Right
The x-coordinate of the right edge of this rectangle (in the control's window coordinates).
Bottom
The y-coordinate of the bottom edge of this rectangle (in the control's window coordinates).
Windows






Windows & Linux

Description

Set the rectangle coordinates.

Syntax

[Visual Basic .NET]
Public Sub Set( _
    ByVal Left As Integer, _
    ByVal Top As Integer, _
    ByVal Right As Integer, _
    ByVal Bottom As Integer _
) As 
[C#]
public void Set(
    int Left,
    int Top,
    int Right,
    int Bottom
);
[Managed C++]
public: void Set(
    int Left,
    int Top,
    int Right,
    int Bottom
);
[Java]
public void set(
    int Left,
    int Top,
    int Right,
    int Bottom
);
[Unmanaged C++]
public: HRESULT Set(
    OLE_XPOS_PIXELS Left,
    OLE_YPOS_PIXELS Top,
    OLE_XPOS_PIXELS Right,
    OLE_YPOS_PIXELS Bottom
);

Parameters

Left
The x-coordinate of the left edge of this rectangle (in the control's window coordinates).
Top
The y-coordinate of the top edge of this rectangle (in the control's window coordinates).
Right
The x-coordinate of the right edge of this rectangle (in the control's window coordinates).
Bottom
The y-coordinate of the bottom edge of this rectangle (in the control's window coordinates).

Remarks

The rectangle coordinates are updated, and then the display is updated.

See Also

Example

This example demonstrates how to display and update a bounding rectangle when the mouse moves over the 3D control. This is extracted from the RubberBandSelect example (available in the Samples directory).
[Visual Basic .NET]
Private Sub AxAgUiAxVOCntrl1_MouseMoveEvent( _
ByVal sender As Object, _
ByVal e As AxAGI.STKX.IAgUiAxVOCntrlEvents_MouseMoveEvent) _
Handles AxAgUiAxVOCntrl1.MouseMoveEvent

If pickMode = 2 Then

If curRect Is Nothing Then

Dim r As AgDrawElemRect
r = Me.AxAgUiAxVOCntrl1.DrawElements.Add("Rect")

r.Color = Color.Red

curRect = r

End If

curRect.Set(x0, y0, e.x, e.y)

End If

End Sub
© 2019 Analytical Graphics, Inc. All Rights Reserved.