Returns the width of the specified text string.
FORTRAN (libfgl.a)
Int32 strwidth(Char8 * string)
INTEGER*4 FUNCTION STRWID(string, length) CHARACTER*(*) string INTEGER*4 length
The strwidth subroutine returns the width of a text string in pixels, using the character-spacing parameters of the current raster font. This subroutine is useful when you do a simple mapping from screen space to modeling space.
Undefined characters have zero width.
Note: This subroutine cannot be used to add to a display list.
string | Specifies the name of the string. |
length | Specifies the number of characters in the string. |
The example C language program prompt.c uses the strwidth subroutine to get the number of pixels needed to draw a prompt string.
This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.
/usr/include/gl/gl.h | Contains C language constant and variable type definitions for GL. |
/usr/include/gl/fgl.h | Contains FORTRAN constant and variable type definitions for GL. |
Mapping a point on the screen into a line in 3-D modeling coordinates with the mapw subroutine.
Mapping a point on the screen into a line in 2-D modeling coordinates with the mapw2 subroutine.
AIX Graphics Library Overview, Creating Text Characters, Picking and Selecting Overview, Working with Coordinate Systems, and Querying the System.