IGxGraphics.TextRenderingHint

Syntax

TextRenderingHint: GxTextRenderingHint;

Description

The TextRenderingHint property determines text output mode.

Example

Executing the example requires a form with a button named Button1 and the ImageBox component named ImageBox1.

Add links to the Drawing, Forms system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    BMP: IGxBitmap;
    Graph: IGxGraphics;
    GraphClass: GxGraphicsClass;
    Font: IGxFont;
    Brush: IGxBrush;
    Format: IGxStringFormat;
Begin
    BMP := GxBitmap.CreateNew(ImageBox1.ClientWidth, ImageBox1.ClientHeight, GxPixelFormat.
Format32bppArgb);
    Font := 
New GxFont.Create("Times New Roman"100, GxFontStyle.BoldItalic, GxUnit.World);
    Brush := 
New GxSolidBrush.Create(GxColor.FromName("White"));
    Format := 
New GxStringFormat.Create;
    GraphClass := 
New GxGraphics.Create;
    Graph := GraphClass.FromImage(BMP);
    Graph.TextRenderingHint := GxTextRenderingHint.AntiAlias;
    Graph.DrawTextF(
"New Image", Font, Brush, 500, Format);
    ImageBox1.Image := BMP;
End Sub Button1OnClick;

Clicking the button in the ImageBox component displays a new bitmap with the specified label containing defined settings.

See also:

IGxGraphics