Graphics.TextRenderingHint Property

 

Gets or sets the rendering mode for text associated with this Graphics.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

member TextRenderingHint : TextRenderingHint with get, set

Property Value

Type: System.Drawing.Text.TextRenderingHint

One of the TextRenderingHint values.

The text rendering hint specifies whether text renders with antialiasing.

System_CAPS_noteNote

You should not use a CompositingMode property value of SourceCopy when the TextRenderingHint property is set to ClearTypeGridFit. An exception could occur or the image may not render correctly.

The following code example demonstrates the use of the TextRenderingHint and TextContrast properties.

This example is designed to be used with Windows Forms. Paste the code into a form and call the ChangeTextRenderingHintAndTextContrast method when handling the form's Paint event, passing e as PaintEventArgs.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: