FMX.Graphics.TCanvas.TextToPath

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function TextToPath(Path: TPathData; const ARect: TRectF; const AText: string; const WordWrap: Boolean;  const ATextAlign: TTextAlign; const AVTextAlign: TTextAlign = TTextAlign.Center): Boolean; virtual;

C++

virtual bool __fastcall TextToPath(TPathData* Path, const System::Types::TRectF &ARect, const System::UnicodeString AText, const bool WordWrap, const Fmx::Types::TTextAlign ATextAlign, const Fmx::Types::TTextAlign AVTextAlign = (Fmx::Types::TTextAlign)(0x0));

Properties

Type Visibility Source Unit Parent
function public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics TCanvas

Description

Creates a TPathData from a text string with the specified alignments and the current font.

TextToPath is implemented by TCanvas to create a TPathData from the text string with the specified wrapping, alignments, and font.

The APath parameter specifies the path to be created.

The ARect parameter specifies the bounding rectangle of the text.

The AText parameter specifies the text to create the path from.

The WordWrap parameter specifies the word wrapping option. If it is True, it indicates that words are broken across lines to avoid the text overflowing the layout box. If it is set to False, it indicates that words are kept within the same line even when the text overflows the layout box.

ATextAlign is the horizontal alignment of the text within ARect.

AVTextAlign is the vertical alignment of the text within ARect. AVTextAlign is optional. By default, it is set to Center.

See Also