Grabber::getOverlay Method

This method returns a pointer to an instance of the OverlayBitmap object. The OverlayBitmap is used to draw text and graphics on the video stream.
Syntax:
smart_ptr<OverlayBitmap> getOverlay() const;
smart_ptr<OverlayBitmap> getOverlay( tPathPosition PathPositionToFetch ) const;

Return value:

A pointer to the instance of OverlayBitmap for the specified path position.

Remarks:

When no path position is specified, the OverlayBitmap for the device path is returned.

To see the things you draw in live video and grabbed images, you have to activate the OverlayBitmaps, using setOverlayBitmapPathPosition.

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.

// Make sure, the overlay for the text is enabled
m_Grabber.getOverlay()->setEnable(true);
// Draw the text
m_Grabber.getOverlay()->drawText( RGB(255,0,0),  0, 0, "Hello World" );

See also: Grabber, OverlayBitmap, setOverlayBitmapPathPosition

<< Grabber