Warning: This site is under construction, most links will be broken.

LightX API -> lxgfx -> ttfsize

Last modified on Fri, 30th Mar 2007 at 02:32 UTC by zipplet

lxgfx.ttfsize


procedure ttfsize(
  font: tlxhandle;
  text: string;
  fheight: tlxposition;
  var width, height: tlxposition
);


Returns the size in pixels the given string would be if rendered using a given font at a given size.

font: tlxhandle
The font to use - created previously with lxgfx.ttfcreatefont.

text: string
The text to measure.

fheight: tlxposition
The height of the font in pixels.

var width, height: tlxposition
This method returns the width and height in these variables.

Class: lxgfx