SL_CalcTextLength


NAME
SL_CalcTextLength -- returns the length (in pixels) of a given string.

SYNOPSIS
len = SL_CalcTextLength(winhandle, string, count);
D0 A0 A1 D0

UWORD SL_CalcTextLength(WINHANDLE, SLCHAR *, WORD);

FUNCTION
Calculates the pixel length of a given string in the current font
of a given window.

INPUTS
winhandle - as returned by SL_CreateWindowA.
string - the string to get the length of.
count - how many SLCHARs to use in string. If this value is -1
then all SLCHARs upto the null terminator will be used.

RESULTS
len - the len in pixels of the given string.

NOTE
The window does not need to be drawable for this routine to work. If the
window is not visible this routine returns 0.

SEE ALSO
SL_SetFont, SL_DrawText.

 

SL_CalcTextLength  Command Section By Type  url:SL_CalcTextLength
  created:2008-03-01 23:36:23   last updated:2008-03-01 23:36:23
  Copyright © 1985-2017 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For SL_CalcTextLength
There are no user contributed comments for this page.