OverlayBitmap::drawLine Method

Draws a line on the live video.
Syntax:
bool drawLine( COLORREF color, int iXStart, int iYStart, int iXEnd, int iYEnd );
Parameter Description
color

Specifies the color of the line. The color can be specified with the RGB macro.

iXStart

Specifies the column in pixel units where the text should start on the live video.

iYStart

Specifies the row in pixel units where the line should start on the live video.

iXEnd

Specifies the column in pixel units where the line should end on the live video.

iYEnd

Specifies the row in pixel units where the line should end on the live video.

Return value:

true on success, false otherwise.

Sample:

This example demonstrates how draw a red rectangle on the live video stream.

smart_ptr<DShowLib::OverlayBitmap> pOverlayBitmap;
pOverlayBitmap = m_Grabber.getOverlay( ePP_DEVICE  );
// Make sure, the overlay is enabled.
pOverlayBitmap->setEnable(true);
// Draw a rectangle in red.
pOverlayBitmap->drawLine( RGB(255,0,0),  10,  10, 100,  10);
pOverlayBitmap->drawLine( RGB(255,0,0), 100,  10, 100, 100);
pOverlayBitmap->drawLine( RGB(255,0,0), 100, 100,  10, 100);
pOverlayBitmap->drawLine( RGB(255,0,0),  10,  10,  10, 100);

See also: OverlayBitmap, OverlayBitmap::drawText, OverlayBitmap::drawSolidRect, OverlayBitmap::drawFrameRect, OverlayBitmap::drawSolidEllipse, OverlayBitmap::drawFrameEllipse

<< OverlayBitmap