Sign in Join
FPDoc Onlineexperiment

TPostScriptPrinterCanvas.TextRect procedure

Member of TPostScriptPrinterCanvaspublicIn unit PostScriptCanvas

Declaration

pascal
procedure TextRect(ARect: TRect; X: Integer; Y: Integer; 
 const Text: string; const Style: TTextStyle)
 ; override

Description

Not described here; this is what TCanvas.TextRect says of it:

Draws text on the canvas at the specified location using the given style.

Writes Text string within a specified rectangle, according to predefined Style.

The boundaries of the text rectangle are specified in ARect. X, Y define the starting point for writing the Text within the rectangle.

TextStyle determines whether the text is justified, centered, word-wrapped, clipped at the rectangle boundaries, etc. If the Style argument is omitted, defaults are assumed.

Note: The exact text position depends on the specified rectangle, the X, Y coordinates, and settings in TextStyle:

  • TextStyle.Alignment = taLeftJustify: Text begins at X
  • TextStyle.Alignment = taCenter: Text center is in the center of the rectangle (horizontally)
  • TextStyle.Alignment = taRightJustify: Text ends at right edge of the rectangle
  • TextStyle.Layout = tlTop: Top of the text is at Y
  • TextStyle.Layout = tlCenter: Text center is in the center of the rectangle (vertically)
  • TextStyle.Layout = tlBottom: Text sits above the bottom edge of the rectangle

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.