OverlayBitmap::drawText Method |
|||||||||||||||||||||||
Draws a text on the live video. | |||||||||||||||||||||||
Syntax: | bool drawText( COLORREF color, int iX, int iY, const char* szText ); bool drawText( COLORREF color, int iX, int iY, const std::string& szText ); bool drawText( COLORREF color, int iX, int iY, const std::wstring& szText ); |
||||||||||||||||||||||
|
|||||||||||||||||||||||
Return value: | true on success, false otherwise. |
||||||||||||||||||||||
Remarks: | The used background color of the text is specified by a call to OverlayBitmap::setFontBKColor. The used background mode of the text is set by a call to OverlayBitmap::setFontTransparent. |
||||||||||||||||||||||
Sample: | This example demonstrates how to enable the overlay bitmap and draw the text "Hello Word" in the upper left corner of the live video. smart_ptr<DShowLib::OverlayBitmap> pOverlayBitmap; pOverlayBitmap = m_Grabber.getOverlay( ePP_DEVICE ); // Make sure, the overlay for the text is enabled. pOverlayBitmap->setEnable(true); // Draw the text. pOverlayBitmap->drawText( RGB(255,0,0), 0, 0, "Hello World" ); |
||||||||||||||||||||||
See also: | OverlayBitmap, OverlayBitmap::setFontBKColor, OverlayBitmap::getFontBKColor, OverlayBitmap::setFontTransparent, OverlayBitmap::getFontTransparent |