Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ strwidth(3G) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

strwidth(3G)  —  Silicon Graphics

NAME

strwidth − returns the width of the specified text string

SPECIFICATION

C
long strwidth(str)
String str;

FORTRAN
integer*4 function strwid(str, length)
character*(*) str
integer*4 length

Pascal
function strwidth(str: pstring128): longint;

DESCRIPTION

strwidth returns the width of a text string in pixels, using the character spacing parameters of the current raster font.  strwidth is useful when you do a simple mapping from screen space to world space. 

Undefined characters have zero width. 

In FORTRAN, strwid has two arguments: str is the name of the string; length is the number of characters in that string. 

SEE ALSO

getdescender, getheight, getlwidth, mapw, mapw2 Programming Guide, Section 5.3, Fonts

NOTE

This routine is available only in immediate mode. 

Version 3.6  —  December 20, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026