EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #487 background imageLoading...
Page #487 background image
Appendix A: System Routines — Display
445
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
sf_width
Declaration:
UCHAR
sf_width
(UCHAR
ch
)
Category(ies):
Display
Description:
Return the width in pixels of a small font character.
Inputs:
ch
Character to get width of.
Outputs:
Width of given character in the small font.
Assumptions:
Note that the small font (4x6) is the only proportional font; all the other
fonts (large and huge) are fixed width.
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI
-
89 / TI
-
92 Plus
Plus Differences:
The small font is generally used more on the TI
-
89 than on the TI
-
92 Plus.
It allows for more characters to fit on a line since it is proportional.
See Also: DrawStrWidth, DrawStrWidthP
Example:
The
DrawStrWidth
function uses
sf_width
to compute the width of small
(4x6) font characters.
/* Return the length of the given string in pixels.
For the 8x10/6x8 font this is just 8/6 times the length of the string,
but the 4x6 font is proportional.
*/
WORD DrawStrWidth( const char *Str, BYTE FontType )
{ register BYTE c;
register WORD Width;
switch( FontType ) {
case F_4x6:
Width = 0;
while (c = *Str++)
Width += sf_width (c); /* proportional font */
return Width;
case F_6x8: return (6 * strlen((char *) Str));
case F_8x10: return (strlen(Str) << 3);
}
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals