FMX.Graphics.TCanvas.MeasureLines

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure MeasureLines(const ALines: TLineMetricInfo; const ARect: TRectF; const AText: string; const WordWrap: Boolean; const Flags: TFillTextFlags;  const ATextAlign: TTextAlign; const AVTextAlign: TTextAlign = TTextAlign.Center); virtual;

C++

virtual void __fastcall MeasureLines(Fmx::Types::TLineMetricInfo* const ALines, const System::Types::TRectF &ARect, const System::UnicodeString AText, const bool WordWrap, const TFillTextFlags Flags, const Fmx::Types::TTextAlign ATextAlign, const Fmx::Types::TTextAlign AVTextAlign = (Fmx::Types::TTextAlign)(0x0));

Properties

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

Description

Measures the lines of a specified text with specified properties and framed in a specified rectangle.

MeasureLines is implemented to extract the line metrics from a text string with the specified alignment, current font specified by the Font property, and framed by a specified rectangle area of the current TCanvas.

The ALines parameter specifies the TLineMetricInfo object in which to save the line metrics.

The ARect parameter specifies the rectangle area that frames the text.

The AText parameter specifies the text to be measured.

The WordWrap parameter specifies the word wrapping option. If it is True, it indicates that words are broken across lines to avoid 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.

The Flags parameter specifies the reading direction of AText.

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

Code Examples