IC Imaging Control C++

OverlayBitmap::drawLine Method

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

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us