Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32🞂TBitmap32🞂TextoutMethodPublic

TBitmap32.Textout

Renders text string onto the bitmap surface at specified coordinates or bounding rectangle using the current Font.

Declarations ​

pascal
procedure Textout(X, Y: Integer; const Text: string); overload;
procedure Textout(X, Y: Integer; const ClipRect: TRect; const Text: string); overload;
procedure Textout(var DstRect: TRect; const Flags: Cardinal; const Text: string); overload;
Overload Details

Overload 1 ​

pascal
procedure Textout(X, Y: Integer; const Text: string); overload;

Renders a text string at position (X, Y).

ParameterTypeDescription
X, YIntegerTop-left destination pixel coordinate for text rendering.
TextstringText string to render.

Overload 2 ​

pascal
procedure Textout(X, Y: Integer; const ClipRect: TRect; const Text: string); overload;

Renders a text string at position (X, Y) constrained within a clipping rectangle.

ParameterTypeDescription
X, YIntegerTop-left destination pixel coordinate for text rendering.
ClipRectTRectClipping rectangle bounding text output.
TextstringText string to render.

Overload 3 ​

pascal
procedure Textout(var DstRect: TRect; const Flags: Cardinal; const Text: string); overload;

Renders formatted text within a destination rectangle using Win32 API DT_ formatting flags.*

ParameterTypeDescription
DstRectTRectDestination rectangle for text layout and rendering.
FlagsCardinalDrawText formatting flags (e.g. DT_CENTER, DT_WORDBREAK, DT_CALCRECT).
TextstringText string to render.

Description ​

Textout draws text on the bitmap using backend text support (ITextSupport).

WARNING

Textout does not support transparency.

Internally Textout delegates drawing of text to the backend[1]. Because the backend very likely does not support alpha-blending:

  • The background (i.e. the bitmap) must be completely opaque (i.e. Alpha=255).
  • The alpha of the text color is ignored (i.e. any use of semi-transparent text colors is pointless).

Otherwise the text will not blend correctly onto the background and text antialiasing will not work.

If you need transparency then use either RenderText or TCanvas32.RenderText instead.

See also ​


  1. For example, on Windows the backend uses TextOut or DrawText for text output. â†Šī¸Ž