*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/lstrwidth (3)              
Title
Content
Arch
Section
 

Contents


lstrwidth(3G)							 lstrwidth(3G)


NAME    [Toc]    [Back]

     lstrwidth - returns the width of the specified text string

C SPECIFICATION    [Toc]    [Back]

     long lstrwidth(type,str)
     long type;
     void *str;

PARAMETERS    [Toc]    [Back]

     type     expects one of the following symbolic constants defined in
	      <gl/gl.h>:

	       STR_B	  Each character is represented	by
			  a single unsigned byte.
	       STR_2B	  Each character is represented	by
			  two, consecutive unsigned bytes.
			  The first byte is most
			  significant.
	       STR_3B	  Each character is represented	by
			  three, consecutive unsigned
			  bytes.  The first byte is most
			  significant.	The last byte is
			  least	significant.
	       STR_4B	  Each character is represented	by
			  four,	consecutive unsigned bytes.
			  The first byte is most
			  significant.	The last byte is
			  least	significant.
	       STR_16	  Each character is represented	by
			  a 16-bit unsigned integer.
	       STR_32	  Each character is represented	by
			  a 32-bit unsigned integer.


     str      expects a	pointer	to the string whose width is to	be computed.
	      The contents of the string should	be consistent with respect to
	      the type parameter.

DESCRIPTION    [Toc]    [Back]

     lstrwidth returns the width of a text string in pixels, using the
     character spacing parameters of the current raster	font.

     Multi-byte	types (2B, 3B and 4B) are converted to character values	using
     the following formulas for	character i in unsigned	byte-string s:

       STR_2B: (s[2*i]*256) + s[2*i+1]
       STR_3B: ((s[3*i]*256) + s[3*i+1])*256 + s[3*i+2]
       STR_4B: (((s[4*i]*256) +	s[4*i+1])*256) + s[4*i+2])*256 + s[4*i+3]

     End of string is indicated	by a character value of	zero.

     Undefined characters have zero width.



									Page 1






lstrwidth(3G)							 lstrwidth(3G)


SEE ALSO    [Toc]    [Back]

      
      
     deflfont, getlwidth, lcharstr, mapw, mapw2

NOTE    [Toc]    [Back]

     This routine is available only in immediate mode.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
XmStringWidth Tru64 A compound string function that returns the width of the longest sequence of text components in a co...
XmStringWidth IRIX A compound string function that returns the width of the longest sequence of text components in a compound str
XmStringWidth HP-UX A compound string function that returns the width of the widest line in a compound string
DXmCSTextGetMaxLength Tru64 Retrieves (returns) current maximum allowable length of the text in the compound string text widget.
DXmSvnGetComponentWidth Tru64 Retrieves (returns) the width of a specified component.
DXmCSTextNumLines Tru64 Retrieves (returns) the number of visible lines in the compound string text widget.
XmMapSegmentEncoding IRIX A compound string function that returns the compound text encoding format associated with the specified font l
XmMapSegmentEncoding HP-UX A compound string function that returns the compound text encoding format associated with the specified font l
XmMapSegmentEncoding Tru64 A compound string function that returns the compound text encoding format associated with the specif...
fmstrwid IRIX return the width of a string in pixels
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service