OverlayBitmap.GetGraphics Method

The method retrieves a Graphics object that represents the overlay bitmap as a GDI+ drawing surface.
Syntax:
[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.

[C#]
OverlayBitmap ob = ICImagingControl1.OverlayBitmapAtPath[PathPositions.Device]; 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