Declarations â
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 â
procedure Textout(X, Y: Integer; const Text: string); overload;Renders a text string at position (X, Y).
| Parameter | Type | Description |
|---|---|---|
X, Y | Integer | Top-left destination pixel coordinate for text rendering. |
Text | string | Text string to render. |
Overload 2 â
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.
| Parameter | Type | Description |
|---|---|---|
X, Y | Integer | Top-left destination pixel coordinate for text rendering. |
ClipRect | TRect | Clipping rectangle bounding text output. |
Text | string | Text string to render. |
Overload 3 â
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.*
| Parameter | Type | Description |
|---|---|---|
DstRect | TRect | Destination rectangle for text layout and rendering. |
Flags | Cardinal | DrawText formatting flags (e.g. DT_CENTER, DT_WORDBREAK, DT_CALCRECT). |
Text | string | Text 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.