OverlayRectangle
Top  Previous  Next

Description

Draws an empty or filled rectangle in the overlay.


Syntax


[VB]
objActiveGige.OverlayRectangle StartX, StartY, EndX, EndY [,Width = 1]


[C/C++]
HRESULT OverlayRectangle( short StartX, short StartY, short EndX, short EndY, short Width);


Data Types
[VB]

StartX, StartY, EndX, EndY: Integer
Width: Integer (optional)


Parameters
[C/C++]

StartX [in], StartY [in]  
Pixel coordinates of the top left corner of the rectangle, relative to the image origin.  
EndX [in], EndY [in]  
Pixel coordinates of the bottom right corner of the rectangle, relative to the image origin.  
Width [in]  
Width of the outline of the rectangle in pixels. If zero, a filled rectangle is drawn.  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example

The following VB example overlays a filled red rectangle on the live video:

ActiveGige1.Acquire = 
True

ActiveGige1.OverlayRectangle 100,100,200,200,0
ActiveGige1.OverlayColor=RGB(255,0,0)
ActiveGige1.Overlay=  
True


Remarks


To draw a filled rectangle, use Width=0. To draw multiple rectangles, call this method several times. Also see OverlayColor, OverlayClear.