Font
Top  Previous  Next

Description

Returns or sets the font for DrawText.


Syntax


[VB]
objActiveUSB.Font [= Font]


[C/C++]
HRESULT get_Font(IFontDisp* *pFont);
HRESULT put_Font(IFontDisp* Font);



Data Type
[VB]

StdFont


Parameters
[C/C++]

pFont [out,retval]  
Pointer to the IFontDisp interface object corresponding to the current overlay font  
Font [in]  
IFontDisp interface object corresponding to the overlay font to be set  

Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example


The following VB example inserts two string of text in the live video:

Private Sub
ActiveUSB1_FrameAcquired()

Dim Font1 As New StdFont
Font1.Name = "Arial"
Font1.Size = 30
Font1.Bold = True
ActiveUSB1.Font = Font1
ActiveUSB1.DrawText 10, 100, "ActiveUSB", 255, 0, 0
Font2.Name = "Arial"
Font2.Size = 20
Font2.Italic = True
ActiveUSB1.Font = Font2
ActiveUSB1.DrawText 10, 200, "The most powerful USB3 Vision SDK", 0, 0, 255
End Sub


Remarks


Also see DrawText.