STK X Send comments on this topic.
Set Method (AgDrawElemRect)
See Also  Example
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).





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 _
) 

[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  set(
int Left,
int Top,
int Right,
int Bottom
);

[Unmanaged C++]
public: HRESULT Set(
long Left,
long Top,
long Right,
long 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.

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] Copy Code
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

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1