Vcl.Graphics.TCustomCanvas.TextOut

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure TextOut(X, Y: Integer; const Text: string); virtual; abstract;

C++

virtual void __fastcall TextOut(int X, int Y, const System::UnicodeString Text) = 0 ;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TCustomCanvas

Description

Writes a string on the canvas, starting at the point (X,Y), and then updates the PenPos to the end of the string.

Override the TextOut method to implement writing a string onto the canvas. The string will be written using the current font. Use the TextExtent method to determine the space occupied by text in the image. To write only the text that fits within a clipping rectangle, use TextRect instead.

After a call to TextOut, the PenPos property indicates the point at the top right of the text on the canvas.

See Also