IC Imaging Control .NET

OverlayBitmap.GetGraphics Method

OverlayBitmap.GetGraphics Method

The method retrieves a Graphics object that represents the overlay bitmap as a GDI+ drawing surface.
Syntax:
[VB.NET]
Public Function GetGraphics() As System.Drawing.Graphics
[C#]
public System.Drawing.Graphics GetGraphics();
Return Value:

A Graphics object usable for drawing operations on the overlay bitmap.

Limitations:

Run time only. Only after ICImagingControl.LiveStart has been called once.

Remarks:

If the returned Graphics object is no longer used, an application must call OverlayBitmap.ReleaseGraphics to release the object.

Example:

This Basic example demonstrates how do drawing operations with the graphics object.

[VB.NET]
Dim ob As OverlayBitmap ob = IcImagingControl1.OverlayBitmap Dim gfx As System.Drawing.Graphics gfx = ob.GetGraphics() Dim pen As New System.Drawing.Pen(System.Drawing.Color.Green) gfx.DrawLine(pen, 0, 0, 80, 60) ob.ReleaseGraphics(gfx)
[C#]
OverlayBitmap ob = ICImagingControl1.OverlayBitmap; System.Drawing.Graphics gfx = ob.GetGraphics(); System.Drawing.Pen pen = new System.Drawing.Pen(System.Drawing.Color.Green); gfx.DrawLine(pen, 0, 0, 80, 60); ob.ReleaseGraphics(gfx);
See also: OverlayBitmap, OverlayBitmap.ReleaseGraphics, ICImagingControl.LiveStart

<< ICImagingControl.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