TPostScriptPrinterCanvas.TextExtent function
Declaration
function TextExtent(const Text: string): TSize; overrideDescription
Not described here; this is what TCanvas.TextExtent says of it:
Calculates the width and height for the specified Text using the Font for the canvas.
TextExtent is a
TSize function used to get the width and
height for the specified Text using the Font for the canvas instance.
The TSize type in the return value returns the Width and Height for the Text in pixels using the cX (Width) and cY (Height) members. Both members are set to 0 if Text is an empty string (''), and when either the Handle or Font for the canvas are invalid. The CreateHandle and CreateFont methods are called to attempt to create the items when needed.
If the Font has the default un-initialized settings, the OnGetSystemFont event handler is signalled to get the default system font selected for the canvas.
TextExtent calls the GetTextExtentPoint routine in the widgetset interface to get the return value for the method.
TextExtent is used in methods like TextWidth, TextHeight and DoGetTextSize.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
