DrawLine
Top  Previous  Next

Description

Draws a line in the current image frame.


Syntax


[VB]
objActiveGige.DrawLine X1, Y1, X2, Y2, Width, Red [,Green, Blue, Opacity ]


[C/C++]
HRESULT DrawLine( short X1, short Y1, short X2, short Y2, short Width, long Red [,long Green, long Blue, short Opacity ]);


Data Types
[VB]

X1, Y1, X2, Y2 : Integer
Width: Integer
Red, Green, Blue: Long
Opacity: Integer

Parameters
[C/C++]

X1 [in], Y1 [in], X2 [in], Y2 [in]  
Coordinates of the starting and ending point of the line relative to the image origin.  
Width [in]  
Width of the line in pixels.  
Red [in], Green [in], Blue [in]  
Values specifying the color or intensity of the line. If Green and Blue arguments are omitted, they will be assigned the value of Red.  
Opacity [in]  
An optional integer between 0 and 100 specifying the percentage of opacity at which the line will be blended with the underlying pixels in the image. If omitted, default value of 100 is used.  
 
Return Values

S_OK  
Success  
E_FAIL  
Failure.  

Example


The following VB example embeds a line into the live video:

Private Sub
ActiveGige1_FrameAcquired()

      ActiveGige1.DrawLine 50,100, 300,200, 3, 255

End Sub


Remarks


To draw multiple lines, call this method several times.