OverlayBitmap.FontTransparent Property

Returns or sets the background mode for OverlayBitmap.DrawText.
Syntax:
[C#]
public bool FontTransparent;
Limitations:

Run time only.

Remarks:

This property is used to return and set the background mode to draw text.

If FontTransparent is set to True, OverlayBitmap.DrawText writes the text without a surrounding solid rectangle. The live video image can be seen through the text. If changing text is repeatedly written to the same position, it becomes unreadable, because the background is not cleared.

If FontTransparent is set to False, OverlayBitmap.DrawText writes the text with a surrounding solid rectangle. The rectangle has the color set with the OverlayBitmap.FontBackColor property. If changing text is repeatedly written to the same position, it stays readable, because the background is overwritten every time. If the FontBackColor is equal to OverlayBitmap.DropOutColor, the surrounding solid rectangle is not visible.

Hint: If changing text is displayed on the live video repeatedly (such as a clock), an application should set FontTransparent to False and OverlayBitmap.FontBackColor to the OverlayBitmap.DropOutColor. In doing so, the text remains readable.

The default value for FontTransparent is False.

Example:

This example demonstrates how to use the FontTransparent property:

[C#]
OverlayBitmap ob = ICImagingControl1.OverlayBitmapAtPath[PathPositions.Device]; // Print some text in red and transparent background. ob.FontTransparent = true; ob.DrawText(System.Drawing.Color.Red, 10, 10, "IC Imaging Control");
See also: OverlayBitmap, OverlayBitmap.DrawText, OverlayBitmap.DropOutColor, OverlayBitmap.FontBackColor

<< ICImagingControl.OverlayBitmap