•  Back 
  •  VDI structures 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File7.13.4  fix31                                                      TOS

The data type fix31 corresponds to the type LONG, and is required in 
connection with vector fonts where one calculates positions and steps 
in 1/65536. Here the width of a pixel corresponds to the value 65536. 
The upper 16 bits represent the whole number part and the lower 16 
bits the decimal part of the number.

Examples:

 Hex        Dec 
 $00010000  65536    1.0 pixels 
 $0001c000  114688   1.75 pixels 
 $fffec000  -81920   -1.25 pixels 
 $fffe4000  -114688  -1.75 pixels 

Important: The decimal part may never be cut off!

If you add advance widths (returned by vqt_advance) and you would like 
to determine the discrete coordinate for cursor placement, you should 
use the following code:

int16_t fix31_to_pixel( fix31 a )
{
   int16_t b;

   b = (int16_t) (( a + 32768L ) >> 16 ); /* Round !! */
   return( b );                           /* Return pixel value */
}

See Also: GDOS   NVDI   SpeedoGDOS