DrawText
Top  Previous  Next

Description

Embeds a string of text in the current image frame.


Syntax


[VB]
objActiveDcam.DrawText X, Y, Text, Red [,Green, Blue, Opacity ]


[C/C++]
HRESULT DrawText( short X, short Y, bstr Text, long Red [,long Green, long Blue, short Opacity ]);


Data Types
[VB]

X, Y : Integer
Text: String
Red, Green, Blue: Long
Opacity: Intager

Parameters
[C/C++]

X [in], Y [in]  
Coordinates of the beginning of the text relative to the image origin.  
Text [in]  
The string containing the text to be drawn.  
Red [in], Green [in], Blue [in]  
Values specifying the color or intensity of the text. 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 text 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 string of text into the live video:

Private Sub
ActiveDcam1_FrameAcquired()

      ActiveDcam1.DrawText 50,100, "ActiveDcam SDK for 1394 cameras", 255

End Sub


Remarks


To select the font for drawing text strings, use Font. To draw multiple strings, call this method several times.