home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / manuals.arj / REF.DOC next >
Text File  |  1995-02-06  |  403KB  |  18,052 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. Fastgraph (tm)
  18.  
  19.  
  20.  
  21.  
  22.  
  23. Reference Manual                                                               
  24. Copyright (c) 1991-1995 by Ted Gruber Software, Inc.
  25.  
  26. All rights reserved. No part of this publication may be reproduced, stored in
  27. a retrieval system, or transmitted by any means, electronic, mechanical,
  28. photocopying, recording, or otherwise, without express written permission from
  29. Ted Gruber Software. The software described in this publication is furnished
  30. under a license agreement and may be used or copied only in accordance with
  31. the terms of that agreement.
  32.  
  33. This publication and its associated software are sold without warranties,
  34. either expressed or implied, regarding their merchantability or fitness for
  35. any particular application or purpose. The information in this publication is
  36. subject to change without notice and does not represent a commitment on the
  37. part of Ted Gruber Software. In no event shall Ted Gruber Software be liable
  38. for any loss of profit or any other commercial damage, including but not
  39. limited to special, incidental, consequential, or other damages resulting from
  40. the use of or the inability to use this product, even if Ted Gruber Software
  41. has been notified of the possibility of such damages.
  42.  
  43.  
  44. First Printing, August 1994
  45.  
  46. Fastgraph version 4.0
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. All brand and product names mentioned in this publication are trademarks or
  56. registered trademarks of their respective holders.                             
  57.  
  58.                        T a b l e   o f   C o n t e n t s
  59.  
  60.  
  61. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  62.  
  63. Fastgraph Routines by Category  . . . . . . . . . . . . . . . . . . . . .    1
  64.  
  65. Alphabetical List of Fastgraph Routines . . . . . . . . . . . . . . . . .    2
  66.      fg_allocate  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  67.      fg_alloccms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  68.      fg_allocems  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  69.      fg_allocxms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  70.      fg_automode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  71.      fg_bestmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    9
  72.      fg_box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  73.      fg_boxdepth  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  74.      fg_boxw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
  75.      fg_boxx  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  76.      fg_boxxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
  77.      fg_button  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15
  78.      fg_capslock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   16
  79.      fg_chgattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   17
  80.      fg_chgtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   18
  81.      fg_circle  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  82.      fg_circlef . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   20
  83.      fg_circlefw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   21
  84.      fg_circlew . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   22
  85.      fg_clipmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   23
  86.      fg_clipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   24
  87.      fg_clpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   25
  88.      fg_clprect . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   26
  89.      fg_clprectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   27
  90.      fg_colors  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   28
  91.      fg_copypage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  92.      fg_cursor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   30
  93.      fg_dash  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
  94.      fg_dashrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
  95.      fg_dashrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   33
  96.      fg_dashw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   34
  97.      fg_defcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   35
  98.      fg_defpages  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
  99.      fg_dispfile  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   37
  100.      fg_display . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   38
  101.      fg_displayp  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  102.      fg_draw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
  103.      fg_drawmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   43
  104.      fg_drawmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   44
  105.      fg_drawrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   46
  106.      fg_drawrelx  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
  107.      fg_drawrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   48
  108.      fg_drawrxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   49
  109.      fg_draww . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   50
  110.      fg_drawx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
  111.      fg_drawxw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   52
  112.      fg_drect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   53
  113.  
  114.  
  115.                                       iii                                      
  116.      fg_drectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   54
  117.      fg_drwimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   55
  118.      fg_egacheck  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   56
  119.      fg_ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   57
  120.      fg_ellipsef  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   58
  121.      fg_ellipsew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   59
  122.      fg_ellipsfw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   60
  123.      fg_erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   61
  124.      fg_fadein  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   62
  125.      fg_fadeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   63
  126.      fg_fillpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   64
  127.      fg_findpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   65
  128.      fg_flicdone  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   66
  129.      fg_flichead  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   67
  130.      fg_flicmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   68
  131.      fg_flicopen  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   69
  132.      fg_flicplay  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   70
  133.      fg_flicsize  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   71
  134.      fg_flicskip  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   72
  135.      fg_flipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   73
  136.      fg_flood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   74
  137.      fg_floodw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   75
  138.      fg_flpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   76
  139.      fg_fontsize  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   77
  140.      fg_freepage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   78
  141.      fg_getaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   79
  142.      fg_getattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   80
  143.      fg_getbanks  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   81
  144.      fg_getblock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   82
  145.      fg_getchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   83
  146.      fg_getclip . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   84
  147.      fg_getclock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   85
  148.      fg_getcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   86
  149.      fg_getdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   87
  150.      fg_getentry  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   88
  151.      fg_gethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   89
  152.      fg_getimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   90
  153.      fg_getindex  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   91
  154.      fg_getkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   92
  155.      fg_getlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   93
  156.      fg_getmap  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   94
  157.      fg_getmaxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  158.      fg_getmaxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   96
  159.      fg_getmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   97
  160.      fg_getpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   98
  161.      fg_getpixel  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   99
  162.      fg_getrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  100
  163.      fg_getview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  101
  164.      fg_getvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  102
  165.      fg_getworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  103
  166.      fg_getxbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  104
  167.      fg_getxjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  105
  168.      fg_getxjust  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  106
  169.      fg_getxpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  107
  170.      fg_getybox . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  108
  171.      fg_getyjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  109
  172.  
  173.  
  174.                                       iv                                       
  175.      fg_getyjust  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  110
  176.      fg_getypos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  111
  177.      fg_gifhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  112
  178.      fg_gifmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  113
  179.      fg_gifpal  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  114
  180.      fg_gifrange  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  115
  181.      fg_hush  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  116
  182.      fg_hushnext  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  117
  183.      fg_imagebuf  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  118
  184.      fg_imagesiz  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  119
  185.      fg_initems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  120
  186.      fg_initjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  121
  187.      fg_initpm  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  122
  188.      fg_initw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  123
  189.      fg_initxms . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  124
  190.      fg_inside  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  125
  191.      fg_intjoy  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  126
  192.      fg_intkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  128
  193.      fg_invert  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  129
  194.      fg_justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  130
  195.      fg_kbinit  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  131
  196.      fg_kblast  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  132
  197.      fg_kbreset . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  133
  198.      fg_kbtest  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  134
  199.      fg_loadpcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  135
  200.      fg_locate  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  136
  201.      fg_makegif . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  137
  202.      fg_makepcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  139
  203.      fg_makeppr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  141
  204.      fg_makespr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  142
  205.      fg_maprgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  143
  206.      fg_measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  144
  207.      fg_memavail  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  145
  208.      fg_memory  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  146
  209.      fg_mouse256  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  147
  210.      fg_mousebut  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  148
  211.      fg_mousecur  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  149
  212.      fg_mousefin  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  150
  213.      fg_mouseini  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  151
  214.      fg_mouselim  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  152
  215.      fg_mousemov  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  153
  216.      fg_mousepos  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  154
  217.      fg_mouseptr  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  155
  218.      fg_mousespd  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  156
  219.      fg_mousevis  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  157
  220.      fg_move  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  158
  221.      fg_moverel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  159
  222.      fg_moverw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  160
  223.      fg_movew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  161
  224.      fg_music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  162
  225.      fg_musicb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  164
  226.      fg_numlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  165
  227.      fg_pack  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  166
  228.      fg_pagesize  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  167
  229.      fg_paint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  168
  230.      fg_paintw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  169
  231.  
  232.  
  233.                                        v                                       
  234.      fg_palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  170
  235.      fg_palettes  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  172
  236.      fg_pan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  173
  237.      fg_panw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  174
  238.      fg_pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  175
  239.      fg_pcxhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  176
  240.      fg_pcxmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  177
  241.      fg_pcxpal  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  178
  242.      fg_pcxrange  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  179
  243.      fg_playing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  180
  244.      fg_point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  181
  245.      fg_pointw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  182
  246.      fg_pointx  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  183
  247.      fg_pointxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  184
  248.      fg_polyedge  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  185
  249.      fg_polyfill  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  186
  250.      fg_polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  187
  251.      fg_polygonw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  188
  252.      fg_polyline  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  189
  253.      fg_polyoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  190
  254.      fg_print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  191
  255.      fg_printc  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  192
  256.      fg_putblock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  193
  257.      fg_putimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  194
  258.      fg_quiet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  195
  259.      fg_rect  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  196
  260.      fg_rectw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  197
  261.      fg_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  198
  262.      fg_resize  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  199
  263.      fg_restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  201
  264.      fg_restorew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  202
  265.      fg_resume  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  203
  266.      fg_revimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  204
  267.      fg_revmask . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  205
  268.      fg_save  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  206
  269.      fg_savew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  207
  270.      fg_scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  208
  271.      fg_scrlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  209
  272.      fg_scroll  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  210
  273.      fg_setangle  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  212
  274.      fg_setattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  213
  275.      fg_setbanks  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  214
  276.      fg_setcaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  215
  277.      fg_setclip . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  216
  278.      fg_setclipw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  217
  279.      fg_setcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  218
  280.      fg_setdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  219
  281.      fg_setentry  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  220
  282.      fg_setfunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  221
  283.      fg_sethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  222
  284.      fg_setlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  223
  285.      fg_setmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  224
  286.      fg_setnum  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  226
  287.      fg_setpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  227
  288.      fg_setratio  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  228
  289.      fg_setrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  229
  290.  
  291.  
  292.                                       vi                                       
  293.      fg_setsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  230
  294.      fg_setsizew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  231
  295.      fg_setview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  232
  296.      fg_setvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  234
  297.      fg_setworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  235
  298.      fg_shear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  236
  299.      fg_showflic  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  238
  300.      fg_showgif . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  239
  301.      fg_showpcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  240
  302.      fg_showppr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  242
  303.      fg_showspr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  243
  304.      fg_sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  244
  305.      fg_sounds  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  245
  306.      fg_split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  247
  307.      fg_stall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  248
  308.      fg_suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  249
  309.      fg_svgainit  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  250
  310.      fg_svgastat  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  251
  311.      fg_svgaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  252
  312.      fg_swchar  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  253
  313.      fg_swlength  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  254
  314.      fg_swtext  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  255
  315.      fg_tcdefine  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  256
  316.      fg_tcmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  257
  317.      fg_tcxfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  258
  318.      fg_testmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  260
  319.      fg_text  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  261
  320.      fg_textc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  262
  321.      fg_transfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  263
  322.      fg_unpack  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  265
  323.      fg_vbaddr  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  266
  324.      fg_vballoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  267
  325.      fg_vbclose . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  268
  326.      fg_vbcopy  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  269
  327.      fg_vbcut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  270
  328.      fg_vbdefine  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  271
  329.      fg_vbfree  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  272
  330.      fg_vbhandle  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  273
  331.      fg_vbinit  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  274
  332.      fg_vbopen  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  275
  333.      fg_vbpaste . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  276
  334.      fg_vbtccopy  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  277
  335.      fg_vbtcxfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  278
  336.      fg_vbundef . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  279
  337.      fg_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  280
  338.      fg_vgastate  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  281
  339.      fg_voice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  282
  340.      fg_voices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  284
  341.      fg_waitfor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  286
  342.      fg_waitkey . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  287
  343.      fg_waitvr  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  288
  344.      fg_where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  289
  345.      fg_xalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  290
  346.      fg_xconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  291
  347.      fg_xscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  292
  348.      fg_xview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  293
  349.  
  350.  
  351.                                       vii                                      
  352.      fg_xworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  294
  353.      fg_yalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  295
  354.      fg_yconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  296
  355.      fg_yscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  297
  356.      fg_yview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  298
  357.      fg_yworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  299
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.                                      viii                                      
  411.  
  412. Introduction
  413.  
  414.      The Fastgraph Reference Manual is a companion publication to the
  415. Fastgraph User's Guide. Whereas the latter publication is essentially a
  416. detailed tutorial about Fastgraph, the Fastgraph Reference Manual is intended
  417. as a reference for programmers familiar with the product.
  418.  
  419.      This manual has two major parts. The first part lists the Fastgraph
  420. routines by category; each category corresponds to a chapter in the Fastgraph
  421. User's Guide. The second part, which occupies the larger portion of this
  422. manual, gives descriptions of each Fastgraph routine in alphabetical order.
  423.  
  424.  
  425. Fastgraph Routines by Category
  426.  
  427.      This section lists the Fastgraph routines by category. These categories
  428. parallel the chapters in the Fastgraph User's Guide. The lists in this section
  429. are provided as a general overview of Fastgraph's capabilities. You can find
  430. detailed information about each Fastgraph routine in the next section of this
  431. manual, and of course in the Fastgraph User's Guide.
  432.  
  433. Video Initialization Routines:  fg_automode, fg_bestmode, fg_cursor,
  434. fg_egacheck, fg_getlines, fg_getmode, fg_initpm, fg_memory, fg_reset,
  435. fg_setlines, fg_setmode, fg_svgainit, fg_svgastat, fg_testmode.
  436.  
  437. Coordinate Routines:  fg_getmaxx, fg_getmaxy, fg_getview, fg_getworld,
  438. fg_initw, fg_setview, fg_setworld, fg_xalpha, fg_xconvert, fg_xscreen,
  439. fg_xview, fg_xworld, fg_yalpha, fg_yconvert, fg_yscreen, fg_yview, fg_yworld.
  440.  
  441. Color-Related Routines:  fg_colors, fg_defcolor, fg_getcolor, fg_getdacs,
  442. fg_getindex, fg_getrgb, fg_maprgb, fg_palette, fg_palettes, fg_setattr,
  443. fg_setcolor, fg_setdacs, fg_setrgb.
  444.  
  445. Fundamental Graphics Routines:  fg_box, fg_boxdepth, fg_boxw, fg_boxx,
  446. fg_boxxw, fg_circle, fg_circlef, fg_circlefw, fg_circlew, fg_clprect,
  447. fg_clprectw, fg_dash, fg_dashrel, fg_dashrw, fg_dashw, fg_draw, fg_drawrel,
  448. fg_drawrelx, fg_drawrw, fg_drawrxw, fg_draww, fg_drawx, fg_drawxw, fg_drect,
  449. fg_drectw, fg_ellipse, fg_ellipsef, fg_ellipsew, fg_ellipsfw, fg_erase,
  450. fg_fillpage, fg_flood, fg_floodw, fg_getclip, fg_getpixel, fg_getxbox,
  451. fg_getxpos, fg_getybox, fg_getypos, fg_inside, fg_move, fg_moverel, fg_moverw,
  452. fg_movew, fg_paint, fg_paintw, fg_point, fg_pointw, fg_pointx, fg_pointxw,
  453. fg_polyedge, fg_polyfill, fg_polygon, fg_polygonw, fg_polyline, fg_polyoff,
  454. fg_rect, fg_rectw, fg_setclip, fg_setclipw.
  455.  
  456. Character Display Routines:  fg_chgattr, fg_chgtext, fg_fontsize, fg_getattr,
  457. fg_getchar, fg_getxjust, fg_getyjust, fg_justify, fg_locate, fg_print,
  458. fg_printc, fg_setangle, fg_setattr, fg_setcolor, fg_setratio, fg_setsize,
  459. fg_setsizew, fg_swchar, fg_swlength, fg_swtext, fg_text, fg_textc, fg_where,
  460. fg_xalpha, fg_xconvert, fg_yalpha, fg_yconvert.
  461.  
  462. Video Page and Virtual Buffer Routines:  fg_allocate, fg_alloccms,
  463. fg_allocems, fg_allocxms, fg_copypage, fg_defpages, fg_findpage, fg_freepage,
  464. fg_getaddr, fg_getentry, fg_gethpage, fg_getpage, fg_getvpage, fg_initems,
  465. fg_initxms, fg_pagesize, fg_resize, fg_setentry, fg_sethpage, fg_setpage,
  466. fg_setvpage, fg_vbaddr, fg_vballoc, fg_vbclose, fg_vbcopy, fg_vbcut,
  467.  
  468.  
  469.                                        1                                       
  470. fg_vbdefine, fg_vbfree, fg_vbhandle, fg_vbinit, fg_vbopen, fg_vbpaste,
  471. fg_vbtccopy, fg_vbtcxfer, fg_vbundef.
  472.  
  473. Image File Routines:  fg_dispfile, fg_flicdone, fg_flichead, fg_flicmode,
  474. fg_flicopen, fg_flicplay, fg_flicsize, fg_flicskip, fg_gifhead, fg_gifmode,
  475. fg_gifpal, fg_gifrange, fg_imagebuf, fg_loadpcx, fg_makegif, fg_makepcx,
  476. fg_makeppr, fg_makespr, fg_pattern, fg_pcxhead, fg_pcxmode, fg_pcxpal,
  477. fg_pcxrange, fg_showflic, fg_showgif, fg_showpcx, fg_showppr, fg_showspr.
  478.  
  479. Bitmapped Image Routines:  fg_clipmap, fg_clipmask, fg_clpimage, fg_display,
  480. fg_displayp, fg_drawmap, fg_drawmask, fg_drwimage, fg_flipmask, fg_flpimage,
  481. fg_getimage, fg_getmap, fg_imagesiz, fg_invert, fg_pack, fg_putimage,
  482. fg_revimage, fg_revmask, fg_scale, fg_shear, fg_unpack.
  483.  
  484. Block Transfer Routines:  fg_copypage, fg_getblock, fg_putblock, fg_restore,
  485. fg_restorew, fg_save, fg_savew, fg_tcdefine, fg_tcmask, fg_tcxfer,
  486. fg_transfer, fg_vbcopy, fg_vbcut, fg_vbpaste, fg_vbtccopy, fg_vbtcxfer.
  487.  
  488. Special Effects Routines:  fg_fadein, fg_fadeout, fg_pan, fg_panw, fg_resize,
  489. fg_scroll, fg_split.
  490.  
  491. Input Routines:  fg_button, fg_capslock, fg_getkey, fg_getxjoy, fg_getyjoy,
  492. fg_initjoy, fg_intjoy, fg_intkey, fg_kbinit, fg_kblast, fg_kbreset, fg_kbtest,
  493. fg_mouse256, fg_mousebut, fg_mousecur, fg_mousefin, fg_mouseini, fg_mouselim,
  494. fg_mousemov, fg_mousepos, fg_mouseptr, fg_mousespd, fg_mousevis, fg_numlock,
  495. fg_scrlock, fg_setcaps, fg_setnum, fg_waitkey.
  496.  
  497. Sound Routines:  fg_hush, fg_hushnext, fg_music, fg_musicb, fg_playing,
  498. fg_quiet, fg_resume, fg_sound, fg_sounds, fg_suspend, fg_voice, fg_voices.
  499.  
  500. Timing Routines:  fg_getclock, fg_measure, fg_stall, fg_waitfor.
  501.  
  502. Miscellaneous Routines:  fg_getbanks, fg_memavail, fg_setbanks, fg_setfunc,
  503. fg_svgaver, fg_version, fg_vgastate, fg_waitvr.
  504.  
  505.  
  506. Alphabetical List of Fastgraph Routines
  507.  
  508.      This section presents a detailed description of each Fastgraph routine.
  509. Once you're familiar with Fastgraph, you'll probably refer to these
  510. descriptions more often than any other section of the Fastgraph manuals.
  511.  
  512.      The information presented for each routine includes the following:
  513.  
  514.                     * function prototypes or declarations
  515.                       for each supported language
  516.                     * a description of the routine itself
  517.                     * the number of parameters, their
  518.                       purpose, and their data types
  519.                     * the meaning and data type of the
  520.                       routine's return value (if any)
  521.                     * information about important
  522.                       restrictions pertaining to the
  523.                       routine
  524.  
  525.  
  526.  
  527.  
  528.                                        2                                       
  529.                     * references to similar routines, or
  530.                       other routines that affect the
  531.                       routine
  532.                     * example programs in the Fastgraph
  533.                       User's Guide that use the routine
  534.  
  535.      A prototype specifies the data types of a routine's parameters and return
  536. value. The description of each Fastgraph routine includes prototypes for
  537. C/C++, BASIC, FORTRAN, and Pascal (in that order). For example, the prototypes
  538. for fg_allocate are:
  539.  
  540.             int fg_allocate (int page_number);
  541.             function FGallocate% (page_number%)
  542.             int function fg_allocate (int page_number)
  543.             function fg_allocate (page_number : integer) : integer;
  544.  
  545. The C/C++, BASIC, and Pascal prototypes use the declaration syntax for those
  546. languages. FORTRAN does not use function prototypes, so we'll create our own
  547. prototype syntax using the data type abbreviations of Microsoft's FORTRAN
  548. PowerStation compiler. In the FORTRAN prototypes, each parameter is preceded
  549. by one of the data type indicators shown here:
  550.  
  551.                      indicator  FORTRAN data type
  552.  
  553.                        char       CHARACTER*(*)
  554.                         int          INTEGER
  555.                        int1         INTEGER*1
  556.                        int2         INTEGER*2
  557.                        int4         INTEGER*4
  558.                         dbl          REAL*8
  559.  
  560. The int data type is equivalent to INTEGER*2 in 16-bit environments (Microsoft
  561. FORTRAN) and equivalent to INTEGER*4 in 32-bit environments (Microsoft FORTRAN
  562. PowerStation). Furthermore, if the routine has a return value, the prototype
  563. begins with the return value's data type indicator followed by the word
  564. function. If the routine has no return value, the prototype begins with the
  565. word subroutine.
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.                                        3                                       
  588. -------------------------------------------------------------------------------
  589. fg_allocate
  590. -------------------------------------------------------------------------------
  591.  
  592. Prototype
  593.  
  594.    int fg_allocate (int page_number);
  595.    function FGallocate% (page_number%)
  596.    int function fg_allocate (int page_number)
  597.    function fg_allocate (page_number : integer) : integer;
  598.  
  599. Description
  600.  
  601.    The fg_allocate routine creates a virtual video page. The amount of memory
  602.    required depends on the current video mode.
  603.  
  604. Parameters
  605.  
  606.    page_number is the number by which the virtual page will be referenced. It
  607.    must be between 1 and 63.
  608.  
  609. Return value
  610.  
  611.    A status code indicating the success or failure of the virtual page
  612.    creation, as shown here:
  613.  
  614.      0 = virtual page created
  615.      1 = specified page is a physical or logical page
  616.      7 = virtual page created, but memory control blocks were destroyed
  617.      8 = insufficient memory to create the virtual page
  618.  
  619. Restrictions
  620.  
  621.    This routine has no effect if page_number references a physical video page,
  622.    a logical video page, or if used in a video mode that does not support
  623.    virtual video pages.
  624.  
  625. See also
  626.  
  627.    fg_findpage, fg_freepage, fg_pagesize
  628.  
  629. Examples
  630.  
  631.    8-3, 8-4, 8-5, 8-6, 8-9, 11-1, 11-2, 11-3, 11-4, 12-4, 12-5, 13-2, 13-5,
  632.    17-1
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.                                        4                                       
  647. -------------------------------------------------------------------------------
  648. fg_alloccms
  649. -------------------------------------------------------------------------------
  650.  
  651. Prototype
  652.  
  653.    int fg_alloccms (int page_number);
  654.    function FGalloccms% (page_number%)
  655.    int function fg_alloccms (int page_number)
  656.    function fg_alloccms (page_number : integer) : integer;
  657.  
  658. Description
  659.  
  660.    The fg_alloccms routine creates a logical page in conventional memory. The
  661.    amount of memory required depends on the current video mode and video
  662.    buffer dimensions.
  663.  
  664. Parameters
  665.  
  666.    page_number is the number by which the logical page will be referenced. It
  667.    must be between 1 and 63.
  668.  
  669. Return value
  670.  
  671.     0 = logical page created in conventional memory
  672.    -2 = invalid page number
  673.    -3 = page already created, or page exists as a physical or virtual page
  674.    -4 = insufficient conventional memory to create the page
  675.  
  676. Restrictions
  677.  
  678.    This routine has no effect if page_number references a physical or virtual
  679.    video page.
  680.  
  681.    The only function you can perform with logical pages is copying one entire
  682.    page to another (with fg_copypage).
  683.  
  684. See also
  685.  
  686.    fg_allocems, fg_allocxms, fg_copypage, fg_findpage, fg_freepage,
  687.    fg_pagesize
  688.  
  689. Examples
  690.  
  691.    8-10, 8-12
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.                                        5                                       
  706. -------------------------------------------------------------------------------
  707. fg_allocems
  708. -------------------------------------------------------------------------------
  709.  
  710. Prototype
  711.  
  712.    int fg_allocems (int page_number);
  713.    function FGallocems% (page_number%)
  714.    int function fg_allocems (int page_number)
  715.    function fg_allocems (page_number : integer) : integer;
  716.  
  717. Description
  718.  
  719.    The fg_allocems routine creates a logical page in expanded memory (EMS).
  720.    The amount of memory required depends on the current video mode and video
  721.    buffer dimensions.
  722.  
  723. Parameters
  724.  
  725.    page_number is the number by which the logical page will be referenced. It
  726.    must be between 1 and 63.
  727.  
  728. Return value
  729.  
  730.     0 = logical page created in expanded memory
  731.    -1 = Expanded Memory Manager not initialized
  732.    -2 = invalid page number
  733.    -3 = page already created, or page exists as a physical or virtual page
  734.    -4 = insufficient expanded memory to create the page
  735.  
  736. Restrictions
  737.  
  738.    This routine has no effect if page_number references a physical or virtual
  739.    video page.
  740.  
  741.    Before using this routine, you must use fg_initems to initialize the
  742.    Expanded Memory Manager.
  743.  
  744.    The only function you can perform with EMS logical pages is copying one
  745.    entire page to another (with fg_copypage).
  746.  
  747. See also
  748.  
  749.    fg_alloccms, fg_allocxms, fg_copypage, fg_findpage, fg_freepage,
  750.    fg_initems, fg_pagesize
  751.  
  752. Examples
  753.  
  754.    8-10
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.                                        6                                       
  765. -------------------------------------------------------------------------------
  766. fg_allocxms
  767. -------------------------------------------------------------------------------
  768.  
  769. Prototype
  770.  
  771.    int fg_allocxms (int page_number);
  772.    function FGallocxms% (page_number%)
  773.    int function fg_allocxms (int page_number)
  774.    function fg_allocxms (page_number : integer) : integer;
  775.  
  776. Description
  777.  
  778.    The fg_allocxms routine creates a logical page in extended memory (XMS).
  779.    The amount of memory required depends on the current video mode and video
  780.    buffer dimensions.
  781.  
  782. Parameters
  783.  
  784.    page_number is the number by which the logical page will be referenced. It
  785.    must be between 1 and 63.
  786.  
  787. Return value
  788.  
  789.     0 = logical page created in extended memory
  790.    -1 = XMS driver not present
  791.    -2 = invalid page number
  792.    -3 = page already created, or page exists as a physical or virtual page
  793.    -4 = insufficient extended memory to create the page
  794.  
  795. Restrictions
  796.  
  797.    This routine has no effect if page_number references a physical or virtual
  798.    video page.
  799.  
  800.    Before using this routine, you must use fg_initxms to initialize the XMS
  801.    driver.
  802.  
  803.    The only function you can perform with XMS logical pages is copying one
  804.    entire page to another (with fg_copypage).
  805.  
  806. See also
  807.  
  808.    fg_alloccms, fg_allocems, fg_copypage, fg_findpage, fg_freepage,
  809.    fg_initxms, fg_pagesize
  810.  
  811. Examples
  812.  
  813.    8-10
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.                                        7                                       
  824. -------------------------------------------------------------------------------
  825. fg_automode
  826. -------------------------------------------------------------------------------
  827.  
  828. Prototype
  829.  
  830.    int fg_automode (void);
  831.    function FGautomode% ()
  832.    int function fg_automode ()
  833.    function fg_automode : integer;
  834.  
  835. Description
  836.  
  837.    The fg_automode routine determines the graphics video mode that offers the
  838.    most features for the user's display and adapter configuration.
  839.  
  840. Parameters
  841.  
  842.    none
  843.  
  844. Return value
  845.  
  846.    The return value is the proposed video mode number. The current display and
  847.    adapter configuration determine the mode number, as shown here:
  848.  
  849.                                          display
  850.                        adapter   mono   RGB   ECD   VGA
  851.  
  852.                           MDA       7     0     7     7
  853.                           HGC      11     0     0    11
  854.                           CGA       0     4     0     0
  855.                           EGA      15    13    16     0
  856.                           VGA      17    17    17    18
  857.                          MCGA      17    17    17    19
  858.                         Tandy       7     9     0     0
  859.                          PCjr       7     9     0     0
  860.  
  861.    The return value can either be passed directly to fg_setmode, or it can
  862.    help determine suitable video modes for your program.
  863.  
  864. Restrictions
  865.  
  866.    For compatibility with previous versions of Fastgraph, this function does
  867.    not consider XVGA or SVGA graphics modes when proposing a video mode.
  868.  
  869. See also
  870.  
  871.    fg_bestmode, fg_setmode, fg_testmode
  872.  
  873. Examples
  874.  
  875.    3-6, 4-4
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.                                        8                                       
  883. -------------------------------------------------------------------------------
  884. fg_bestmode
  885. -------------------------------------------------------------------------------
  886.  
  887. Prototype
  888.  
  889.    int fg_bestmode (int horizontal, int vertical, int pages);
  890.    function FGbestmode% (horizontal%, vertical%, pages%)
  891.    int function fg_bestmode (int horizontal, int vertical, int pages)
  892.    function fg_bestmode (horizontal, vertical, pages : integer) : integer;
  893.  
  894. Description
  895.  
  896.    The fg_bestmode routine determines the video mode having the requested
  897.    resolution and the most features for the user's display and adapter
  898.    configuration. It is similar to fg_automode, but it excludes video modes
  899.    that do not offer the specified resolution and video page requirements. The
  900.    video pages can include physical pages, virtual pages, or both. In modes
  901.    that support virtual pages, fg_bestmode does not check if the virtual pages
  902.    have been created, only that there is enough conventional memory available
  903.    to do so.
  904.  
  905. Parameters
  906.  
  907.    horizontal specifies the required horizontal resolution in pixels.
  908.  
  909.    vertical specifies the required vertical resolution in pixels.
  910.  
  911.    pages specifies the required number of physical or virtual video pages.
  912.  
  913. Return value
  914.  
  915.    If fg_bestmode finds a video mode that offers the specified resolution and
  916.    video page requirements, it returns the corresponding video mode number. If
  917.    not, it returns -1.
  918.  
  919. Restrictions
  920.  
  921.    SVGA graphics modes (24 to 29) are available only after successfully
  922.    initializing the SVGA kernel with fg_svgainit.
  923.  
  924.    The fg_bestmode routine does not consider extended video pages when testing
  925.    if the requested number of video pages is available.
  926.  
  927. See also
  928.  
  929.    fg_automode, fg_setmode, fg_svgainit, fg_testmode
  930.  
  931. Examples
  932.  
  933.    3-4, 3-7
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.                                        9                                       
  942. -------------------------------------------------------------------------------
  943. fg_box
  944. -------------------------------------------------------------------------------
  945.  
  946. Prototype
  947.  
  948.    void fg_box (int minx, int maxx, int miny, int maxy);
  949.    sub FGbox (minx%, maxx%, miny%, maxy%)
  950.    subroutine fg_box (int minx, int maxx, int miny, int maxy)
  951.    procedure fg_box (minx, maxx, miny, maxy : integer);
  952.  
  953. Description
  954.  
  955.    The fg_box routine draws an unfilled rectangle in screen space, with
  956.    respect to the clipping region. The width of the rectangle's edges is one
  957.    pixel unless changed with fg_boxdepth.
  958.  
  959. Parameters
  960.  
  961.    minx is the x coordinate of the rectangle's left edge.
  962.  
  963.    maxx is the x coordinate of the rectangle's right edge. It must be greater
  964.    than or equal to the value of minx.
  965.  
  966.    miny is the y coordinate of the rectangle's top edge.
  967.  
  968.    maxy is the y coordinate of the rectangle's bottom edge. It must be greater
  969.    than or equal to the value of miny.
  970.  
  971. Return value
  972.  
  973.    none
  974.  
  975. Restrictions
  976.  
  977.    This routine has no effect in text video modes.
  978.  
  979. See also
  980.  
  981.    fg_boxdepth, fg_boxw, fg_boxx, fg_rect
  982.  
  983. Examples
  984.  
  985.    6-12, 8-12, 8-17, 10-17, 10-18, 13-7, 13-8, 13-9
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.                                       10                                       
  1001. -------------------------------------------------------------------------------
  1002. fg_boxdepth
  1003. -------------------------------------------------------------------------------
  1004.  
  1005. Prototype
  1006.  
  1007.    void fg_boxdepth (int xdepth, int ydepth);
  1008.    sub FGboxdepth (xdepth%, ydepth%)
  1009.    subroutine fg_boxdepth (int xdepth, int ydepth)
  1010.    procedure fg_boxdepth (xdepth, ydepth : integer);
  1011.  
  1012. Description
  1013.  
  1014.    The fg_boxdepth routine defines the depth of rectangles drawn with the box
  1015.    display routines. The fg_setmode routine initializes the box depth to one
  1016.    pixel in each direction.
  1017.  
  1018. Parameters
  1019.  
  1020.    xdepth is the width in pixels of the rectangle's left and right sides. It
  1021.    must be greater than zero.
  1022.  
  1023.    ydepth is the height in pixels of the rectangle's top and bottom sides. It
  1024.    must be greater than zero.
  1025.  
  1026. Return value
  1027.  
  1028.    none
  1029.  
  1030. Restrictions
  1031.  
  1032.    none
  1033.  
  1034. See also
  1035.  
  1036.    fg_box, fg_boxw, fg_boxx, fg_boxxw
  1037.  
  1038. Examples
  1039.  
  1040.    6-11, 10-17, 10-18
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.                                       11                                       
  1060. -------------------------------------------------------------------------------
  1061. fg_boxw
  1062. -------------------------------------------------------------------------------
  1063.  
  1064. Prototype
  1065.  
  1066.    void fg_boxw (double xmin, double xmax, double ymin, double ymax);
  1067.    sub FGboxw (xmin#, xmax#, ymin#, ymax#)
  1068.    subroutine fg_boxw (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  1069.    procedure fg_boxw (xmin, xmax, ymin, ymax : real);
  1070.  
  1071. Description
  1072.  
  1073.    The fg_boxw routine draws an unfilled rectangle in world space, with
  1074.    respect to the clipping region. The width of the rectangle's edges is one
  1075.    pixel unless changed with fg_boxdepth.
  1076.  
  1077. Parameters
  1078.  
  1079.    xmin is the world space x coordinate of the rectangle's left edge.
  1080.  
  1081.    xmax is the world space x coordinate of the rectangle's right edge. It must
  1082.    be greater than or equal to the value of xmin.
  1083.  
  1084.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1085.  
  1086.    ymax is the world space y coordinate of the rectangle's top edge. It must
  1087.    be greater than or equal to the value of ymin.
  1088.  
  1089. Return value
  1090.  
  1091.    none
  1092.  
  1093. Restrictions
  1094.  
  1095.    This routine has no effect in text video modes and is not available in
  1096.    Fastgraph/Light.
  1097.  
  1098. See also
  1099.  
  1100.    fg_box, fg_boxdepth, fg_boxxw
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.                                       12                                       
  1119. -------------------------------------------------------------------------------
  1120. fg_boxx
  1121. -------------------------------------------------------------------------------
  1122.  
  1123. Prototype
  1124.  
  1125.    void fg_boxx (int minx, int maxx, int miny, int maxy);
  1126.    sub FGboxx (minx%, maxx%, miny%, maxy%)
  1127.    subroutine fg_boxx (int minx, int maxx, int miny, int maxy)
  1128.    procedure fg_boxx (minx, maxx, miny, maxy : integer);
  1129.  
  1130. Description
  1131.  
  1132.    The fg_boxx routine draws an unfilled rectangle in "exclusive or" mode in
  1133.    screen space, with respect to the clipping region. The width of the
  1134.    rectangle's edges is one pixel unless changed with fg_boxdepth.
  1135.  
  1136. Parameters
  1137.  
  1138.    minx is the x coordinate of the rectangle's left edge.
  1139.  
  1140.    maxx is the x coordinate of the rectangle's right edge. It must be greater
  1141.    than or equal to the value of minx.
  1142.  
  1143.    miny is the y coordinate of the rectangle's top edge.
  1144.  
  1145.    maxy is the y coordinate of the rectangle's bottom edge. It must be greater
  1146.    than or equal to the value of miny.
  1147.  
  1148. Return value
  1149.  
  1150.    none
  1151.  
  1152. Restrictions
  1153.  
  1154.    This routine has no effect in text video modes.
  1155.  
  1156.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  1157.    is reset to its default replacement mode on return.
  1158.  
  1159. See also
  1160.  
  1161.    fg_box, fg_boxdepth, fg_boxxw
  1162.  
  1163. Examples
  1164.  
  1165.    6-13
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.                                       13                                       
  1178. -------------------------------------------------------------------------------
  1179. fg_boxxw
  1180. -------------------------------------------------------------------------------
  1181.  
  1182. Prototype
  1183.  
  1184.    void fg_boxxw (double xmin, double xmax, double ymin, double ymax);
  1185.    sub FGboxxw (xmin#, xmax#, ymin#, ymax#)
  1186.    subroutine fg_boxxw (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  1187.    procedure fg_boxxw (xmin, xmax, ymin, ymax : real);
  1188.  
  1189. Description
  1190.  
  1191.    The fg_boxxw routine draws an unfilled rectangle in "exclusive or" mode in
  1192.    world space, with respect to the clipping region. The width of the
  1193.    rectangle's edges is one pixel unless changed with fg_boxdepth.
  1194.  
  1195. Parameters
  1196.  
  1197.    xmin is the world space x coordinate of the rectangle's left edge.
  1198.  
  1199.    xmax is the world space x coordinate of the rectangle's right edge. It must
  1200.    be greater than or equal to the value of xmin.
  1201.  
  1202.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1203.  
  1204.    ymax is the world space y coordinate of the rectangle's top edge. It must
  1205.    be greater than or equal to the value of ymin.
  1206.  
  1207. Return value
  1208.  
  1209.    none
  1210.  
  1211. Restrictions
  1212.  
  1213.    This routine has no effect in text video modes and is not available in
  1214.    Fastgraph/Light.
  1215.  
  1216.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  1217.    is reset to its default replacement mode on return.
  1218.  
  1219. See also
  1220.  
  1221.    fg_boxdepth, fg_boxw, fg_boxx
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.                                       14                                       
  1237. -------------------------------------------------------------------------------
  1238. fg_button
  1239. -------------------------------------------------------------------------------
  1240.  
  1241. Prototype
  1242.  
  1243.    int fg_button (int n);
  1244.    function FGbutton% (n%)
  1245.    int function fg_button (int n)
  1246.    function fg_button (n : integer) : integer;
  1247.  
  1248. Description
  1249.  
  1250.    The fg_button routine returns information about the state of either
  1251.    joystick's button status.
  1252.  
  1253. Parameters
  1254.  
  1255.    n specifies the joystick number, either 1 or 2.
  1256.  
  1257. Return value
  1258.  
  1259.    A status code indicating the current button status for the requested
  1260.    joystick, as shown here:
  1261.  
  1262.      0 = neither button pressed
  1263.      1 = top button pressed
  1264.      2 = bottom button pressed
  1265.      3 = top and bottom buttons pressed
  1266.  
  1267. Restrictions
  1268.  
  1269.    none
  1270.  
  1271. See also
  1272.  
  1273.    fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intjoy
  1274.  
  1275. Examples
  1276.  
  1277.    14-12
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.                                       15                                       
  1296. -------------------------------------------------------------------------------
  1297. fg_capslock
  1298. -------------------------------------------------------------------------------
  1299.  
  1300. Prototype
  1301.  
  1302.    int fg_capslock (void);
  1303.    function FGcapslock% ()
  1304.    int function fg_capslock ()
  1305.    function fg_capslock : integer;
  1306.  
  1307. Description
  1308.  
  1309.    The fg_capslock routine determines the state of the CapsLock key.
  1310.  
  1311. Parameters
  1312.  
  1313.    none
  1314.  
  1315. Return value
  1316.  
  1317.    If the return value is 0, it means the CapsLock key is off. If it is 1, it
  1318.    means the CapsLock key is on.
  1319.  
  1320. Restrictions
  1321.  
  1322.    none
  1323.  
  1324. See also
  1325.  
  1326.    fg_numlock, fg_scrlock, fg_setcaps, fg_setnum
  1327.  
  1328. Examples
  1329.  
  1330.    14-4
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.                                       16                                       
  1355. -------------------------------------------------------------------------------
  1356. fg_chgattr
  1357. -------------------------------------------------------------------------------
  1358.  
  1359. Prototype
  1360.  
  1361.    void fg_chgattr (int n);
  1362.    sub FGchgattr (n%)
  1363.    subroutine fg_chgattr (int n)
  1364.    procedure fg_chgattr (n : integer);
  1365.  
  1366. Description
  1367.  
  1368.    The fg_chgattr routine applies the current text attribute to a given number
  1369.    of characters, starting at the text cursor position. This routine leaves
  1370.    the text cursor one column to the right of the last character changed (or
  1371.    the first column of the next row if the last character is at the end of a
  1372.    row).
  1373.  
  1374. Parameters
  1375.  
  1376.    n is the number of characters for which to change the text attribute.
  1377.  
  1378. Return value
  1379.  
  1380.    none
  1381.  
  1382. Restrictions
  1383.  
  1384.    This routine has no effect in graphics video modes.
  1385.  
  1386. See also
  1387.  
  1388.    fg_chgtext, fg_locate, fg_text
  1389.  
  1390. Examples
  1391.  
  1392.    7-3
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.                                       17                                       
  1414. -------------------------------------------------------------------------------
  1415. fg_chgtext
  1416. -------------------------------------------------------------------------------
  1417.  
  1418. Prototype
  1419.  
  1420.    void fg_chgtext (char *string, int n);
  1421.    sub FGchgtext (string$, n%)
  1422.    subroutine fg_chgtext (char string, int n)
  1423.    procedure fg_chgtext (string : string; n : integer);
  1424.  
  1425. Description
  1426.  
  1427.    The fg_chgtext routine displays a string of hardware characters, starting
  1428.    at the text cursor position, using the existing text attributes. This
  1429.    routine leaves the text cursor one column to the right of the last
  1430.    character changed (or the first column of the next row if the last
  1431.    character is at the end of a row).
  1432.  
  1433. Parameters
  1434.  
  1435.    string is the arbitrary-length sequence of characters to display.
  1436.  
  1437.    n is the number of characters in string.
  1438.  
  1439. Return value
  1440.  
  1441.    none
  1442.  
  1443. Restrictions
  1444.  
  1445.    This routine has no effect in graphics video modes.
  1446.  
  1447. See also
  1448.  
  1449.    fg_chgattr, fg_locate, fg_text
  1450.  
  1451. Examples
  1452.  
  1453.    7-3
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.                                       18                                       
  1473. -------------------------------------------------------------------------------
  1474. fg_circle
  1475. -------------------------------------------------------------------------------
  1476.  
  1477. Prototype
  1478.  
  1479.    void fg_circle (int radius);
  1480.    sub FGcircle (radius%)
  1481.    subroutine fg_circle (int radius)
  1482.    procedure fg_circle (radius : integer);
  1483.  
  1484. Description
  1485.  
  1486.    The fg_circle routine draws an unfilled circle in screen space. The circle
  1487.    is centered at the current graphics cursor position.
  1488.  
  1489. Parameters
  1490.  
  1491.    radius defines the circle's radius in horizontal screen space units. Its
  1492.    value must be greater than zero.
  1493.  
  1494. Return value
  1495.  
  1496.    none
  1497.  
  1498. Restrictions
  1499.  
  1500.    This routine has no effect in text video modes.
  1501.  
  1502. See also
  1503.  
  1504.    fg_circlef, fg_circlew, fg_ellipse
  1505.  
  1506. Examples
  1507.  
  1508.    6-10
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.                                       19                                       
  1532. -------------------------------------------------------------------------------
  1533. fg_circlef
  1534. -------------------------------------------------------------------------------
  1535.  
  1536. Prototype
  1537.  
  1538.    void fg_circlef (int radius);
  1539.    sub FGcirclef (radius%)
  1540.    subroutine fg_circlef (int radius)
  1541.    procedure fg_circlef (radius : integer);
  1542.  
  1543. Description
  1544.  
  1545.    The fg_circlef routine draws a filled circle in screen space. The circle is
  1546.    centered at the current graphics cursor position and is filled with pixels
  1547.    of the current color.
  1548.  
  1549. Parameters
  1550.  
  1551.    radius defines the circle's radius in horizontal screen space units. Its
  1552.    value must be greater than zero.
  1553.  
  1554. Return value
  1555.  
  1556.    none
  1557.  
  1558. Restrictions
  1559.  
  1560.    This routine has no effect in text video modes.
  1561.  
  1562. See also
  1563.  
  1564.    fg_circle, fg_circlefw, fg_ellipsef
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.                                       20                                       
  1591. -------------------------------------------------------------------------------
  1592. fg_circlefw
  1593. -------------------------------------------------------------------------------
  1594.  
  1595. Prototype
  1596.  
  1597.    void fg_circlefw (double radius);
  1598.    sub FGcirclefw (radius#)
  1599.    subroutine fg_circlefw (dbl radius)
  1600.    procedure fg_circlefw (radius : real);
  1601.  
  1602. Description
  1603.  
  1604.    The fg_circlefw routine draws a filled circle in world space. The circle is
  1605.    centered at the current graphics cursor position and is filled with pixels
  1606.    of the current color.
  1607.  
  1608. Parameters
  1609.  
  1610.    radius defines the circle's radius in horizontal world space units. Its
  1611.    value must be greater than zero.
  1612.  
  1613. Return value
  1614.  
  1615.    none
  1616.  
  1617. Restrictions
  1618.  
  1619.    This routine is not available in Fastgraph/Light and has no effect in text
  1620.    video modes.
  1621.  
  1622. See also
  1623.  
  1624.    fg_circlef, fg_circlew, fg_ellipsfw
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.                                       21                                       
  1650. -------------------------------------------------------------------------------
  1651. fg_circlew
  1652. -------------------------------------------------------------------------------
  1653.  
  1654. Prototype
  1655.  
  1656.    void fg_circlew (double radius);
  1657.    sub FGcirclew (radius#)
  1658.    subroutine fg_circlew (dbl radius)
  1659.    procedure fg_circlew (radius : real);
  1660.  
  1661. Description
  1662.  
  1663.    The fg_circlew routine draws an unfilled circle in world space. The circle
  1664.    is centered at the current graphics cursor position.
  1665.  
  1666. Parameters
  1667.  
  1668.    radius defines the circle's radius in horizontal world space units. Its
  1669.    value must be greater than zero.
  1670.  
  1671. Return value
  1672.  
  1673.    none
  1674.  
  1675. Restrictions
  1676.  
  1677.    This routine is not available in Fastgraph/Light and has no effect in text
  1678.    video modes.
  1679.  
  1680. See also
  1681.  
  1682.    fg_circle, fg_circlefw, fg_ellipsew
  1683.  
  1684. Examples
  1685.  
  1686.    6-9
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.                                       22                                       
  1709. -------------------------------------------------------------------------------
  1710. fg_clipmap
  1711. -------------------------------------------------------------------------------
  1712.  
  1713. Prototype
  1714.  
  1715.    fg_clipmap (char *map_array, int width, int height);
  1716.    sub FGclipmap (map_array$, width%, height%)
  1717.    subroutine fg_clipmap (int1 map_array, int width, int height)
  1718.    procedure fg_clipmap (var map_array; width, height : integer);
  1719.  
  1720. Description
  1721.  
  1722.    The fg_clipmap routine displays an image stored as a mode-independent
  1723.    bitmap. The image will be displayed so that its lower left corner is at the
  1724.    graphics cursor position. Only that part of the image that falls within the
  1725.    current clipping limits will be displayed. Refer to the Fastgraph User's
  1726.    Guide for complete information about mode-independent bitmaps.
  1727.  
  1728. Parameters
  1729.  
  1730.    map_array is the name of the array containing the bitmap.
  1731.  
  1732.    width is the width in bytes of the bitmap.
  1733.  
  1734.    height is the height in bytes (pixel rows) of the bitmap.
  1735.  
  1736. Return value
  1737.  
  1738.    none
  1739.  
  1740. Restrictions
  1741.  
  1742.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  1743.  
  1744. See also
  1745.  
  1746.    fg_drawmap, fg_getmap, fg_invert
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.                                       23                                       
  1768. -------------------------------------------------------------------------------
  1769. fg_clipmask
  1770. -------------------------------------------------------------------------------
  1771.  
  1772. Prototype
  1773.  
  1774.    void fg_clipmask (char *map_array, int runs, int width);
  1775.    sub FGclipmask (map_array$, runs%, width%)
  1776.    subroutine fg_clipmask (int1 map_array, int runs, int width)
  1777.    procedure fg_clipmask (var map_array : byte; runs, width : integer);
  1778.  
  1779. Description
  1780.  
  1781.    The fg_clipmask routine displays a clipped image stored as a masking map.
  1782.    The image will be positioned so that its lower left corner is at the
  1783.    graphics cursor position. Refer to the description of fg_drawmask for more
  1784.    information about masking maps.
  1785.  
  1786. Parameters
  1787.  
  1788.    map_array is the name of the array containing the masking map.
  1789.  
  1790.    runs is the number of pixel runs in the masking map.
  1791.  
  1792.    width is the width in pixels of the masking map.
  1793.  
  1794. Return value
  1795.  
  1796.    none
  1797.  
  1798. Restrictions
  1799.  
  1800.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  1801.  
  1802.    This routine has no effect in text video modes.
  1803.  
  1804. See also
  1805.  
  1806.    fg_drawmask, fg_flipmask, fg_revmask, fg_setclip
  1807.  
  1808. Examples
  1809.  
  1810.    10-23
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.                                       24                                       
  1827. -------------------------------------------------------------------------------
  1828. fg_clpimage
  1829. -------------------------------------------------------------------------------
  1830.  
  1831. Prototype
  1832.  
  1833.    void fg_clpimage (char *map_array, int width, int height);
  1834.    sub FGclpimage (map_array$, width%, height%)
  1835.    subroutine fg_clpimage (int1 map_array, int width, int height)
  1836.    procedure fg_clpimage (var map_array : byte; width, height : integer);
  1837.  
  1838. Description
  1839.  
  1840.    The fg_clpimage routine displays a clipped image stored as a mode-specific
  1841.    bitmap. The image will be positioned so that its lower left corner is at
  1842.    the graphics cursor position. Only that part of the image that falls within
  1843.    the current clipping limits will be displayed. Refer to the Fastgraph
  1844.    User's Guide for complete information about mode-specific bitmaps.
  1845.  
  1846. Parameters
  1847.  
  1848.    map_array is the name of the array containing the bitmap.
  1849.  
  1850.    width is the width in bytes of the bitmap.
  1851.  
  1852.    height is the height in bytes (pixel rows) of the bitmap.
  1853.  
  1854. Return value
  1855.  
  1856.    none
  1857.  
  1858. Restrictions
  1859.  
  1860.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  1861.  
  1862.    This routine has no effect in text video modes.
  1863.  
  1864. See also
  1865.  
  1866.    fg_drwimage, fg_flpimage, fg_getimage, fg_invert, fg_pack, fg_putimage,
  1867.    fg_revimage, fg_setclip, fg_unpack
  1868.  
  1869. Examples
  1870.  
  1871.    10-8, 10-9
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.                                       25                                       
  1886. -------------------------------------------------------------------------------
  1887. fg_clprect
  1888. -------------------------------------------------------------------------------
  1889.  
  1890. Prototype
  1891.  
  1892.    void fg_clprect (int minx, int maxx, int miny, int maxy);
  1893.    sub FGclprect (minx%, maxx%, miny%, maxy%)
  1894.    subroutine fg_clprect (int minx, int maxx, int miny, int maxy)
  1895.    procedure fg_clprect (minx, maxx, miny, maxy : integer);
  1896.  
  1897. Description
  1898.  
  1899.    The fg_clprect routine draws a solid (filled) rectangle in screen space,
  1900.    with respect to the clipping region.
  1901.  
  1902. Parameters
  1903.  
  1904.    minx is the screen space x coordinate of the rectangle's left edge.
  1905.  
  1906.    maxx is the screen space x coordinate of the rectangle's right edge. It
  1907.    must be greater than or equal to the value of minx.
  1908.  
  1909.    miny is the screen space y coordinate of the rectangle's top edge.
  1910.  
  1911.    maxy is the screen space y coordinate of the rectangle's bottom edge. It
  1912.    must be greater than or equal to the value of miny.
  1913.  
  1914. Return value
  1915.  
  1916.    none
  1917.  
  1918. Restrictions
  1919.  
  1920.    This routine has no effect in text video modes.
  1921.  
  1922. See also
  1923.  
  1924.    fg_clprectw, fg_rect, fg_rectw, fg_setclip
  1925.  
  1926. Examples
  1927.  
  1928.    12-1, 12-2, 12-3, 12-4, 12-6
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.                                       26                                       
  1945. -------------------------------------------------------------------------------
  1946. fg_clprectw
  1947. -------------------------------------------------------------------------------
  1948.  
  1949. Prototype
  1950.  
  1951.    void fg_clprectw (double xmin, double xmax, double ymin, double ymax);
  1952.    sub FGclprectw (xmin#, xmax#, ymin#, ymax#)
  1953.    subroutine fg_clprectw (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  1954.    procedure fg_clprectw (xmin, xmax, ymin, ymax : real);
  1955.  
  1956. Description
  1957.  
  1958.    The fg_clprectw routine draws a solid (filled) rectangle in world space,
  1959.    with respect to the clipping region.
  1960.  
  1961. Parameters
  1962.  
  1963.    xmin is the world space x coordinate of the rectangle's left edge.
  1964.  
  1965.    xmax is the world space x coordinate of the rectangle's right edge. It must
  1966.    be greater than or equal to the value of xmin.
  1967.  
  1968.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1969.  
  1970.    ymax is the world space y coordinate of the rectangle's top edge. It must
  1971.    be greater than or equal to the value of ymin.
  1972.  
  1973. Return value
  1974.  
  1975.    none
  1976.  
  1977. Restrictions
  1978.  
  1979.    This routine is not available in Fastgraph/Light and has no effect in text
  1980.    video modes.
  1981.  
  1982. See also
  1983.  
  1984.    fg_clprect, fg_rect, fg_rectw, fg_setclipw
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.                                       27                                       
  2004. -------------------------------------------------------------------------------
  2005. fg_colors
  2006. -------------------------------------------------------------------------------
  2007.  
  2008. Prototype
  2009.  
  2010.    int fg_colors (void);
  2011.    function FGcolors% ()
  2012.    int function fg_colors ()
  2013.    function fg_colors : integer;
  2014.  
  2015. Description
  2016.  
  2017.    The fg_colors routine returns the number of simultaneously available colors
  2018.    in the current video mode. In text video modes, the number of colors will
  2019.    be zero.
  2020.  
  2021. Parameters
  2022.  
  2023.    none
  2024.  
  2025. Return value
  2026.  
  2027.    The number of available colors, between 0 and 256.
  2028.  
  2029. Restrictions
  2030.  
  2031.    none
  2032.  
  2033. See also
  2034.  
  2035.    fg_setcolor
  2036.  
  2037. Examples
  2038.  
  2039.    6-1
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.                                       28                                       
  2063. -------------------------------------------------------------------------------
  2064. fg_copypage
  2065. -------------------------------------------------------------------------------
  2066.  
  2067. Prototype
  2068.  
  2069.    void fg_copypage (int source_page, int dest_page);
  2070.    sub FGcopypage (source_page%, dest_page%)
  2071.    subroutine fg_copypage (int source_page, int dest_page)
  2072.    procedure fg_copypage (source_page, dest_page : integer);
  2073.  
  2074. Description
  2075.  
  2076.    The fg_copypage routine transfers the contents of one video page to
  2077.    another. The pages may be physical, virtual, or logical video pages.
  2078.    Assuming maxx and maxy represent the maximum x and y coordinates of a video
  2079.    page, the call
  2080.  
  2081.      fg_copypage(source,dest);
  2082.  
  2083.    is equivalent to
  2084.  
  2085.      fg_transfer(0,maxx,0,maxy,0,maxy,source,dest);
  2086.  
  2087. Parameters
  2088.  
  2089.    source_page is the source video page number. It must be between 0 and 63.
  2090.  
  2091.    dest_page is the destination video page number. It must be between 0 and
  2092.    63.
  2093.  
  2094. Return value
  2095.  
  2096.    none
  2097.  
  2098. Restrictions
  2099.  
  2100.    If source_page and dest_page both reference logical pages, the pages must
  2101.    exist in the same type of memory. For example, you cannot copy a logical
  2102.    page in extended memory to a logical page in conventional memory.
  2103.  
  2104.    The fg_copypage routine always applies to video pages or logical pages,
  2105.    even when a virtual buffer is active.
  2106.  
  2107. See also
  2108.  
  2109.    fg_alloccms, fg_allocems, fg_allocxms, fg_initems, fg_initxms, fg_transfer,
  2110.    fg_vbcopy
  2111.  
  2112. Examples
  2113.  
  2114.    8-8, 8-10, 8-12, 8-13, 11-1
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.                                       29                                       
  2122. -------------------------------------------------------------------------------
  2123. fg_cursor
  2124. -------------------------------------------------------------------------------
  2125.  
  2126. Prototype
  2127.  
  2128.    void fg_cursor (int state);
  2129.    sub FGcursor (state%)
  2130.    subroutine fg_cursor (int state)
  2131.    procedure fg_cursor (state : integer);
  2132.  
  2133. Description
  2134.  
  2135.    The fg_cursor routine determines the ROM BIOS cursor visibility in text
  2136.    video modes. After calling fg_setmode, the cursor is made visible by
  2137.    default.
  2138.  
  2139. Parameters
  2140.  
  2141.    The state parameter defines the cursor visibility. If it is 0, the cursor
  2142.    becomes invisible; if it is 1, the cursor becomes visible.
  2143.  
  2144. Return value
  2145.  
  2146.    none
  2147.  
  2148. Restrictions
  2149.  
  2150.    This routine has no effect in graphics video modes.
  2151.  
  2152. Examples
  2153.  
  2154.    3-1, 3-2, 3-3, 3-4, 3-5, 5-16, 7-1, 7-2, 7-3, 7-4, 8-3, 8-5, 8-7, 8-12,
  2155.    8-17, 10-7, 10-13, 11-2, 11-4, 13-4
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.                                       30                                       
  2181. -------------------------------------------------------------------------------
  2182. fg_dash
  2183. -------------------------------------------------------------------------------
  2184.  
  2185. Prototype
  2186.  
  2187.    void fg_dash (int ix, int iy, int pattern);
  2188.    sub FGdash (ix%, iy%, pattern%)
  2189.    subroutine fg_dash (int ix, int iy, int pattern)
  2190.    procedure fg_dash (ix, iy, pattern : integer);
  2191.  
  2192. Description
  2193.  
  2194.    The fg_dash routine draws a dashed line from the graphics cursor position
  2195.    to an absolute screen space position. It also makes the destination
  2196.    position the new graphics cursor position.
  2197.  
  2198. Parameters
  2199.  
  2200.    ix is the screen space x coordinate of the destination position.
  2201.  
  2202.    iy is the screen space y coordinate of the destination position.
  2203.  
  2204.    pattern represents a 16-bit cyclic dash pattern. Bits that are 1 will
  2205.    result in a pixel being drawn; bits that are 0 will result in a pixel being
  2206.    skipped.
  2207.  
  2208. Return value
  2209.  
  2210.    none
  2211.  
  2212. Restrictions
  2213.  
  2214.    This routine has no effect in text video modes.
  2215.  
  2216. See also
  2217.  
  2218.    fg_dashrel, fg_dashrw, fg_dashw, fg_move
  2219.  
  2220. Examples
  2221.  
  2222.    6-6
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.                                       31                                       
  2240. -------------------------------------------------------------------------------
  2241. fg_dashrel
  2242. -------------------------------------------------------------------------------
  2243.  
  2244. Prototype
  2245.  
  2246.    void fg_dashrel (int ix, int iy, int pattern);
  2247.    sub FGdashrel (ix%, iy%, pattern%)
  2248.    subroutine fg_dashrel (int ix, int iy, int pattern)
  2249.    procedure fg_dashrel (ix, iy, pattern : integer);
  2250.  
  2251. Description
  2252.  
  2253.    The fg_dashrel routine draws a dashed line from the graphics cursor
  2254.    position to a screen space position relative to it. It also makes the
  2255.    destination position the new graphics cursor position.
  2256.  
  2257. Parameters
  2258.  
  2259.    ix is the screen space x offset of the destination position.
  2260.  
  2261.    iy is the screen space y offset of the destination position.
  2262.  
  2263.    pattern represents a 16-bit cyclic dash pattern. Bits that are 1 will
  2264.    result in a pixel being drawn; bits that are 0 will result in a pixel being
  2265.    skipped.
  2266.  
  2267. Return value
  2268.  
  2269.    none
  2270.  
  2271. Restrictions
  2272.  
  2273.    This routine has no effect in text video modes.
  2274.  
  2275. See also
  2276.  
  2277.    fg_dash, fg_dashrw, fg_dashw, fg_moverel
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.                                       32                                       
  2299. -------------------------------------------------------------------------------
  2300. fg_dashrw
  2301. -------------------------------------------------------------------------------
  2302.  
  2303. Prototype
  2304.  
  2305.    void fg_dashrw (double x, double y, int pattern);
  2306.    sub FGdashrw (x#, y#, pattern%)
  2307.    subroutine fg_dashrw (dbl x, dbl y, int pattern)
  2308.    procedure fg_dashrw (x, y : real; pattern : integer);
  2309.  
  2310. Description
  2311.  
  2312.    The fg_dashrw routine draws a dashed line from the graphics cursor position
  2313.    to a world space position relative to it. It also makes the destination
  2314.    position the new graphics cursor position.
  2315.  
  2316. Parameters
  2317.  
  2318.    x is the world space x offset of the destination position.
  2319.  
  2320.    y is the world space y offset of the destination position.
  2321.  
  2322.    pattern represents a 16-bit cyclic dash pattern. Bits that are 1 will
  2323.    result in a pixel being drawn; bits that are 0 will result in a pixel being
  2324.    skipped.
  2325.  
  2326. Return value
  2327.  
  2328.    none
  2329.  
  2330. Restrictions
  2331.  
  2332.    This routine is not available in Fastgraph/Light and has no effect in text
  2333.    video modes.
  2334.  
  2335. See also
  2336.  
  2337.    fg_dash, fg_dashrel, fg_dashw, fg_moverw
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.                                       33                                       
  2358. -------------------------------------------------------------------------------
  2359. fg_dashw
  2360. -------------------------------------------------------------------------------
  2361.  
  2362. Prototype
  2363.  
  2364.    void fg_dashw (double x, double y, int pattern);
  2365.    sub FGdashw (x#, y#, pattern%)
  2366.    subroutine fg_dashw (dbl x, dbl y, int pattern)
  2367.    procedure fg_dashw (x, y : real; pattern : integer);
  2368.  
  2369. Description
  2370.  
  2371.    The fg_dashw routine draws a dashed line from the graphics cursor position
  2372.    to an absolute world space position. It also makes the destination position
  2373.    the new graphics cursor position.
  2374.  
  2375. Parameters
  2376.  
  2377.    x is the world space x coordinate of the destination position.
  2378.  
  2379.    y is the world space y coordinate of the destination position.
  2380.  
  2381.    pattern represents a 16-bit cyclic dash pattern. Bits that are 1 will
  2382.    result in a pixel being drawn; bits that are 0 will result in a pixel being
  2383.    skipped.
  2384.  
  2385. Return value
  2386.  
  2387.    none
  2388.  
  2389. Restrictions
  2390.  
  2391.    This routine is not available in Fastgraph/Light and has no effect in text
  2392.    video modes.
  2393.  
  2394. See also
  2395.  
  2396.    fg_dash, fg_dashrel, fg_dashrw, fg_movew
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.                                       34                                       
  2417. -------------------------------------------------------------------------------
  2418. fg_defcolor
  2419. -------------------------------------------------------------------------------
  2420.  
  2421. Prototype
  2422.  
  2423.    void fg_defcolor (int index, int value);
  2424.    sub FGdefcolor (index%, value%)
  2425.    subroutine fg_defcolor (int index, int value)
  2426.    procedure fg_defcolor (index, value : integer);
  2427.  
  2428. Description
  2429.  
  2430.    The fg_defcolor routine assigns a color value to a virtual color index.
  2431.  
  2432. Parameters
  2433.  
  2434.    index is the virtual color index to define, between 0 and 255.
  2435.  
  2436.    value is the color value to assign to the specified color index. It must be
  2437.    between 0 and the maximum color value for the current video mode.
  2438.  
  2439. Return value
  2440.  
  2441.    none
  2442.  
  2443. Restrictions
  2444.  
  2445.    This routine has no effect in text video modes or in 256-color graphics
  2446.    video modes.
  2447.  
  2448. See also
  2449.  
  2450.    fg_getindex, fg_palette, fg_setcolor
  2451.  
  2452. Examples
  2453.  
  2454.    5-15, 5-16
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.                                       35                                       
  2476. -------------------------------------------------------------------------------
  2477. fg_defpages
  2478. -------------------------------------------------------------------------------
  2479.  
  2480. Prototype
  2481.  
  2482.    void fg_defpages (int source_page, int dest_page);
  2483.    sub FGdefpages (source_page%, dest_page%)
  2484.    subroutine fg_defpages (int source_page, int dest_page)
  2485.    procedure fg_defpages (source_page, dest_page : integer);
  2486.  
  2487. Description
  2488.  
  2489.    The fg_defpages routine defines the SVGA banks for the source and
  2490.    destination page numbers when using Fastgraph's block transfer routines
  2491.    with extended video pages.
  2492.  
  2493. Parameters
  2494.  
  2495.    source_page is the video page from which to retrieve the block.
  2496.  
  2497.    dest_page is the video page to which the block will be copied.
  2498.  
  2499. Return value
  2500.  
  2501.    none
  2502.  
  2503. Restrictions
  2504.  
  2505.    This routine is meaningful only in standard EGA, VGA, and XVGA graphics
  2506.    modes (modes 13 to 18 and 20 to 23) for SVGA chipsets that support extended
  2507.    video pages.
  2508.  
  2509. See also
  2510.  
  2511.    fg_copypage, fg_restore, fg_save, fg_svgainit, fg_svgastat, fg_tcxfer,
  2512.    fg_transfer
  2513.  
  2514. Examples
  2515.  
  2516.    8-8
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.                                       36                                       
  2535. -------------------------------------------------------------------------------
  2536. fg_dispfile
  2537. -------------------------------------------------------------------------------
  2538.  
  2539. Prototype
  2540.  
  2541.    void fg_dispfile (char *filename, int width, int format);
  2542.    sub FGdispfile (filename$, width%, format%)
  2543.    subroutine fg_dispfile (char filename, int width, int format)
  2544.    procedure fg_dispfile (filename : string; width, format : integer);
  2545.  
  2546. Description
  2547.  
  2548.    The fg_dispfile routine displays an image stored in a standard or packed
  2549.    pixel run file. The image will be positioned so that its lower left corner
  2550.    is at the graphics cursor position on the active video page or virtual
  2551.    buffer. Refer to the descriptions of fg_display and fg_displayp for more
  2552.    information about the two pixel run formats.
  2553.  
  2554. Parameters
  2555.  
  2556.    filename is the name of the PPR or SPR file. A device and path name may be
  2557.    included as part of the file name. The file name must be terminated by a
  2558.    null character (that is, a zero byte).
  2559.  
  2560.    width is the width of the image in pixels. It must be greater than zero.
  2561.  
  2562.    format specifies the image format. The value of format must be 0 if the
  2563.    image is in standard pixel run format, and 1 if the image is in packed
  2564.    pixel run format.
  2565.  
  2566. Return value
  2567.  
  2568.    none
  2569.  
  2570. Restrictions
  2571.  
  2572.    This routine has no effect in text video modes.
  2573.  
  2574. See also
  2575.  
  2576.    fg_display, fg_displayp, fg_imagebuf, fg_pattern, fg_showppr, fg_showspr
  2577.  
  2578. Examples
  2579.  
  2580.    9-10
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.                                       37                                       
  2594. -------------------------------------------------------------------------------
  2595. fg_display
  2596. -------------------------------------------------------------------------------
  2597.  
  2598. Prototype
  2599.  
  2600.    void fg_display (char *map_array, int runs, int width);
  2601.    sub FGdisplay (map_array$, runs%, width%)
  2602.    subroutine fg_display (int1 map_array, int runs, int width)
  2603.    procedure fg_display (var map_array : byte; runs, width : integer);
  2604.  
  2605. Description
  2606.  
  2607.    The fg_display routine displays an image stored in Fastgraph's standard
  2608.    pixel run format, where the image resides in an array. The image will be
  2609.    positioned so that its lower left corner is at the graphics cursor
  2610.    position.
  2611.  
  2612. Parameters
  2613.  
  2614.    map_array is the name of the array containing the pixel run map. The pixel
  2615.    runs are represented by (color,count) pairs, as shown here:
  2616.  
  2617.                              [0]   color for run 1
  2618.  
  2619.                              [1]   count for run 1
  2620.  
  2621.                              [2]   color for run 2
  2622.  
  2623.                              [3]   count for run 2
  2624.  
  2625.                                           .
  2626.                                           .
  2627.                                           .
  2628.  
  2629.                           [2n-2]   color for run n
  2630.  
  2631.                           [2n-1]   count for run n
  2632.  
  2633.    Each "color" element is a value between 0 and 255 specifying the color
  2634.    index for that pixel run. Each "count" element is a value between 0 and 255
  2635.    specifying the length in pixels of that pixel run.
  2636.  
  2637.    runs is the number of pixel runs to display from the pixel run map. It is
  2638.    normally one-half the size of the map_array array.
  2639.  
  2640.    width is the width of the image in pixels. It must be greater than zero.
  2641.  
  2642. Return value
  2643.  
  2644.    none
  2645.  
  2646. Restrictions
  2647.  
  2648.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  2649.  
  2650.    This routine has no effect in text video modes.
  2651.  
  2652.                                       38                                       
  2653. -------------------------------------------------------------------------------
  2654. fg_display (continued)
  2655. -------------------------------------------------------------------------------
  2656.  
  2657. See also
  2658.  
  2659.    fg_dispfile, fg_displayp, fg_pattern, fg_showspr
  2660.  
  2661. Examples
  2662.  
  2663.    10-20, 10-22
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.                                       39                                       
  2712. -------------------------------------------------------------------------------
  2713. fg_displayp
  2714. -------------------------------------------------------------------------------
  2715.  
  2716. Prototype
  2717.  
  2718.    void fg_displayp (char *map_array, int runs, int width);
  2719.    sub FGdisplayp (map_array$, runs%, width%)
  2720.    subroutine fg_displayp (int1 map_array, int runs, int width)
  2721.    procedure fg_displayp (var map_array : byte; runs, width : integer);
  2722.  
  2723. Description
  2724.  
  2725.    The fg_displayp routine displays an image stored in Fastgraph's packed
  2726.    pixel run format, where the image resides in an array. The image will be
  2727.    positioned so that its lower left corner is at the graphics cursor
  2728.    position.
  2729.  
  2730. Parameters
  2731.  
  2732.    map_array is the name of the array containing the pixel run map. The pixel
  2733.    runs are represented by (color,count) pairs, as shown here:
  2734.                         7                4   3                0
  2735.  
  2736.                    [0]    color for run 1     color for run 2
  2737.  
  2738.                    [1]              count for run 1
  2739.  
  2740.                    [2]              count for run 2
  2741.  
  2742.                    [3]    color for run 3     color for run 4
  2743.  
  2744.                    [4]              count for run 3
  2745.  
  2746.                    [5]              count for run 4
  2747.  
  2748.                                            .
  2749.                                            .
  2750.                                            .
  2751.  
  2752.               [3n/2-3]   color for run n-1    color for run n
  2753.  
  2754.               [3n/2-2]             count for run n-1
  2755.  
  2756.               [3n/2-1]              count for run n
  2757.  
  2758.    Each "color" element is a value between 0 and 15 specifying the color index
  2759.    for that pixel run. Each "count" element is a value between 0 and 255
  2760.    specifying the length in pixels of that pixel run.
  2761.  
  2762.    runs is the number of pixel runs to display from the pixel run map. It is
  2763.    normally two-thirds the size of the map_array array.
  2764.  
  2765.    width is the width of the image in pixels. It must be greater than zero.
  2766.  
  2767.  
  2768.  
  2769.  
  2770.                                       40                                       
  2771. -------------------------------------------------------------------------------
  2772. fg_displayp (continued)
  2773. -------------------------------------------------------------------------------
  2774.  
  2775. Return value
  2776.  
  2777.    none
  2778.  
  2779. Restrictions
  2780.  
  2781.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  2782.  
  2783.    This routine has no effect in text video modes.
  2784.  
  2785. See also
  2786.  
  2787.    fg_dispfile, fg_display, fg_pattern, fg_showppr
  2788.  
  2789. Examples
  2790.  
  2791.    10-21, 10-22
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.                                       41                                       
  2830. -------------------------------------------------------------------------------
  2831. fg_draw
  2832. -------------------------------------------------------------------------------
  2833.  
  2834. Prototype
  2835.  
  2836.    void fg_draw (int ix, int iy);
  2837.    sub FGdraw (ix%, iy%)
  2838.    subroutine fg_draw (int ix, int iy)
  2839.    procedure fg_draw (ix, iy : integer);
  2840.  
  2841. Description
  2842.  
  2843.    The fg_draw routine draws a solid line from the graphics cursor position to
  2844.    an absolute screen space position. It also makes the destination position
  2845.    the new graphics cursor position.
  2846.  
  2847. Parameters
  2848.  
  2849.    ix is the screen space x coordinate of the destination position.
  2850.  
  2851.    iy is the screen space y coordinate of the destination position.
  2852.  
  2853. Return value
  2854.  
  2855.    none
  2856.  
  2857. Restrictions
  2858.  
  2859.    This routine has no effect in text video modes.
  2860.  
  2861. See also
  2862.  
  2863.    fg_drawrel, fg_draww, fg_drawx, fg_move
  2864.  
  2865. Examples
  2866.  
  2867.    6-2, 6-5, 13-5, 13-6
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.                                       42                                       
  2889. -------------------------------------------------------------------------------
  2890. fg_drawmap
  2891. -------------------------------------------------------------------------------
  2892.  
  2893. Prototype
  2894.  
  2895.    void fg_drawmap (char *map_array, int width, int height);
  2896.    sub FGdrawmap (map_array$, width%, height%)
  2897.    subroutine fg_drawmap (int1 map_array, int width, int height)
  2898.    procedure fg_drawmap (var map_array : byte; width, height : integer);
  2899.  
  2900. Description
  2901.  
  2902.    The fg_drawmap routine displays an image stored as a mode-independent
  2903.    bitmap. The image will be positioned so that its lower left corner is at
  2904.    the graphics cursor position. Refer to the Fastgraph User's Guide for
  2905.    complete information about mode-independent bitmaps.
  2906.  
  2907. Parameters
  2908.  
  2909.    map_array is the name of the array containing the bitmap. Each byte of
  2910.    map_array represents eight pixels. Bits that are set (1) result in the
  2911.    corresponding pixel being displayed in the current color. Bits that are
  2912.    reset (0) leave the corresponding pixel unchanged.
  2913.  
  2914.    width is the width in bytes of the bitmap.
  2915.  
  2916.    height is the height in bytes (pixel rows) of the bitmap.
  2917.  
  2918. Return value
  2919.  
  2920.    none
  2921.  
  2922. Restrictions
  2923.  
  2924.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  2925.  
  2926. See also
  2927.  
  2928.    fg_clipmap, fg_drwimage, fg_getmap, fg_invert
  2929.  
  2930. Examples
  2931.  
  2932.    10-1, 10-2, 10-10, 10-11
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.                                       43                                       
  2948. -------------------------------------------------------------------------------
  2949. fg_drawmask
  2950. -------------------------------------------------------------------------------
  2951.  
  2952. Prototype
  2953.  
  2954.    void fg_drawmask (char *map_array, int runs, int width);
  2955.    sub FGdrawmask (map_array$, runs%, width%)
  2956.    subroutine fg_drawmask (int1 map_array, int runs, int width)
  2957.    procedure fg_drawmask (var map_array : byte; runs, width : integer);
  2958.  
  2959. Description
  2960.  
  2961.    The fg_drawmask routine displays an image stored as a masking map. The
  2962.    image will be positioned so that its lower left corner is at the graphics
  2963.    cursor position. Refer to the Fastgraph User's Guide for a complete
  2964.    discussion of masking maps.
  2965.  
  2966. Parameters
  2967.  
  2968.    map_array is the name of the array containing the masking map. The masking
  2969.    map is a series of alternating "protect" and "zero" pixel runs, as shown
  2970.    here:
  2971.  
  2972.  
  2973.                        [1]   length of 1st protect run
  2974.  
  2975.                        [2]   length of 1st  zero   run
  2976.  
  2977.                        [3]   length of 2nd protect run
  2978.  
  2979.                        [4]   length of 2nd  zero   run
  2980.  
  2981.                                           .
  2982.                                           .
  2983.                                           .
  2984.  
  2985.                      [n-2]   length of final protect run
  2986.  
  2987.                      [n-1]   length of final  zero   run
  2988.  
  2989.  
  2990.    The "protect" runs protect video memory, while the "zero" runs zero video
  2991.    memory (that is, set the pixels to the background color). The length of
  2992.    each run must be between 0 and 255.
  2993.  
  2994.    runs is the number of pixel runs in the masking map.
  2995.  
  2996.    width is the width in pixels of the masking map.
  2997.  
  2998. Return value
  2999.  
  3000.    none
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.                                       44                                       
  3007. -------------------------------------------------------------------------------
  3008. fg_drawmask (continued)
  3009. -------------------------------------------------------------------------------
  3010.  
  3011. Restrictions
  3012.  
  3013.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  3014.  
  3015.    This routine has no effect in text video modes.
  3016.  
  3017. See also
  3018.  
  3019.    fg_clipmask, fg_flipmask, fg_revmask
  3020.  
  3021. Examples
  3022.  
  3023.    10-23, 10-24
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.                                       45                                       
  3066. -------------------------------------------------------------------------------
  3067. fg_drawrel
  3068. -------------------------------------------------------------------------------
  3069.  
  3070. Prototype
  3071.  
  3072.    void fg_drawrel (int ix, int iy);
  3073.    sub FGdrawrel (ix%, iy%)
  3074.    subroutine fg_drawrel (int ix, int iy)
  3075.    procedure fg_drawrel (ix, iy : integer);
  3076.  
  3077. Description
  3078.  
  3079.    The fg_drawrel routine draws a solid line from the graphics cursor position
  3080.    to a screen space position relative to it. It also makes the destination
  3081.    position the new graphics cursor position.
  3082.  
  3083. Parameters
  3084.  
  3085.    ix is the screen space x offset of the destination position.
  3086.  
  3087.    iy is the screen space y offset of the destination position.
  3088.  
  3089. Return value
  3090.  
  3091.    none
  3092.  
  3093. Restrictions
  3094.  
  3095.    This routine has no effect in text video modes.
  3096.  
  3097. See also
  3098.  
  3099.    fg_draw, fg_drawrelx, fg_drawrw, fg_moverel
  3100.  
  3101. Examples
  3102.  
  3103.    6-3, 6-17
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.                                       46                                       
  3125. -------------------------------------------------------------------------------
  3126. fg_drawrelx
  3127. -------------------------------------------------------------------------------
  3128.  
  3129. Prototype
  3130.  
  3131.    void fg_drawrelx (int ix, int iy);
  3132.    sub FGdrawrelx (ix%, iy%)
  3133.    subroutine fg_drawrelx (int ix, int iy)
  3134.    procedure fg_drawrelx (ix, iy : integer);
  3135.  
  3136. Description
  3137.  
  3138.    The fg_drawrelx routine draws a solid line in "exclusive or" mode from the
  3139.    graphics cursor position to a screen space position relative to it. The
  3140.    destination position becomes the new graphics cursor position.
  3141.  
  3142. Parameters
  3143.  
  3144.    ix is the screen space x offset of the destination position.
  3145.  
  3146.    iy is the screen space y offset of the destination position.
  3147.  
  3148. Return value
  3149.  
  3150.    none
  3151.  
  3152. Restrictions
  3153.  
  3154.    This routine has no effect in text video modes.
  3155.  
  3156.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3157.    is reset to its default replacement mode on return.
  3158.  
  3159. See also
  3160.  
  3161.    fg_drawrel, fg_drawrxw, fg_drawx, fg_moverel
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.                                       47                                       
  3184. -------------------------------------------------------------------------------
  3185. fg_drawrw
  3186. -------------------------------------------------------------------------------
  3187.  
  3188. Prototype
  3189.  
  3190.    void fg_drawrw (double x, double y);
  3191.    sub FGdrawrw (x#, y#)
  3192.    subroutine fg_drawrw (dbl x, dbl y)
  3193.    procedure fg_drawrw (x, y : real);
  3194.  
  3195. Description
  3196.  
  3197.    The fg_drawrw routine draws a solid line from the graphics cursor position
  3198.    to a world space position relative to it. It also makes the destination
  3199.    position the new graphics cursor position.
  3200.  
  3201. Parameters
  3202.  
  3203.    x is the world space x offset of the destination position.
  3204.  
  3205.    y is the world space y offset of the destination position.
  3206.  
  3207. Return value
  3208.  
  3209.    none
  3210.  
  3211. Restrictions
  3212.  
  3213.    This routine is not available in Fastgraph/Light and has no effect in text
  3214.    video modes.
  3215.  
  3216. See also
  3217.  
  3218.    fg_drawrel, fg_drawrxw, fg_draww, fg_moverw
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.                                       48                                       
  3243. -------------------------------------------------------------------------------
  3244. fg_drawrxw
  3245. -------------------------------------------------------------------------------
  3246.  
  3247. Prototype
  3248.  
  3249.    void fg_drawrxw (double x, double y);
  3250.    sub FGdrawrxw (x#, y#)
  3251.    subroutine fg_drawrxw (dbl x, dbl y)
  3252.    procedure fg_drawrxw (x, y : real);
  3253.  
  3254. Description
  3255.  
  3256.    The fg_drawrxw routine draws a solid line in "exclusive or" mode from the
  3257.    graphics cursor position to a world space position relative to it. It also
  3258.    makes the destination position the new graphics cursor position.
  3259.  
  3260. Parameters
  3261.  
  3262.    x is the world space x offset of the destination position.
  3263.  
  3264.    y is the world space y offset of the destination position.
  3265.  
  3266. Return value
  3267.  
  3268.    none
  3269.  
  3270. Restrictions
  3271.  
  3272.    This routine is not available in Fastgraph/Light and has no effect in text
  3273.    video modes.
  3274.  
  3275.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3276.    is reset to its default replacement mode on return.
  3277.  
  3278. See also
  3279.  
  3280.    fg_drawrelx, fg_drawrw, fg_drawxw, fg_moverw
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.                                       49                                       
  3302. -------------------------------------------------------------------------------
  3303. fg_draww
  3304. -------------------------------------------------------------------------------
  3305.  
  3306. Prototype
  3307.  
  3308.    void fg_draww (double x, double y);
  3309.    sub FGdraww (x#, y#)
  3310.    subroutine fg_draww (dbl x, dbl y)
  3311.    procedure fg_draww (x, y : real);
  3312.  
  3313. Description
  3314.  
  3315.    The fg_draww routine draws a solid line from the graphics cursor position
  3316.    to an absolute world space position. It also makes the destination position
  3317.    the new graphics cursor position.
  3318.  
  3319. Parameters
  3320.  
  3321.    x is the world space x coordinate of the destination position.
  3322.  
  3323.    y is the world space y coordinate of the destination position.
  3324.  
  3325. Return value
  3326.  
  3327.    none
  3328.  
  3329. Restrictions
  3330.  
  3331.    This routine is not available in Fastgraph/Light and has no effect in text
  3332.    video modes.
  3333.  
  3334. See also
  3335.  
  3336.    fg_draw, fg_drawrw, fg_drawxw, fg_movew
  3337.  
  3338. Examples
  3339.  
  3340.    4-4, 6-4
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.                                       50                                       
  3361. -------------------------------------------------------------------------------
  3362. fg_drawx
  3363. -------------------------------------------------------------------------------
  3364.  
  3365. Prototype
  3366.  
  3367.    void fg_drawx (int ix, int iy);
  3368.    sub FGdrawx (ix%, iy%)
  3369.    subroutine fg_drawx (int ix, int iy)
  3370.    procedure fg_drawx (ix, iy : integer);
  3371.  
  3372. Description
  3373.  
  3374.    The fg_drawx routine draws a solid line in "exclusive or" mode from the
  3375.    graphics cursor position to an absolute screen space position. It also
  3376.    makes the destination position the new graphics cursor position.
  3377.  
  3378. Parameters
  3379.  
  3380.    ix is the screen space x coordinate of the destination position.
  3381.  
  3382.    iy is the screen space y coordinate of the destination position.
  3383.  
  3384. Return value
  3385.  
  3386.    none
  3387.  
  3388. Restrictions
  3389.  
  3390.    This routine has no effect in text video modes.
  3391.  
  3392.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3393.    is reset to its default replacement mode on return.
  3394.  
  3395. See also
  3396.  
  3397.    fg_draw, fg_drawrelx, fg_drawxw, fg_move
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.                                       51                                       
  3420. -------------------------------------------------------------------------------
  3421. fg_drawxw
  3422. -------------------------------------------------------------------------------
  3423.  
  3424. Prototype
  3425.  
  3426.    void fg_drawxw (double x, double y);
  3427.    sub FGdrawxw (x#, y#)
  3428.    subroutine fg_drawxw (dbl x, dbl y)
  3429.    procedure fg_drawxw (x, y : real);
  3430.  
  3431. Description
  3432.  
  3433.    The fg_drawxw routine draws a solid line in "exclusive or" mode from the
  3434.    graphics cursor position to an absolute world space position. It also makes
  3435.    the destination position the new graphics cursor position.
  3436.  
  3437. Parameters
  3438.  
  3439.    x is the world space x coordinate of the destination position.
  3440.  
  3441.    y is the world space y coordinate of the destination position.
  3442.  
  3443. Return value
  3444.  
  3445.    none
  3446.  
  3447. Restrictions
  3448.  
  3449.    This routine is not available in Fastgraph/Light and has no effect in text
  3450.    video modes.
  3451.  
  3452.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3453.    is reset to its default replacement mode on return.
  3454.  
  3455. See also
  3456.  
  3457.    fg_drawrxw, fg_draww, fg_drawx, fg_movew
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.                                       52                                       
  3479. -------------------------------------------------------------------------------
  3480. fg_drect
  3481. -------------------------------------------------------------------------------
  3482.  
  3483. Prototype
  3484.  
  3485.    void fg_drect (int minx, int maxx, int miny, int maxy, char *matrix);
  3486.    sub FGdrect (minx%, maxx%, miny%, maxy%, matrix$)
  3487.    subroutine fg_drect (int minx, int maxx, int miny, int maxy, int1 matrix)
  3488.    procedure FGdrect (minx, maxx, miny, maxy : integer; var matrix : byte);
  3489.  
  3490. Description
  3491.  
  3492.    The fg_drect routine draws a dithered rectangle in screen space, without
  3493.    regard to the clipping region.
  3494.  
  3495. Parameters
  3496.  
  3497.    minx is the screen space x coordinate of the rectangle's left edge.
  3498.  
  3499.    maxx is the screen space x coordinate of the rectangle's right edge. It
  3500.    must be greater than or equal to the value of minx.
  3501.  
  3502.    miny is the screen space y coordinate of the rectangle's top edge.
  3503.  
  3504.    maxy is the screen space y coordinate of the rectangle's bottom edge. It
  3505.    must be greater than or equal to the value of miny.
  3506.  
  3507.    matrix is a four-element array (an eight-element array in 256-color
  3508.    graphics modes) that defines the dithering matrix. The format of the
  3509.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  3510.    User's Guide for more information.
  3511.  
  3512. Return value
  3513.  
  3514.    none
  3515.  
  3516. Restrictions
  3517.  
  3518.    This routine has no effect in text video modes.
  3519.  
  3520. See also
  3521.  
  3522.    fg_drectw, fg_rect
  3523.  
  3524. Examples
  3525.  
  3526.    6-14, 6-15, 6-16
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.                                       53                                       
  3538. -------------------------------------------------------------------------------
  3539. fg_drectw
  3540. -------------------------------------------------------------------------------
  3541.  
  3542. Prototype
  3543.  
  3544.    void fg_drectw (double xmin, double xmax, double ymin, double ymax,
  3545.      char *matrix);
  3546.    sub FGdrectw (xmin#, xmax#, ymin#, ymax#, matrix$)
  3547.    subroutine fg_drectw (dbl xmin, dbl xmax, dbl ymin, dbl ymax, int1 matrix)
  3548.    procedure fg_drectw (xmin, xmax, ymin, ymax : real; var matrix : byte);
  3549.  
  3550. Description
  3551.  
  3552.    The fg_drectw routine draws a dithered rectangle in world space, without
  3553.    regard to the clipping region.
  3554.  
  3555. Parameters
  3556.  
  3557.    xmin is the world space x coordinate of the rectangle's left edge.
  3558.  
  3559.    xmax is the world space x coordinate of the rectangle's right edge. It must
  3560.    be greater than or equal to the value of xmin.
  3561.  
  3562.    ymin is the world space y coordinate of the rectangle's bottom edge.
  3563.  
  3564.    ymax is the world space y coordinate of the rectangle's top edge. It must
  3565.    be greater than or equal to the value of ymin.
  3566.  
  3567.    matrix is a four-element array (an eight-element array in 256-color
  3568.    graphics modes) that defines the dithering matrix. The format of the
  3569.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  3570.    User's Guide for more information.
  3571.  
  3572. Return value
  3573.  
  3574.    none
  3575.  
  3576. Restrictions
  3577.  
  3578.    This routine is not available in Fastgraph/Light and has no effect in text
  3579.    video modes.
  3580.  
  3581. See also
  3582.  
  3583.    fg_drect, fg_rectw
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.                                       54                                       
  3597. -------------------------------------------------------------------------------
  3598. fg_drwimage
  3599. -------------------------------------------------------------------------------
  3600.  
  3601. Prototype
  3602.  
  3603.    void fg_drwimage (char *map_array, int width, int height);
  3604.    sub FGdrwimage (map_array$, width%, height%)
  3605.    subroutine fg_drwimage (int1 map_array, int width, int height)
  3606.    procedure fg_drwimage (var map_array : byte; width, height : integer);
  3607.  
  3608. Description
  3609.  
  3610.    The fg_drwimage routine displays an image stored as a mode-specific bitmap.
  3611.    The image will be positioned so that its lower left corner is at the
  3612.    graphics cursor position (or the text cursor position in text video modes).
  3613.    Refer to the Fastgraph User's Guide for complete information about mode-
  3614.    specific bitmaps.
  3615.  
  3616. Parameters
  3617.  
  3618.    map_array is the name of the array containing the bitmap.
  3619.  
  3620.    width is the width in bytes of the bitmap.
  3621.  
  3622.    height is the height in bytes (pixel rows) of the bitmap.
  3623.  
  3624. Return value
  3625.  
  3626.    none
  3627.  
  3628. Restrictions
  3629.  
  3630.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  3631.  
  3632. See also
  3633.  
  3634.    fg_clpimage, fg_flpimage, fg_getimage, fg_invert, fg_pack, fg_putimage,
  3635.    fg_revimage, fg_unpack
  3636.  
  3637. Examples
  3638.  
  3639.    10-3, 10-4, 10-5, 10-6, 10-7, 10-8, 10-9, 10-12, 10-13, 10-14, 10-15,
  3640.    10-16, 10-24
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.                                       55                                       
  3656. -------------------------------------------------------------------------------
  3657. fg_egacheck
  3658. -------------------------------------------------------------------------------
  3659.  
  3660. Prototype
  3661.  
  3662.    int fg_egacheck (void);
  3663.    function FGegacheck% ()
  3664.    int function fg_egacheck ()
  3665.    function fg_egacheck : integer;
  3666.  
  3667. Description
  3668.  
  3669.    The fg_egacheck routine returns information about the active EGA adapter
  3670.    and display (or the EGA emulation capabilities of a VGA). It is useful in
  3671.    checking if the adapter has enough memory to run a program. This function
  3672.    remains in Fastgraph for compatibility purposes; it has been superseded by
  3673.    fg_testmode.
  3674.  
  3675. Parameters
  3676.  
  3677.    none
  3678.  
  3679. Return value
  3680.  
  3681.    The fg_egacheck routine returns a value of 0 if an EGA is not found, or if
  3682.    an EGA without an Enhanced Color Display (ECD) is detected. Otherwise,
  3683.    fg_egacheck returns a positive integer indicating the number of 64K-byte
  3684.    increments of video memory on the EGA, as summarized below.
  3685.  
  3686.      1 = EGA with 64K video memory
  3687.      2 = EGA with 128K video memory
  3688.      3 = EGA with 192K video memory
  3689.      4 = EGA with 256K video memory
  3690.  
  3691. Restrictions
  3692.  
  3693.    none
  3694.  
  3695. See also
  3696.  
  3697.    fg_testmode
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.                                       56                                       
  3715. -------------------------------------------------------------------------------
  3716. fg_ellipse
  3717. -------------------------------------------------------------------------------
  3718.  
  3719. Prototype
  3720.  
  3721.    void fg_ellipse (int horiz, int vert);
  3722.    sub FGellipse (horiz%, vert%)
  3723.    subroutine fg_ellipse (int horiz, int vert)
  3724.    procedure fg_ellipse (horiz, vert : integer);
  3725.  
  3726. Description
  3727.  
  3728.    The fg_ellipse routine draws an unfilled ellipse in screen space. The
  3729.    ellipse is centered at the current graphics cursor position, and its size
  3730.    is determined by the specified lengths of its semi-axes.
  3731.  
  3732. Parameters
  3733.  
  3734.    horiz is the length of the ellipse's horizontal semi-axis (the absolute
  3735.    screen space distance from the center of the ellipse to its horizontal
  3736.    extremity).
  3737.  
  3738.    vert is the length of the ellipse's vertical semi-axis (the absolute screen
  3739.    space distance from the center of the ellipse to its vertical extremity).
  3740.  
  3741. Return value
  3742.  
  3743.    none
  3744.  
  3745. Restrictions
  3746.  
  3747.    This routine has no effect in text video modes.
  3748.  
  3749. See also
  3750.  
  3751.    fg_circle, fg_ellipsef, fg_ellipsew
  3752.  
  3753. Examples
  3754.  
  3755.    6-10, 12-4, 12-5, 12-6
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.                                       57                                       
  3774. -------------------------------------------------------------------------------
  3775. fg_ellipsef
  3776. -------------------------------------------------------------------------------
  3777.  
  3778. Prototype
  3779.  
  3780.    void fg_ellipsef (int horiz, int vert);
  3781.    sub FGellipsef (horiz%, vert%)
  3782.    subroutine fg_ellipsef (int horiz, int vert)
  3783.    procedure fg_ellipsef (horiz, vert : integer);
  3784.  
  3785. Description
  3786.  
  3787.    The fg_ellipsef routine draws a filled ellipse in screen space. The ellipse
  3788.    is centered at the current graphics cursor position, and its size is
  3789.    determined by the specified lengths of its semi-axes. The ellipse is filled
  3790.    with pixels of the current color.
  3791.  
  3792. Parameters
  3793.  
  3794.    horiz is the length of the ellipse's horizontal semi-axis (the absolute
  3795.    screen space distance from the center of the ellipse to its horizontal
  3796.    extremity).
  3797.  
  3798.    vert is the length of the ellipse's vertical semi-axis (the absolute screen
  3799.    space distance from the center of the ellipse to its vertical extremity).
  3800.  
  3801. Return value
  3802.  
  3803.    none
  3804.  
  3805. Restrictions
  3806.  
  3807.    This routine has no effect in text video modes.
  3808.  
  3809. See also
  3810.  
  3811.    fg_circlef, fg_ellipse, fg_ellipsfw
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.                                       58                                       
  3833. -------------------------------------------------------------------------------
  3834. fg_ellipsew
  3835. -------------------------------------------------------------------------------
  3836.  
  3837. Prototype
  3838.  
  3839.    void fg_ellipsew (double horiz, double vert);
  3840.    sub FGellipsew (horiz#, vert#)
  3841.    subroutine fg_ellipsew (dbl horiz, dbl vert)
  3842.    procedure fg_ellipsew (horiz, vert : real);
  3843.  
  3844. Description
  3845.  
  3846.    The fg_ellipsew routine draws an unfilled ellipse in world space. The
  3847.    ellipse is centered at the current graphics cursor position, and its size
  3848.    is determined by the specified lengths of its semi-axes.
  3849.  
  3850. Parameters
  3851.  
  3852.    horiz defines the horizontal semi-axis of the ellipse (the absolute world
  3853.    space distance from the center of the ellipse to its horizontal extremity).
  3854.  
  3855.    vert defines the vertical semi-axis of the ellipse (the absolute world
  3856.    space distance from the center of the ellipse to its vertical extremity).
  3857.  
  3858. Return value
  3859.  
  3860.    none
  3861.  
  3862. Restrictions
  3863.  
  3864.    This routine is not available in Fastgraph/Light and has no effect in text
  3865.    video modes.
  3866.  
  3867. See also
  3868.  
  3869.    fg_circlew, fg_ellipse, fg_ellipsfw
  3870.  
  3871. Examples
  3872.  
  3873.    6-9
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.                                       59                                       
  3892. -------------------------------------------------------------------------------
  3893. fg_ellipsfw
  3894. -------------------------------------------------------------------------------
  3895.  
  3896. Prototype
  3897.  
  3898.    void fg_ellipsfw (double horiz, double vert);
  3899.    sub FGellipsfw (horiz#, vert#)
  3900.    subroutine fg_ellipsfw (dbl horiz, dbl vert)
  3901.    procedure fg_ellipsfw (horiz, vert : real);
  3902.  
  3903. Description
  3904.  
  3905.    The fg_ellipsfw routine draws a filled ellipse in world space. The ellipse
  3906.    is centered at the current graphics cursor position, and its size is
  3907.    determined by the specified lengths of its semi-axes. The ellipse is filled
  3908.    with pixels of the current color.
  3909.  
  3910. Parameters
  3911.  
  3912.    horiz defines the horizontal semi-axis of the ellipse (the absolute world
  3913.    space distance from the center of the ellipse to its horizontal extremity).
  3914.  
  3915.    vert defines the vertical semi-axis of the ellipse (the absolute world
  3916.    space distance from the center of the ellipse to its vertical extremity).
  3917.  
  3918. Return value
  3919.  
  3920.    none
  3921.  
  3922. Restrictions
  3923.  
  3924.    This routine is not available in Fastgraph/Light and has no effect in text
  3925.    video modes.
  3926.  
  3927. See also
  3928.  
  3929.    fg_circlefw, fg_ellipsew
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.                                       60                                       
  3951. -------------------------------------------------------------------------------
  3952. fg_erase
  3953. -------------------------------------------------------------------------------
  3954.  
  3955. Prototype
  3956.  
  3957.    void fg_erase (void);
  3958.    sub FGerase ()
  3959.    subroutine fg_erase ()
  3960.    procedure fg_erase;
  3961.  
  3962. Description
  3963.  
  3964.    The fg_erase routine clears the active video page or virtual buffer. In
  3965.    text modes, fg_erase stores a space character (ASCII 32) with a gray
  3966.    foreground attribute in each character cell. In graphics modes, fg_erase
  3967.    sets each pixel to zero.
  3968.  
  3969. Parameters
  3970.  
  3971.    none
  3972.  
  3973. Return value
  3974.  
  3975.    none
  3976.  
  3977. Restrictions
  3978.  
  3979.    none
  3980.  
  3981. See also
  3982.  
  3983.    fg_fillpage, fg_reset
  3984.  
  3985. Examples
  3986.  
  3987.    4-4, 8-10, 8-11, 8-13, 9-10, 10-22, 11-1
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.                                       61                                       
  4010. -------------------------------------------------------------------------------
  4011. fg_fadein
  4012. -------------------------------------------------------------------------------
  4013.  
  4014. Prototype
  4015.  
  4016.    void fg_fadein (int delay);
  4017.    sub FGfadein (delay%)
  4018.    subroutine fg_fadein (int delay)
  4019.    procedure fg_fadein (delay : integer);
  4020.  
  4021. Description
  4022.  
  4023.    The fg_fadein routine replaces the visual page contents with the hidden
  4024.    page contents. The replacement is done randomly in small sections, thus
  4025.    giving a "fade in" effect.
  4026.  
  4027. Parameters
  4028.  
  4029.    delay controls the speed at which the replacement takes place. A value of
  4030.    zero means to perform the replacement as quickly as possible, while 1 is
  4031.    slightly slower, 2 is slower yet, and so forth.
  4032.  
  4033. Return value
  4034.  
  4035.    none
  4036.  
  4037. Restrictions
  4038.  
  4039.    This routine has no effect in text video modes.
  4040.  
  4041.    The fg_fadein routine always applies to video pages, even when a virtual
  4042.    buffer is active.
  4043.  
  4044. See also
  4045.  
  4046.    fg_fadeout, fg_sethpage
  4047.  
  4048. Examples
  4049.  
  4050.    13-2
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.                                       62                                       
  4069. -------------------------------------------------------------------------------
  4070. fg_fadeout
  4071. -------------------------------------------------------------------------------
  4072.  
  4073. Prototype
  4074.  
  4075.    void fg_fadeout (int delay);
  4076.    sub FGfadeout (delay%)
  4077.    subroutine fg_fadeout (int delay)
  4078.    procedure fg_fadeout (delay : integer);
  4079.  
  4080. Description
  4081.  
  4082.    The fg_fadeout routine replaces the visual page contents with pixels of the
  4083.    current color. The replacement is done randomly in small sections, thus
  4084.    giving a "fade out" effect.
  4085.  
  4086. Parameters
  4087.  
  4088.    delay controls the speed at which the replacement takes place. A value of
  4089.    zero means to perform the replacement as quickly as possible, while 1 is
  4090.    slightly slower, 2 is slower yet, and so forth.
  4091.  
  4092. Return value
  4093.  
  4094.    none
  4095.  
  4096. Restrictions
  4097.  
  4098.    This routine has no effect in text video modes.
  4099.  
  4100.    The fg_fadeout routine always applies to video pages, even when a virtual
  4101.    buffer is active.
  4102.  
  4103. See also
  4104.  
  4105.    fg_fadein, fg_setcolor
  4106.  
  4107. Examples
  4108.  
  4109.    13-1
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.                                       63                                       
  4128. -------------------------------------------------------------------------------
  4129. fg_fillpage
  4130. -------------------------------------------------------------------------------
  4131.  
  4132. Prototype
  4133.  
  4134.    void fg_fillpage (void);
  4135.    sub FGfillpage ()
  4136.    subroutine fg_fillpage ()
  4137.    procedure fg_fillpage;
  4138.  
  4139. Description
  4140.  
  4141.    The fg_fillpage routine fills the active video page or virtual buffer. In
  4142.    text modes, it stores a solid block character (ASCII 219) with the current
  4143.    display attribute in each character cell. In graphics modes, fg_fillpage
  4144.    fills the active video page or virtual buffer with pixels of the current
  4145.    color.
  4146.  
  4147. Parameters
  4148.  
  4149.    none
  4150.  
  4151. Return value
  4152.  
  4153.    none
  4154.  
  4155. Restrictions
  4156.  
  4157.    none
  4158.  
  4159. See also
  4160.  
  4161.    fg_erase, fg_setcolor, fg_setattr
  4162.  
  4163. Examples
  4164.  
  4165.    7-6, 7-8, 8-8, 8-12, 8-16, 8-17, 10-8, 10-9, 10-15, 10-16, 13-8, 13-9
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.                                       64                                       
  4187. -------------------------------------------------------------------------------
  4188. fg_findpage
  4189. -------------------------------------------------------------------------------
  4190.  
  4191. Prototype
  4192.  
  4193.    int fg_findpage (void)
  4194.    function FGfindpage% ()
  4195.    int function fg_findpage ()
  4196.    function fg_findpage : integer;
  4197.  
  4198. Description
  4199.  
  4200.    The fg_findpage routine finds an available video page number for a virtual
  4201.    or logical page.
  4202.  
  4203. Parameters
  4204.  
  4205.    none
  4206.  
  4207. Return value
  4208.  
  4209.    If successful, fg_findpage returns an available video page number (between
  4210.    1 and 63), which may then be passed to fg_allocate, fg_alloccms,
  4211.    fg_allocems, or fg_allocxms. If unsuccessful, the return value is zero.
  4212.  
  4213. Restrictions
  4214.  
  4215.    none
  4216.  
  4217. See also
  4218.  
  4219.    fg_allocate, fg_alloccms, fg_allocems, fg_allocxms
  4220.  
  4221. Examples
  4222.  
  4223.    8-9, 8-10, 8-12
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.                                       65                                       
  4246. -------------------------------------------------------------------------------
  4247. fg_flicdone
  4248. -------------------------------------------------------------------------------
  4249.  
  4250. Prototype
  4251.  
  4252.    void fg_flicdone (char *context);
  4253.    sub FGflicdone (context$)
  4254.    subroutine fg_flicdone (int1 context)
  4255.    procedure fg_flicdone (var context);
  4256.  
  4257. Description
  4258.  
  4259.    The fg_flicdone routine closes the flic file associated with the specified
  4260.    context descriptor.
  4261.  
  4262. Parameters
  4263.  
  4264.    context is the name of a 16-byte buffer containing the flic file context
  4265.    descriptor.
  4266.  
  4267. Return value
  4268.  
  4269.    none
  4270.  
  4271. Restrictions
  4272.  
  4273.    none
  4274.  
  4275. See also
  4276.  
  4277.    fg_flicopen
  4278.  
  4279. Examples
  4280.  
  4281.    9-8
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.                                       66                                       
  4305. -------------------------------------------------------------------------------
  4306. fg_flichead
  4307. -------------------------------------------------------------------------------
  4308.  
  4309. Prototype
  4310.  
  4311.    int fg_flichead (char *flic_file, char *flic_header);
  4312.    function FGflichead% (flic_file$, flic_header$)
  4313.    int function fg_flichead (char flic_file, int1 flic_header)
  4314.    function fg_flichead (flic_file : string; var flic_header) : integer;
  4315.  
  4316. Description
  4317.  
  4318.    The fg_flichead routine reads an FLI or FLC file header.
  4319.  
  4320. Parameters
  4321.  
  4322.    flic_file is the name of the FLI/FLC file, terminated by a zero byte.
  4323.  
  4324.    flic_header is the name of the buffer to receive the 128-byte FLI/FLC file
  4325.    header. In BASIC, it must be a fixed-length 128-byte string.
  4326.  
  4327. Return value
  4328.  
  4329.     0 = Success
  4330.    -1 = The specified file does not exist
  4331.    -2 = The specified file is not an FLI or FLC file
  4332.  
  4333. Restrictions
  4334.  
  4335.    none
  4336.  
  4337. See also
  4338.  
  4339.    fg_flicmode, fg_flicplay, fg_flicsize, fg_showflic
  4340.  
  4341. Examples
  4342.  
  4343.    9-7
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.                                       67                                       
  4364. -------------------------------------------------------------------------------
  4365. fg_flicmode
  4366. -------------------------------------------------------------------------------
  4367.  
  4368. Prototype
  4369.  
  4370.    int fg_flicmode (char *flic_header);
  4371.    function FGflicmode% (flic_header$)
  4372.    int function fg_flicmode (int1 flic_header)
  4373.    function fg_flicmode (var flic_header) : integer;
  4374.  
  4375. Description
  4376.  
  4377.    The fg_flicmode routine determines the optimal video mode for the FLI or
  4378.    FLC image associated with the specified flic file header. The optimal mode
  4379.    is the 256-color graphics mode having the lowest resolution larger than or
  4380.    equal to the image dimensions.
  4381.  
  4382. Parameters
  4383.  
  4384.    flic_header is the name of the buffer containing the 128-byte FLI/FLC file
  4385.    header.
  4386.  
  4387. Return value
  4388.  
  4389.    >0 = The optimal video mode for displaying the FLI/FLC image
  4390.    -1 = The flic_header buffer does not contain a valid flic file header
  4391.  
  4392. Restrictions
  4393.  
  4394.    none
  4395.  
  4396. See also
  4397.  
  4398.    fg_flichead, fg_showflic
  4399.  
  4400. Examples
  4401.  
  4402.    9-7
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.                                       68                                       
  4423. -------------------------------------------------------------------------------
  4424. fg_flicopen
  4425. -------------------------------------------------------------------------------
  4426.  
  4427. Prototype
  4428.  
  4429.    int fg_flicopen (char *flic_file, char *context);
  4430.    function FGflicopen% (flic_file$, context$)
  4431.    int function fg_flicopen (char flic_file, int1 context)
  4432.    function fg_flicopen (flic_file : string; var context) : integer;
  4433.  
  4434. Description
  4435.  
  4436.    The fg_flicopen routine opens an FLI or FLC file (collectively called flic
  4437.    files) for subsequent processing by Fastgraph's other low-level flic file
  4438.    support routines. If successful, the file pointer will be positioned at the
  4439.    beginning of the first frame.
  4440.  
  4441. Parameters
  4442.  
  4443.    flic_file is the name of the flic file. A device and path name may be
  4444.    included as part of the file name. The file name must be terminated by a
  4445.    zero byte.
  4446.  
  4447.    context is the name of a 16-byte buffer that will receive the flic file
  4448.    context descriptor. The descriptor values will only be meaningful if the
  4449.    return value is zero.
  4450.  
  4451. Return value
  4452.  
  4453.     0 = FLI/FLC file opened successfully
  4454.    -1 = The specified file does not exist
  4455.    -2 = The specified file is not an FLI or FLC file
  4456.  
  4457. Restrictions
  4458.  
  4459.    none
  4460.  
  4461. See also
  4462.  
  4463.    fg_flicdone, fg_flicplay, fg_flicskip, fg_showflic
  4464.  
  4465. Examples
  4466.  
  4467.    9-8
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.                                       69                                       
  4482. -------------------------------------------------------------------------------
  4483. fg_flicplay
  4484. -------------------------------------------------------------------------------
  4485.  
  4486. Prototype
  4487.  
  4488.    int fg_flicplay (char *context, int frames, int flags);
  4489.    function FGflicplay% (context$, frames%, flags%)
  4490.    int function fg_flicplay (int1 context, int frames, int flags)
  4491.    function fg_flicplay (var context; frames, flags : integer) : integer;
  4492.  
  4493. Description
  4494.  
  4495.    The fg_flicplay routine displays the next one or more individual frames in
  4496.    a flic file that was previously opened with fg_flicopen.
  4497.  
  4498. Parameters
  4499.  
  4500.    context is the name of a 16-byte buffer containing the flic file context
  4501.    descriptor.
  4502.  
  4503.    frames is the number of frames to display from the flic file, starting from
  4504.    the current file position.
  4505.  
  4506.    flags is a bit mask that controls how the image is displayed.
  4507.      Bit 0
  4508.         0 = delay between frames as indicated in flic header
  4509.         1 = no delay between frames
  4510.      Bit 1
  4511.         0 = display image relative to screen origin
  4512.         1 = display image relative current graphics position
  4513.      Bit 2
  4514.         0 = display image from the specified flic file
  4515.         1 = display image from the fg_imagebuf buffer
  4516.      Bits 3-15 are reserved for future use and should be zero.
  4517.  
  4518. Return value
  4519.  
  4520.    The number of frames displayed. This value may be less than frames if the
  4521.    end-of-file is reached before displaying the requested number of frames.
  4522.  
  4523. Restrictions
  4524.  
  4525.    Flic files are only meaningful in 256-color graphics modes. This routine
  4526.    has no effect in other video modes.
  4527.  
  4528. See also
  4529.  
  4530.    fg_flicopen, fg_flicskip, fg_showflic
  4531.  
  4532. Examples
  4533.  
  4534.    9-8
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.                                       70                                       
  4541. -------------------------------------------------------------------------------
  4542. fg_flicsize
  4543. -------------------------------------------------------------------------------
  4544.  
  4545. Prototype
  4546.  
  4547.    void fg_flicsize (char *flic_header, int *width, int *height);
  4548.    sub FGflicsize (flic_header$, width%, height%)
  4549.    subroutine fg_flicsize (int1 flic_header, int width, int height)
  4550.    procedure fg_flicsize (var flic_header; var width, height : integer);
  4551.  
  4552. Description
  4553.  
  4554.    The fg_flicsize routine returns the dimensions for the flic image
  4555.    associated with the specified flic file header.
  4556.  
  4557. Parameters
  4558.  
  4559.    flic_header is the name of the buffer containing the 128-byte FLI/FLC file
  4560.    header.
  4561.  
  4562.    width receives the width in pixels of the flic image. If flic_header does
  4563.    not contain a valid FLI/FLC file header, width will be set to -1.
  4564.  
  4565.    height receives the height in pixels of the flic image. If flic_header does
  4566.    not contain a valid FLI/FLC file header, height will be set to -1.
  4567.  
  4568. Return value
  4569.  
  4570.    none
  4571.  
  4572. Restrictions
  4573.  
  4574.    none
  4575.  
  4576. See also
  4577.  
  4578.    fg_flichead, fg_showflic
  4579.  
  4580. Examples
  4581.  
  4582.    9-7
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.                                       71                                       
  4600. -------------------------------------------------------------------------------
  4601. fg_flicskip
  4602. -------------------------------------------------------------------------------
  4603.  
  4604. Prototype
  4605.  
  4606.    int fg_flicskip (char *context, int frames);
  4607.    function FGflicskip% (context$, frames%)
  4608.    int function fg_flicskip (int1 context, int frames)
  4609.    function fg_flicskip (var context; frames : integer) : integer;
  4610.  
  4611. Description
  4612.  
  4613.    The fg_flicskip routine advances one or more frames in a flic file that was
  4614.    previously opened with fg_flicopen. If the last frame played by fg_flicplay
  4615.    displayed the frame from the fg_imagebuf buffer, the frame position will be
  4616.    adjusted in the fg_imagebuf buffer. Otherwise, the flic file position
  4617.    itself will be adjusted.
  4618.  
  4619. Parameters
  4620.  
  4621.    context is the name of a 16-byte buffer containing the flic file context
  4622.    descriptor.
  4623.  
  4624.    frames is the number of frames to skip in the flic file, starting from the
  4625.    current file position. If frames is negative, the flic file position will
  4626.    be set to the first frame.
  4627.  
  4628. Return value
  4629.  
  4630.    The number of frames skipped. This value may be less than frames if the
  4631.    end-of-file is reached before skipping the requested number of frames. If
  4632.    frames is negative, the return value will be zero.
  4633.  
  4634. Restrictions
  4635.  
  4636.    none
  4637.  
  4638. See also
  4639.  
  4640.    fg_flicopen, fg_flicplay
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.                                       72                                       
  4659. -------------------------------------------------------------------------------
  4660. fg_flipmask
  4661. -------------------------------------------------------------------------------
  4662.  
  4663. Prototype
  4664.  
  4665.    void fg_flipmask (char *map_array, int runs, int width);
  4666.    sub FGflipmask (map_array$, runs%, width%)
  4667.    subroutine fg_flipmask (int1 map_array, int runs, int width)
  4668.    procedure fg_flipmask (var map_array : byte; runs, width : integer);
  4669.  
  4670. Description
  4671.  
  4672.    The fg_flipmask routine displays a reversed clipped image stored as a
  4673.    masking map. The image will be positioned so that its lower left corner is
  4674.    at the graphics cursor position. Refer to the description of fg_drawmask
  4675.    for more information about masking maps.
  4676.  
  4677. Parameters
  4678.  
  4679.    map_array is the name of the array containing the masking map.
  4680.  
  4681.    runs is the number of pixel runs in the masking map.
  4682.  
  4683.    width is the width in pixels of the masking map.
  4684.  
  4685. Return value
  4686.  
  4687.    none
  4688.  
  4689. Restrictions
  4690.  
  4691.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  4692.  
  4693.    This routine has no effect in text video modes.
  4694.  
  4695. See also
  4696.  
  4697.    fg_clipmask, fg_drawmask, fg_revmask, fg_setclip
  4698.  
  4699. Examples
  4700.  
  4701.    10-23
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.                                       73                                       
  4718. -------------------------------------------------------------------------------
  4719. fg_flood
  4720. -------------------------------------------------------------------------------
  4721.  
  4722. Prototype
  4723.  
  4724.    void fg_flood (int ix, int iy);
  4725.    sub FGflood (ix%, iy%)
  4726.    subroutine fg_flood (int ix, int iy)
  4727.    procedure fg_flood (ix, iy : integer);
  4728.  
  4729. Description
  4730.  
  4731.    The fg_flood routine fills an arbitrary closed region with the current
  4732.    color value, with respect to the current clipping limits. The region is
  4733.    defined by specifying a screen space point within its interior.
  4734.  
  4735. Parameters
  4736.  
  4737.    ix is the screen space x coordinate of the interior point.
  4738.  
  4739.    iy is the screen space y coordinate of the interior point.
  4740.  
  4741. Return value
  4742.  
  4743.    none
  4744.  
  4745. Restrictions
  4746.  
  4747.    This routine has no effect in text video modes.
  4748.  
  4749. See also
  4750.  
  4751.    fg_floodw, fg_paint
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.                                       74                                       
  4777. -------------------------------------------------------------------------------
  4778. fg_floodw
  4779. -------------------------------------------------------------------------------
  4780.  
  4781. Prototype
  4782.  
  4783.    void fg_floodw (double x, double y);
  4784.    sub FGfloodw (x#, y#)
  4785.    subroutine fg_floodw (dbl x, dbl y)
  4786.    procedure fg_floodw (x, y : real);
  4787.  
  4788. Description
  4789.  
  4790.    The fg_floodw routine fills an arbitrary closed region with the current
  4791.    color value, with respect to the current clipping limits. The region is
  4792.    defined by specifying a world space point within its interior.
  4793.  
  4794. Parameters
  4795.  
  4796.    x is the world space x coordinate of the interior point.
  4797.  
  4798.    y is the world space y coordinate of the interior point.
  4799.  
  4800. Return value
  4801.  
  4802.    none
  4803.  
  4804. Restrictions
  4805.  
  4806.    This routine is not available in Fastgraph/Light and has no effect in text
  4807.    video modes.
  4808.  
  4809. See also
  4810.  
  4811.    fg_flood, fg_paintw
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.                                       75                                       
  4836. -------------------------------------------------------------------------------
  4837. fg_flpimage
  4838. -------------------------------------------------------------------------------
  4839.  
  4840. Prototype
  4841.  
  4842.    void fg_flpimage (char *map_array, int width, int height);
  4843.    sub FGflpimage (map_array$, width%, height%)
  4844.    subroutine fg_flpimage (int1 map_array, int width, int height)
  4845.    procedure fg_flpimage (var map_array : byte; width, height : integer);
  4846.  
  4847. Description
  4848.  
  4849.    The fg_flpimage routine displays a reversed clipped image stored as a mode-
  4850.    specific bitmap. The image will be positioned so that its lower left corner
  4851.    is at the graphics cursor position. Only that part of the image that falls
  4852.    within the current clipping limits will be displayed. Refer to the
  4853.    Fastgraph User's Guide for complete information about mode-specific
  4854.    bitmaps.
  4855.  
  4856. Parameters
  4857.  
  4858.    map_array is the name of the array containing the bitmap.
  4859.  
  4860.    width is the width in bytes of the bitmap.
  4861.  
  4862.    height is the height in bytes (pixel rows) of the bitmap.
  4863.  
  4864. Return value
  4865.  
  4866.    none
  4867.  
  4868. Restrictions
  4869.  
  4870.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  4871.  
  4872.    This routine has no effect in text video modes.
  4873.  
  4874. See also
  4875.  
  4876.    fg_clpimage, fg_drwimage, fg_getimage, fg_invert, fg_pack, fg_putimage,
  4877.    fg_revimage, fg_setclip, fg_unpack
  4878.  
  4879. Examples
  4880.  
  4881.    10-8, 10-9
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.                                       76                                       
  4895. -------------------------------------------------------------------------------
  4896. fg_fontsize
  4897. -------------------------------------------------------------------------------
  4898.  
  4899. Prototype
  4900.  
  4901.    void fg_fontsize (int char_height);
  4902.    sub FGfontsize (char_height%)
  4903.    subroutine fg_fontsize (int char_height)
  4904.    procedure fg_fontsize (char_height : integer);
  4905.  
  4906. Description
  4907.  
  4908.    The fg_fontsize routine enables the 8x8, 8x14, or 8x16 ROM BIOS character
  4909.    font for strings displayed with fg_print and fg_text. Refer to Chapter 7 of
  4910.    the Fastgraph User's Guide for information about the default character
  4911.    sizes and number of text rows available in each video mode.
  4912.  
  4913. Parameters
  4914.  
  4915.    char_height is the desired character height in pixels. Its value must be 8,
  4916.    14, or 16.
  4917.  
  4918. Return value
  4919.  
  4920.    none
  4921.  
  4922. Restrictions
  4923.  
  4924.    If char_height is not a valid value, fg_fontsize does nothing.
  4925.  
  4926.    This routine is meaningful only in VGA and SVGA graphics video modes.
  4927.  
  4928. See also
  4929.  
  4930.    fg_print, fg_text
  4931.  
  4932. Examples
  4933.  
  4934.    7-8
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.                                       77                                       
  4954. -------------------------------------------------------------------------------
  4955. fg_freepage
  4956. -------------------------------------------------------------------------------
  4957.  
  4958. Prototype
  4959.  
  4960.    int fg_freepage (int page_number);
  4961.    function FGfreepage% (page_number%)
  4962.    int function fg_freepage (int page_number)
  4963.    function fg_freepage (page_number : integer) : integer;
  4964.  
  4965. Description
  4966.  
  4967.    The fg_freepage routine releases a virtual or logical video page created
  4968.    with fg_allocate, fg_alloccms, fg_allocems, or fg_allocxms.
  4969.  
  4970. Parameters
  4971.  
  4972.    page_number is the number of the virtual or logical page to release. It
  4973.    must be between 1 and 63.
  4974.  
  4975. Return value
  4976.  
  4977.    A status code indicating the success or failure of the virtual page
  4978.    release, as shown here:
  4979.  
  4980.      0 = virtual or logical page successfully released
  4981.      1 = page number is invalid
  4982.      7 = virtual page released, but memory control blocks destroyed
  4983.      9 = attempt to release a physical page, or a virtual or logical page
  4984.          that was never created
  4985.  
  4986. Restrictions
  4987.  
  4988.    This routine has no effect if page_number references a physical video page,
  4989.    or a virtual page that was never created.
  4990.  
  4991. See also
  4992.  
  4993.    fg_allocate, fg_alloccms, fg_allocems, fg_allocxms
  4994.  
  4995. Examples
  4996.  
  4997.    8-3, 8-4, 8-5, 8-6, 8-9, 8-10, 8-12, 11-1, 11-2, 11-3, 11-4, 12-4, 12-5,
  4998.    13-2, 13-5, 17-1
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.                                       78                                       
  5013. -------------------------------------------------------------------------------
  5014. fg_getaddr
  5015. -------------------------------------------------------------------------------
  5016.  
  5017. Prototype
  5018.  
  5019.    int fg_getaddr (void);
  5020.    function FGgetaddr% ()
  5021.    int function fg_getaddr ()
  5022.    function fg_getaddr : integer;
  5023.  
  5024. Description
  5025.  
  5026.    The fg_getaddr routine returns the segment address (in real mode) or
  5027.    segment selector (in protected mode) for the active video page.
  5028.  
  5029. Parameters
  5030.  
  5031.    none
  5032.  
  5033. Return value
  5034.  
  5035.    The segment address of the active video page.
  5036.  
  5037. Restrictions
  5038.  
  5039.    none
  5040.  
  5041. See also
  5042.  
  5043.    fg_setpage
  5044.  
  5045. Examples
  5046.  
  5047.    8-9
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.                                       79                                       
  5072. -------------------------------------------------------------------------------
  5073. fg_getattr
  5074. -------------------------------------------------------------------------------
  5075.  
  5076. Prototype
  5077.  
  5078.    int fg_getattr (int row, int column);
  5079.    function FGgetattr% (row%, column%)
  5080.    int function fg_getattr (int row, int column)
  5081.    function fg_getattr (row, column : integer) : integer;
  5082.  
  5083. Description
  5084.  
  5085.    The fg_getattr routine returns the character attribute stored at the
  5086.    specified position on the active video page.
  5087.  
  5088. Parameters
  5089.  
  5090.    row is the row number of the character cell to examine, between 0 and 24
  5091.    (unless you've called fg_setlines to increase the number of lines per
  5092.    page).
  5093.  
  5094.    column is the column number of the character cell to examine, between 0 and
  5095.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  5096.  
  5097. Return value
  5098.  
  5099.    The character attribute stored at the specified position.
  5100.  
  5101. Restrictions
  5102.  
  5103.    This routine has no effect in graphics video modes.
  5104.  
  5105. See also
  5106.  
  5107.    fg_getchar, fg_getimage
  5108.  
  5109. Examples
  5110.  
  5111.    7-4
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.                                       80                                       
  5131. -------------------------------------------------------------------------------
  5132. fg_getbanks
  5133. -------------------------------------------------------------------------------
  5134.  
  5135. Prototype
  5136.  
  5137.    void fg_getbanks (int *read_bank, int *write_bank);
  5138.    sub FGgetbanks (read_bank%, write_bank%)
  5139.    subroutine fg_getbanks (int read_bank, int write_bank)
  5140.    procedure fg_getbanks (var read_bank, write_bank : integer);
  5141.  
  5142. Description
  5143.  
  5144.    The fg_getbanks routine returns the current SVGA read and write bank
  5145.    numbers.
  5146.  
  5147. Parameters
  5148.  
  5149.    read_bank receives the SVGA bank number used in read operations.
  5150.  
  5151.    write_bank Receives the SVGA bank number used in write operations.
  5152.  
  5153. Return value
  5154.  
  5155.    none
  5156.  
  5157. Restrictions
  5158.  
  5159.    The read and write bank numbers will be correct only if they were set
  5160.    through Fastgraph's SVGA kernel, or with fg_setbanks.
  5161.  
  5162.    For SVGA chipsets without separate read/write banks, or when using a VESA
  5163.    driver that does not support separate banks, the values returned for
  5164.    read_bank and write_bank will be identical.
  5165.  
  5166. See also
  5167.  
  5168.    fg_setbanks, fg_svgainit
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.                                       81                                       
  5190. -------------------------------------------------------------------------------
  5191. fg_getblock
  5192. -------------------------------------------------------------------------------
  5193.  
  5194. Prototype
  5195.  
  5196.    void fg_getblock (char [far] *buffer, int minx, int maxx, int miny,
  5197.      int maxy);
  5198.    sub FGgetblock (buffer$, minx%, maxx%, miny%, maxy%)
  5199.    subroutine fg_getblock (int1 [far] buffer, int minx, int maxx, int miny,
  5200.      int maxy)
  5201.    procedure fg_getblock (buffer : pointer; minx, maxx, miny, maxy : integer);
  5202.  
  5203. Description
  5204.  
  5205.    The fg_getblock routine retrieves a block (for later display with
  5206.    fg_putblock) from the specified position on the active video page or
  5207.    virtual buffer. In text modes, the block extremes are defined in character
  5208.    space; in graphics modes, they are defined in screen space. Use fg_imagesiz
  5209.    to determine the array size required to store the block.
  5210.  
  5211. Parameters
  5212.  
  5213.    buffer is the name of the array to receive the block. It is passed by far
  5214.    reference in 16-bit modes except when using BASIC.
  5215.  
  5216.    minx is the screen space x coordinate of the block's left edge. In graphics
  5217.    modes, its value is reduced to a byte boundary if necessary.
  5218.  
  5219.    maxx is the x coordinate of the block's right edge. It must be greater than
  5220.    or equal to the value of minx. In graphics modes, its value is extended to
  5221.    a byte boundary if necessary.
  5222.  
  5223.    miny is the y coordinate of the block's top edge.
  5224.  
  5225.    maxy is the y coordinate of the block's bottom edge. It must be greater
  5226.    than or equal to the value of miny.
  5227.  
  5228. Return value
  5229.  
  5230.    none
  5231.  
  5232. Restrictions
  5233.  
  5234.    In 16-bit modes, the size of buffer is limited to 64K bytes.
  5235.  
  5236.    In real mode Pascal programs, buffer must be allocated dynamically with the
  5237.    GetMem procedure. This is the only way to pass something by far reference
  5238.    in Pascal.
  5239.  
  5240. See also
  5241.  
  5242.    fg_imagesiz, fg_putblock
  5243.  
  5244. Examples
  5245.  
  5246.    11-10
  5247.  
  5248.                                       82                                       
  5249. -------------------------------------------------------------------------------
  5250. fg_getchar
  5251. -------------------------------------------------------------------------------
  5252.  
  5253. Prototype
  5254.  
  5255.    int fg_getchar (int row, int column);
  5256.    function FGgetchar% (row%, column%)
  5257.    int function fg_getchar (int row, int column)
  5258.    function fg_getchar (row, column : integer) : integer;
  5259.  
  5260. Description
  5261.  
  5262.    The fg_getchar routine returns the character value stored at the specified
  5263.    position on the active video page.
  5264.  
  5265. Parameters
  5266.  
  5267.    row is the row number of the character cell to examine, between 0 and 24
  5268.    (unless you've called fg_setlines to increase the number of lines per
  5269.    page).
  5270.  
  5271.    column is the column number of the character cell to examine, between 0 and
  5272.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  5273.  
  5274. Return value
  5275.  
  5276.    The character value stored at the specified position.
  5277.  
  5278. Restrictions
  5279.  
  5280.    This routine has no effect in graphics video modes.
  5281.  
  5282. See also
  5283.  
  5284.    fg_getattr, fg_getimage
  5285.  
  5286. Examples
  5287.  
  5288.    7-4
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.                                       83                                       
  5308. -------------------------------------------------------------------------------
  5309. fg_getclip
  5310. -------------------------------------------------------------------------------
  5311.  
  5312. Prototype
  5313.  
  5314.    void fg_getclip (int *minx, int *maxx, int *miny, int *maxy);
  5315.    sub FGgetclip (minx%, maxx%, miny%, maxy%)
  5316.    subroutine fg_getclip (int minx, int maxx, int miny, int maxy)
  5317.    procedure fg_getclip (var minx, maxx, miny, maxy : integer);
  5318.  
  5319. Description
  5320.  
  5321.    The fg_getclip routine returns the clipping region extremes in screen
  5322.    space. The clipping region is a rectangular area outside of which graphics
  5323.    are suppressed. By default, the clipping region is set to the video page
  5324.    extremes.
  5325.  
  5326. Parameters
  5327.  
  5328.    minx receives the x coordinate of the clipping region's left edge.
  5329.  
  5330.    maxx receives the x coordinate of the clipping region's right edge.
  5331.  
  5332.    miny receives the y coordinate of the clipping region's top edge.
  5333.  
  5334.    maxy receives the y coordinate of the clipping region's bottom edge.
  5335.  
  5336. Return value
  5337.  
  5338.    none
  5339.  
  5340. Restrictions
  5341.  
  5342.    This routine has no effect in text video modes.
  5343.  
  5344. See also
  5345.  
  5346.    fg_setclip
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.                                       84                                       
  5367. -------------------------------------------------------------------------------
  5368. fg_getclock
  5369. -------------------------------------------------------------------------------
  5370.  
  5371. Prototype
  5372.  
  5373.    long fg_getclock (void);
  5374.    function FGgetclock& ()
  5375.    int4 function fg_getclock ()
  5376.    function fg_getclock : longint;
  5377.  
  5378. Description
  5379.  
  5380.    The fg_getclock routine returns the number of clock ticks since midnight.
  5381.  
  5382. Parameters
  5383.  
  5384.    none
  5385.  
  5386. Return value
  5387.  
  5388.    The number of clock ticks since midnight. There are approximately 18.2
  5389.    clock ticks per second. The return value is always a 32-bit quantity.
  5390.  
  5391. Restrictions
  5392.  
  5393.    none
  5394.  
  5395. Examples
  5396.  
  5397.    16-2
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.                                       85                                       
  5426. -------------------------------------------------------------------------------
  5427. fg_getcolor
  5428. -------------------------------------------------------------------------------
  5429.  
  5430. Prototype
  5431.  
  5432.    int fg_getcolor (void);
  5433.    function FGgetcolor% ()
  5434.    int function fg_getcolor ()
  5435.    function fg_getcolor : integer;
  5436.  
  5437. Description
  5438.  
  5439.    The fg_getcolor routine returns the current text attribute (in text modes)
  5440.    or color index (in graphics modes), as defined by the most recent call to
  5441.    fg_setattr or fg_setcolor.
  5442.  
  5443. Parameters
  5444.  
  5445.    none
  5446.  
  5447. Return value
  5448.  
  5449.    In graphics video modes, the return value is the current color index. In
  5450.    text modes, it is the current text attribute.
  5451.  
  5452. Restrictions
  5453.  
  5454.    none
  5455.  
  5456. See also
  5457.  
  5458.    fg_setattr, fg_setcolor
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.                                       86                                       
  5485. -------------------------------------------------------------------------------
  5486. fg_getdacs
  5487. -------------------------------------------------------------------------------
  5488.  
  5489. Prototype
  5490.  
  5491.    void fg_getdacs (int start, int count, char *values);
  5492.    sub FGgetdacs (start%, count%, values$)
  5493.    subroutine fg_getdacs (int start, int count, int1 values)
  5494.    procedure fg_getdacs (start, count : integer; var values : shortint);
  5495.  
  5496. Description
  5497.  
  5498.    The fg_getdacs routine retrieves the red, green, and blue color components
  5499.    of a contiguous block of video DAC registers. Each color component is a
  5500.    value between 0 and 63; increasing values produce more intense colors.
  5501.    Reading many DAC registers with fg_getdacs is considerably faster than
  5502.    doing so individually with fg_getrgb.
  5503.  
  5504. Parameters
  5505.  
  5506.    start is the starting video DAC register number, between 0 and 255.
  5507.  
  5508.    count is the number of contiguous DAC registers to retrieve, between 1 and
  5509.    256. If the sum of start and count exceeds 256, the register numbers wrap
  5510.    around and resume with register number 0.
  5511.  
  5512.    values is the name of the array that will receive the color components. The
  5513.    first three bytes of this array receive the red, green, and blue components
  5514.    for DAC register start, the next three bytes receive the components for
  5515.    register start+1, and so forth. The size of the values array must be at
  5516.    least 3*count bytes.
  5517.  
  5518. Return value
  5519.  
  5520.    none
  5521.  
  5522. Restrictions
  5523.  
  5524.    This routine has no effect in text modes, or in CGA, Tandy, and Hercules
  5525.    graphics modes. In modes 13 to 16, it is meaningful only when run on a VGA
  5526.    or SVGA system; its results are unpredictable in these modes when run on an
  5527.    EGA. You can use fg_testmode(18,0) to check for a VGA or SVGA system.
  5528.  
  5529. See also
  5530.  
  5531.    fg_getrgb, fg_setdacs, fg_setrgb
  5532.  
  5533. Examples
  5534.  
  5535.    5-12
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.                                       87                                       
  5544. -------------------------------------------------------------------------------
  5545. fg_getentry
  5546. -------------------------------------------------------------------------------
  5547.  
  5548. Prototype
  5549.  
  5550.    void fg_getentry (int page_number, int *page_addr, int *page_type);
  5551.    sub FGgetentry (page_number%, page_addr%, page_type%)
  5552.    subroutine fg_getentry (int page_number, int page_addr, int page_type)
  5553.    procedure fg_getentry (page_number : integer; var page_addr,
  5554.      page_type : integer);
  5555.  
  5556. Description
  5557.  
  5558.    The fg_getentry routine retrieves the type and address of a physical,
  5559.    virtual, or logical video page. This routine is useful for saving virtual
  5560.    or logical page contents across video mode changes.
  5561.  
  5562. Parameters
  5563.  
  5564.    page_number is the number of the desired video page. It must be between 0
  5565.    and 63.
  5566.  
  5567.    page_addr is the address of the specified page. For physical pages, virtual
  5568.    pages, and logical pages in conventional memory, the address is an ordinary
  5569.    segment address. For logical pages in EMS or XMS memory, the page address
  5570.    is an EMS or XMS handle.
  5571.  
  5572.    page_type is a return value indicating the page type, as shown here:
  5573.      0 = unallocated page
  5574.      1 = physical page
  5575.      2 = virtual page
  5576.      3 = logical page in expanded memory (EMS)
  5577.      4 = logical page in extended memory (XMS)
  5578.      5 = logical page in conventional memory
  5579.  
  5580. Return value
  5581.  
  5582.    none
  5583.  
  5584. Restrictions
  5585.  
  5586.    none
  5587.  
  5588. See also
  5589.  
  5590.    fg_setentry
  5591.  
  5592. Examples
  5593.  
  5594.    8-12
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.                                       88                                       
  5603. -------------------------------------------------------------------------------
  5604. fg_gethpage
  5605. -------------------------------------------------------------------------------
  5606.  
  5607. Prototype
  5608.  
  5609.    int fg_gethpage (void);
  5610.    function FGgethpage% ()
  5611.    int function fg_gethpage ()
  5612.    function fg_gethpage : integer;
  5613.  
  5614. Description
  5615.  
  5616.    The fg_gethpage routine returns the hidden video page number (as set in the
  5617.    most recent call to fg_sethpage).
  5618.  
  5619. Parameters
  5620.  
  5621.    none
  5622.  
  5623. Return value
  5624.  
  5625.    The number of the hidden video page, between 0 and 63.
  5626.  
  5627. Restrictions
  5628.  
  5629.    none
  5630.  
  5631. See also
  5632.  
  5633.    fg_sethpage
  5634.  
  5635.  
  5636.  
  5637.  
  5638.  
  5639.  
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.                                       89                                       
  5662. -------------------------------------------------------------------------------
  5663. fg_getimage
  5664. -------------------------------------------------------------------------------
  5665.  
  5666. Prototype
  5667.  
  5668.    void fg_getimage (char *map_array, int width, int height);
  5669.    sub FGgetimage (map_array$, width%, height%)
  5670.    subroutine fg_getimage (int1 map_array, int width, int height)
  5671.    procedure fg_getimage (var map_array : byte; width, height : integer);
  5672.  
  5673. Description
  5674.  
  5675.    The fg_getimage routine retrieves an image as a mode-specific bitmap. The
  5676.    graphics cursor position (the text cursor position in text video modes)
  5677.    defines the lower left corner of the image to retrieve. Refer to the
  5678.    Fastgraph User's Guide for complete information about mode-specific
  5679.    bitmaps.
  5680.  
  5681. Parameters
  5682.  
  5683.    map_array is the name of the array that will receive the bitmap. In BASIC,
  5684.    you must explicitly declare map_array as a fixed-length string variable of
  5685.    length width*height.
  5686.  
  5687.    width is the width in bytes of the bitmap.
  5688.  
  5689.    height is the height in bytes (pixel rows) of the bitmap.
  5690.  
  5691. Return value
  5692.  
  5693.    none
  5694.  
  5695. Restrictions
  5696.  
  5697.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  5698.  
  5699. See also
  5700.  
  5701.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getmap, fg_putimage, fg_revimage
  5702.  
  5703. Examples
  5704.  
  5705.    10-12, 10-13, 10-17, 10-18
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.                                       90                                       
  5721. -------------------------------------------------------------------------------
  5722. fg_getindex
  5723. -------------------------------------------------------------------------------
  5724.  
  5725. Prototype
  5726.  
  5727.    int fg_getindex (int index);
  5728.    function FGgetindex% (index%)
  5729.    int function fg_getindex (int index)
  5730.    function fg_getindex (index : integer) : integer;
  5731.  
  5732. Description
  5733.  
  5734.    The fg_getindex routine returns the color value assigned to a specified
  5735.    virtual color index.
  5736.  
  5737. Parameters
  5738.  
  5739.    index is the virtual color index to retrieve, between 0 and 255.
  5740.  
  5741. Return value
  5742.  
  5743.    In graphics video modes with fewer than 256 available colors, the return
  5744.    value is the color value assigned to the specified virtual index. In text
  5745.    modes and 256-color graphics modes, fg_getindex returns the value passed to
  5746.    it.
  5747.  
  5748. Restrictions
  5749.  
  5750.    none
  5751.  
  5752. See also
  5753.  
  5754.    fg_defcolor, fg_palette, fg_setcolor
  5755.  
  5756.  
  5757.  
  5758.  
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.                                       91                                       
  5780. -------------------------------------------------------------------------------
  5781. fg_getkey
  5782. -------------------------------------------------------------------------------
  5783.  
  5784. Prototype
  5785.  
  5786.    void fg_getkey (unsigned char *key, unsigned char *aux);
  5787.    sub FGgetkey (key$, aux$)
  5788.    subroutine fg_getkey (int1 key, int1 aux)
  5789.    procedure fg_getkey (var key, aux : byte);
  5790.  
  5791. Description
  5792.  
  5793.    The fg_getkey routine waits for a keystroke, or reads the next entry from
  5794.    the BIOS keyboard buffer (without echo). It returns the keystroke's
  5795.    standard or extended keyboard code (a list of these appears in Chapter 14
  5796.    of the Fastgraph User's Guide).
  5797.  
  5798. Parameters
  5799.  
  5800.    key receives the keystroke's standard keyboard code if it represents a
  5801.    standard character. If the keystroke represents an extended character, key
  5802.    will be set to zero. In BASIC, you must explicitly declare key as a fixed-
  5803.    length string variable of length 1.
  5804.  
  5805.    aux receives the keystroke's extended keyboard code if it represents an
  5806.    extended character. If the keystroke represents a standard character, aux
  5807.    will be set to zero. In BASIC, you must explicitly declare aux as a fixed-
  5808.    length string variable of length 1.
  5809.  
  5810. Return value
  5811.  
  5812.    none
  5813.  
  5814. Restrictions
  5815.  
  5816.    none
  5817.  
  5818. See also
  5819.  
  5820.    fg_intkey, fg_kbtest, fg_waitkey
  5821.  
  5822. Examples
  5823.  
  5824.    13-7, 13-8, 14-1, 16-2
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.                                       92                                       
  5839. -------------------------------------------------------------------------------
  5840. fg_getlines
  5841. -------------------------------------------------------------------------------
  5842.  
  5843. Prototype
  5844.  
  5845.    int fg_getlines (void);
  5846.    function FGgetlines% ()
  5847.    int function fg_getlines ()
  5848.    function fg_getlines : integer;
  5849.  
  5850. Description
  5851.  
  5852.    The fg_getlines routine returns the number of text rows per video page for
  5853.    the current video mode.
  5854.  
  5855. Parameters
  5856.  
  5857.    none
  5858.  
  5859. Return value
  5860.  
  5861.    The number of text rows per video page for the current video mode.
  5862.  
  5863. Restrictions
  5864.  
  5865.    none
  5866.  
  5867. See also
  5868.  
  5869.    fg_fontsize, fg_setlines
  5870.  
  5871. Examples
  5872.  
  5873.    3-5
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.  
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.  
  5888.  
  5889.  
  5890.  
  5891.  
  5892.  
  5893.  
  5894.  
  5895.  
  5896.  
  5897.                                       93                                       
  5898. -------------------------------------------------------------------------------
  5899. fg_getmap
  5900. -------------------------------------------------------------------------------
  5901.  
  5902. Prototype
  5903.  
  5904.    void fg_getmap (char *map_array, int width, int height);
  5905.    sub FGgetmap (map_array$, width%, height%)
  5906.    subroutine fg_getmap (int1 map_array, int width, int height)
  5907.    procedure fg_getmap (var map_array : byte; width, height : integer);
  5908.  
  5909. Description
  5910.  
  5911.    The fg_getmap routine retrieves an image as a mode-independent bitmap. The
  5912.    graphics cursor position defines the lower left corner of the image to
  5913.    retrieve. Refer to the Fastgraph User's Guide for complete information
  5914.    about mode-independent bitmaps.
  5915.  
  5916. Parameters
  5917.  
  5918.    map_array is the name of the array that will receive the bitmap. Each byte
  5919.    of map_array represents eight pixels. Pixels of the current color set the
  5920.    corresponding bits in map_array. Pixels of other colors make the
  5921.    corresponding map_array bits zero. In BASIC, you must explicitly declare
  5922.    map_array as a fixed-length string variable of length width*height.
  5923.  
  5924.    width is the width in bytes of the bitmap.
  5925.  
  5926.    height is the height in bytes (pixel rows) of the bitmap.
  5927.  
  5928. Return value
  5929.  
  5930.    none
  5931.  
  5932. Restrictions
  5933.  
  5934.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  5935.  
  5936.    This routine has no effect in text video modes.
  5937.  
  5938. See also
  5939.  
  5940.    fg_clipmap, fg_drawmap, fg_getimage
  5941.  
  5942. Examples
  5943.  
  5944.    10-10, 10-11
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.                                       94                                       
  5957. -------------------------------------------------------------------------------
  5958. fg_getmaxx
  5959. -------------------------------------------------------------------------------
  5960.  
  5961. Prototype
  5962.  
  5963.    int fg_getmaxx (void);
  5964.    function FGgetmaxx% ()
  5965.    int function fg_getmaxx ()
  5966.    function fg_getmaxx : integer;
  5967.  
  5968. Description
  5969.  
  5970.    The fg_getmaxx routine returns the maximum x coordinate in screen space
  5971.    when used in a graphics video mode. It returns the maximum column number in
  5972.    character space when used in a text mode. In either case, the maximum x
  5973.    coordinate is one less than the horizontal screen resolution.
  5974.  
  5975. Parameters
  5976.  
  5977.    none
  5978.  
  5979. Return value
  5980.  
  5981.    The maximum x coordinate.
  5982.  
  5983. Restrictions
  5984.  
  5985.    none
  5986.  
  5987. See also
  5988.  
  5989.    fg_getmaxy
  5990.  
  5991. Examples
  5992.  
  5993.    4-1, 4-2
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.                                       95                                       
  6016. -------------------------------------------------------------------------------
  6017. fg_getmaxy
  6018. -------------------------------------------------------------------------------
  6019.  
  6020. Prototype
  6021.  
  6022.    int fg_getmaxy (void);
  6023.    function FGgetmaxy% ()
  6024.    int function fg_getmaxy ()
  6025.    function fg_getmaxy : integer;
  6026.  
  6027. Description
  6028.  
  6029.    The fg_getmaxy routine returns the maximum y coordinate in screen space
  6030.    when used in a graphics video mode. It returns the maximum row number in
  6031.    character space when used in a text mode. In either case, the maximum y
  6032.    coordinate is one less than the vertical screen resolution.
  6033.  
  6034. Parameters
  6035.  
  6036.    none
  6037.  
  6038. Return value
  6039.  
  6040.    The maximum y coordinate.
  6041.  
  6042. Restrictions
  6043.  
  6044.    none
  6045.  
  6046. See also
  6047.  
  6048.    fg_getmaxx
  6049.  
  6050. Examples
  6051.  
  6052.    4-1, 4-2
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.                                       96                                       
  6075. -------------------------------------------------------------------------------
  6076. fg_getmode
  6077. -------------------------------------------------------------------------------
  6078.  
  6079. Prototype
  6080.  
  6081.    int fg_getmode (void);
  6082.    function FGgetmode% ()
  6083.    int function fg_getmode ()
  6084.    function fg_getmode : integer;
  6085.  
  6086. Description
  6087.  
  6088.    The fg_getmode routine returns the current video mode number. It is
  6089.    typically one of the first Fastgraph routines called in a program. The
  6090.    value returned by fg_getmode can be retained to restore the original video
  6091.    mode when a program transfers control back to DOS.
  6092.  
  6093. Parameters
  6094.  
  6095.    none
  6096.  
  6097. Return value
  6098.  
  6099.    The current video mode number, between 0 and 29. Refer to the description
  6100.    of fg_setmode for descriptions of each video mode.
  6101.  
  6102. Restrictions
  6103.  
  6104.    none
  6105.  
  6106. See also
  6107.  
  6108.    fg_setmode
  6109.  
  6110. Examples
  6111.  
  6112.    3-3, 3-4, 3-5, 3-6, 3-7, 3-8, 3-10
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.                                       97                                       
  6134. -------------------------------------------------------------------------------
  6135. fg_getpage
  6136. -------------------------------------------------------------------------------
  6137.  
  6138. Prototype
  6139.  
  6140.    int fg_getpage (void);
  6141.    function FGgetpage% ()
  6142.    int function fg_getpage ()
  6143.    function fg_getpage : integer;
  6144.  
  6145. Description
  6146.  
  6147.    The fg_getpage routine returns the active video page number (as set in the
  6148.    most recent call to fg_setpage).
  6149.  
  6150. Parameters
  6151.  
  6152.    none
  6153.  
  6154. Return value
  6155.  
  6156.    The number of the active video page, between 0 and 63.
  6157.  
  6158. Restrictions
  6159.  
  6160.    none
  6161.  
  6162. See also
  6163.  
  6164.    fg_setpage
  6165.  
  6166. Examples
  6167.  
  6168.    8-9
  6169.  
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.                                       98                                       
  6193. -------------------------------------------------------------------------------
  6194. fg_getpixel
  6195. -------------------------------------------------------------------------------
  6196.  
  6197. Prototype
  6198.  
  6199.    int fg_getpixel (int ix, int iy);
  6200.    function FGgetpixel% (ix%, iy%)
  6201.    int function fg_getpixel (int ix, int iy)
  6202.    function fg_getpixel (ix, iy : integer) : integer;
  6203.  
  6204. Description
  6205.  
  6206.    The fg_getpixel routine returns the color value of a specified pixel.
  6207.  
  6208. Parameters
  6209.  
  6210.    ix is the pixel's screen space x coordinate.
  6211.  
  6212.    iy is the pixel's screen space y coordinate.
  6213.  
  6214. Return value
  6215.  
  6216.    The color value of the pixel, between 0 and one less than the number of
  6217.    colors available in the current video mode. In text modes, fg_getpixel
  6218.    always returns zero.
  6219.  
  6220. Restrictions
  6221.  
  6222.    none
  6223.  
  6224. See also
  6225.  
  6226.    fg_point, fg_pointw
  6227.  
  6228. Examples
  6229.  
  6230.    6-1
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.                                       99                                       
  6252. -------------------------------------------------------------------------------
  6253. fg_getrgb
  6254. -------------------------------------------------------------------------------
  6255.  
  6256. Prototype
  6257.  
  6258.    void fg_getrgb (int number, int *red, int *green, int *blue);
  6259.    sub FGgetrgb (number%, red%, green%, blue%)
  6260.    subroutine fg_getrgb (int number, int red, int green, int blue)
  6261.    procedure fg_getrgb (number : integer; var red, green, blue : integer);
  6262.  
  6263. Description
  6264.  
  6265.    The fg_getrgb routine returns the red, green, and blue color components for
  6266.    a specified video DAC register. Each color component is a value between 0
  6267.    and 63; increasing values produce more intense colors.
  6268.  
  6269. Parameters
  6270.  
  6271.    number is the video DAC register number. It must be between 0 and 15 in 16-
  6272.    color graphics modes, and between 0 and 255 in 256-color modes.
  6273.  
  6274.    red, green, and blue respectively receive the red, green, and blue
  6275.    components of the specified video DAC register.
  6276.  
  6277. Return value
  6278.  
  6279.    none
  6280.  
  6281. Restrictions
  6282.  
  6283.    This routine has no effect in text video modes, or in any graphics video
  6284.    mode numbered 12 or below (because these video modes do not use DAC
  6285.    registers).
  6286.    This routine has no effect in modes 13, 14, and 16 when run on an EGA
  6287.    system.
  6288.  
  6289. See also
  6290.  
  6291.    fg_getdacs, fg_palette, fg_setdacs, fg_setrgb
  6292.  
  6293. Examples
  6294.  
  6295.    5-11
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.                                       100                                      
  6311. -------------------------------------------------------------------------------
  6312. fg_getview
  6313. -------------------------------------------------------------------------------
  6314.  
  6315. Prototype
  6316.  
  6317.    void fg_getview (int *view_minx, int *view_maxx, int *view_miny,
  6318.      int *view_maxy, int *minx, int *maxx, int *miny, int *maxy);
  6319.    sub FGgetview (view_minx%, view_maxx%, view_miny%, view_maxy%, minx%,
  6320.      maxx%, miny%, maxy%)
  6321.    subroutine fg_getview (int view_minx, int view_maxx, int view_miny,
  6322.      int view_maxy, int minx, int maxx, int miny, int maxy)
  6323.    procedure fg_getview (var view_minx, view_maxx, view_miny, view_maxy,
  6324.      minx, maxx, miny, maxy : integer);
  6325.  
  6326. Description
  6327.  
  6328.    The fg_getview routine returns the viewport extremes in viewport units and
  6329.    screen space units.
  6330.  
  6331. Parameters
  6332.  
  6333.    view_minx receives the viewport's left edge in viewport units.
  6334.  
  6335.    view_maxx receives the viewport's right edge in viewport units.
  6336.  
  6337.    view_miny receives the viewport's top edge in viewport units.
  6338.  
  6339.    view_maxy receives the viewport's bottom edge in viewport units.
  6340.  
  6341.    minx receives the viewport's left edge in screen space units.
  6342.  
  6343.    maxx receives the viewport's right edge in screen space units.
  6344.  
  6345.    miny receives the viewport's top edge in screen space units.
  6346.  
  6347.    maxy receives the viewport's bottom edge in screen space units.
  6348.  
  6349. Return value
  6350.  
  6351.    none
  6352.  
  6353. Restrictions
  6354.  
  6355.    none
  6356.  
  6357. See also
  6358.  
  6359.    fg_setview
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.                                       101                                      
  6370. -------------------------------------------------------------------------------
  6371. fg_getvpage
  6372. -------------------------------------------------------------------------------
  6373.  
  6374. Prototype
  6375.  
  6376.    int fg_getvpage (void);
  6377.    function FGgetvpage% ()
  6378.    int function fg_getvpage ()
  6379.    function fg_getvpage : integer;
  6380.  
  6381. Description
  6382.  
  6383.    The fg_getvpage routine returns the visual video page number (as set in the
  6384.    most recent call to fg_setvpage).
  6385.  
  6386. Parameters
  6387.  
  6388.    none
  6389.  
  6390. Return value
  6391.  
  6392.    The number of the visual video page, between 0 and 63.
  6393.  
  6394. Restrictions
  6395.  
  6396.    none
  6397.  
  6398. See also
  6399.  
  6400.    fg_setvpage
  6401.  
  6402. Examples
  6403.  
  6404.    8-9
  6405.  
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.                                       102                                      
  6429. -------------------------------------------------------------------------------
  6430. fg_getworld
  6431. -------------------------------------------------------------------------------
  6432.  
  6433. Prototype
  6434.  
  6435.    void fg_getworld (double *xmin, double *xmax, double *ymin, double *ymax);
  6436.    sub FGgetworld (xmin#, xmax#, ymin#, ymax#)
  6437.    subroutine fg_getworld (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  6438.    procedure fg_getworld (var xmin, xmax, ymin, ymax : real);
  6439.  
  6440. Description
  6441.  
  6442.    The fg_getworld routine returns the current world space limits, as defined
  6443.    in the most recent call to fg_setworld.
  6444.  
  6445. Parameters
  6446.  
  6447.    xmin receives the world space coordinate of the screen's left edge.
  6448.  
  6449.    xmax receives the world space coordinate of the screen's right edge.
  6450.  
  6451.    ymin receives the world space coordinate of the screen's bottom edge.
  6452.  
  6453.    ymax receives the world space coordinate of the screen's top edge.
  6454.  
  6455. Return value
  6456.  
  6457.    none
  6458.  
  6459. Restrictions
  6460.  
  6461.    This routine is not available in Fastgraph/Light.
  6462.  
  6463. See also
  6464.  
  6465.    fg_setworld
  6466.  
  6467. Examples
  6468.  
  6469.    4-4
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.                                       103                                      
  6488. -------------------------------------------------------------------------------
  6489. fg_getxbox
  6490. -------------------------------------------------------------------------------
  6491.  
  6492. Prototype
  6493.  
  6494.    int fg_getxbox (void);
  6495.    function FGgetxbox% ()
  6496.    int function fg_getxbox ()
  6497.    function fg_getxbox : integer;
  6498.  
  6499. Description
  6500.  
  6501.    The fg_getxbox routine returns the width in pixels of the left and right
  6502.    edges of rectangles drawn with the fg_box family of routines. By default,
  6503.    the width is one pixel, but this can be changed by calling fg_boxdepth.
  6504.  
  6505. Parameters
  6506.  
  6507.    none
  6508.  
  6509. Return value
  6510.  
  6511.    The width in pixels of the left and right sides (that is, the vertical
  6512.    edges) of rectangles drawn with the fg_box family of routines.
  6513.  
  6514. Restrictions
  6515.  
  6516.    none
  6517.  
  6518. See also
  6519.  
  6520.    fg_boxdepth, fg_getybox
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.                                       104                                      
  6547. -------------------------------------------------------------------------------
  6548. fg_getxjoy
  6549. -------------------------------------------------------------------------------
  6550.  
  6551. Prototype
  6552.  
  6553.    int fg_getxjoy (int n);
  6554.    function FGgetxjoy% (n%)
  6555.    int function fg_getxjoy (int n)
  6556.    function fg_getxjoy (n : integer) : integer;
  6557.  
  6558. Description
  6559.  
  6560.    The fg_getxjoy routine returns the horizontal coordinate position of the
  6561.    specified joystick. The actual coordinates depend on the processor speed
  6562.    and brand of joystick used.
  6563.  
  6564. Parameters
  6565.  
  6566.    n specifies the joystick number, either 1 or 2.
  6567.  
  6568. Return value
  6569.  
  6570.    If the return value is positive, it represents the current horizontal
  6571.    coordinate position of the requested joystick. If the return value is -1,
  6572.    it means the requested joystick has not been initialized or is not present.
  6573.  
  6574. Restrictions
  6575.  
  6576.    Before using this routine, you must use fg_initjoy to initialize the
  6577.    requested joystick.
  6578.  
  6579. See also
  6580.  
  6581.    fg_button, fg_getyjoy, fg_initjoy, fg_intjoy
  6582.  
  6583. Examples
  6584.  
  6585.    14-12
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.                                       105                                      
  6606. -------------------------------------------------------------------------------
  6607. fg_getxjust
  6608. -------------------------------------------------------------------------------
  6609.  
  6610. Prototype
  6611.  
  6612.    int fg_getxjust (void);
  6613.    function FGgetxjust% ()
  6614.    int function fg_getxjust ()
  6615.    function fg_getxjust : integer;
  6616.  
  6617. Description
  6618.  
  6619.    The fg_getxjust routine returns the horizontal justification setting used
  6620.    by fg_print. The fg_setmode routine sets the default justification to -1,
  6621.    and its value may be changed with fg_justify.
  6622.  
  6623. Parameters
  6624.  
  6625.    none
  6626.  
  6627. Return value
  6628.  
  6629.    -1 = strings are left justified relative to the current graphics x position
  6630.     0 = strings are centered about the current graphics x position
  6631.     1 = strings are right justified relative to the current graphics x
  6632. position
  6633.  
  6634. Restrictions
  6635.  
  6636.    none
  6637.  
  6638. See also
  6639.  
  6640.    fg_justify, fg_getyjust
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.                                       106                                      
  6665. -------------------------------------------------------------------------------
  6666. fg_getxpos
  6667. -------------------------------------------------------------------------------
  6668.  
  6669. Prototype
  6670.  
  6671.    int fg_getxpos (void);
  6672.    function FGgetxpos% ()
  6673.    int function fg_getxpos ()
  6674.    function fg_getxpos : integer;
  6675.  
  6676. Description
  6677.  
  6678.    The fg_getxpos routine returns the screen space x coordinate of the
  6679.    graphics cursor position.
  6680.  
  6681. Parameters
  6682.  
  6683.    none
  6684.  
  6685. Return value
  6686.  
  6687.    The x coordinate of graphics cursor position.
  6688.  
  6689. Restrictions
  6690.  
  6691.    none
  6692.  
  6693. See also
  6694.  
  6695.    fg_getypos
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.                                       107                                      
  6724. -------------------------------------------------------------------------------
  6725. fg_getybox
  6726. -------------------------------------------------------------------------------
  6727.  
  6728. Prototype
  6729.  
  6730.    int fg_getybox (void);
  6731.    function FGgetybox% ()
  6732.    int function fg_getybox ()
  6733.    function fg_getybox : integer;
  6734.  
  6735. Description
  6736.  
  6737.    The fg_getybox routine returns the width in pixels of the top and bottom
  6738.    edges of rectangles drawn with the fg_box family of routines. By default,
  6739.    the width is one pixel, but this can be changed by calling fg_boxdepth.
  6740.  
  6741. Parameters
  6742.  
  6743.    none
  6744.  
  6745. Return value
  6746.  
  6747.    The width in pixels of the top and bottom sides (that is, the horizontal
  6748.    edges) of rectangles drawn with the fg_box family of routines.
  6749.  
  6750. Restrictions
  6751.  
  6752.    none
  6753.  
  6754. See also
  6755.  
  6756.    fg_boxdepth, fg_getxbox
  6757.  
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.                                       108                                      
  6783. -------------------------------------------------------------------------------
  6784. fg_getyjoy
  6785. -------------------------------------------------------------------------------
  6786.  
  6787. Prototype
  6788.  
  6789.    int fg_getyjoy (int n);
  6790.    function FGgetyjoy% (n%)
  6791.    int function fg_getyjoy (int n)
  6792.    function fg_getyjoy (n : integer) : integer;
  6793.  
  6794. Description
  6795.  
  6796.    The fg_getyjoy routine returns the vertical coordinate position of the
  6797.    specified joystick. The actual coordinates depend on the processor speed
  6798.    and brand of joystick used.
  6799.  
  6800. Parameters
  6801.  
  6802.    n specifies the joystick number, either 1 or 2.
  6803.  
  6804. Return value
  6805.  
  6806.    If the return value is positive, it represents the current vertical
  6807.    coordinate position of the requested joystick. If the return value is -1,
  6808.    it means the requested joystick has not been initialized or is not present.
  6809.  
  6810. Restrictions
  6811.  
  6812.    Before using this routine, you must use fg_initjoy to initialize the
  6813.    requested joystick.
  6814.  
  6815. See also
  6816.  
  6817.    fg_button, fg_getxjoy, fg_initjoy, fg_intjoy
  6818.  
  6819. Examples
  6820.  
  6821.    14-12
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.  
  6834.  
  6835.  
  6836.  
  6837.  
  6838.  
  6839.  
  6840.  
  6841.                                       109                                      
  6842. -------------------------------------------------------------------------------
  6843. fg_getyjust
  6844. -------------------------------------------------------------------------------
  6845.  
  6846. Prototype
  6847.  
  6848.    int fg_getyjust (void);
  6849.    function FGgetyjust% ()
  6850.    int function fg_getyjust ()
  6851.    function fg_getyjust : integer;
  6852.  
  6853. Description
  6854.  
  6855.    The fg_getyjust routine returns the vertical justification setting used by
  6856.    fg_print. The fg_setmode routine sets the default justification to -1, and
  6857.    its value may be changed with fg_justify.
  6858.  
  6859. Parameters
  6860.  
  6861.    none
  6862.  
  6863. Return value
  6864.  
  6865.    -1 = strings will have their bottom edge at the current graphics y position
  6866.     0 = strings are centered about the current graphics y position
  6867.     1 = strings will have their top edge at the current graphics y position
  6868.  
  6869. Restrictions
  6870.  
  6871.    none
  6872.  
  6873. See also
  6874.  
  6875.    fg_justify, fg_getxjust
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.  
  6892.  
  6893.  
  6894.  
  6895.  
  6896.  
  6897.  
  6898.  
  6899.  
  6900.                                       110                                      
  6901. -------------------------------------------------------------------------------
  6902. fg_getypos
  6903. -------------------------------------------------------------------------------
  6904.  
  6905. Prototype
  6906.  
  6907.    int fg_getypos (void);
  6908.    function FGgetypos% ()
  6909.    int function fg_getypos ()
  6910.    function fg_getypos : integer;
  6911.  
  6912. Description
  6913.  
  6914.    The fg_getypos routine returns the screen space y coordinate of the
  6915.    graphics cursor position.
  6916.  
  6917. Parameters
  6918.  
  6919.    none
  6920.  
  6921. Return value
  6922.  
  6923.    The y coordinate of graphics cursor position.
  6924.  
  6925. Restrictions
  6926.  
  6927.    none
  6928.  
  6929. See also
  6930.  
  6931.    fg_getxpos
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.                                       111                                      
  6960. -------------------------------------------------------------------------------
  6961. fg_gifhead
  6962. -------------------------------------------------------------------------------
  6963.  
  6964. Prototype
  6965.  
  6966.    int fg_gifhead (char *gif_file, char *gif_header);
  6967.    function FGgifhead% (gif_file$, gif_header$)
  6968.    int function fg_gifhead (char gif_file, int1 gif_header)
  6969.    function fg_gifhead (gif_file : string; var gif_header) : integer;
  6970.  
  6971. Description
  6972.  
  6973.    The fg_gifhead routine reads the global header and first local header from
  6974.    the specified GIF file.
  6975.  
  6976. Parameters
  6977.  
  6978.    gif_file is the name of the GIF file, terminated by a zero byte.
  6979.  
  6980.    gif_header is name of the 23-byte buffer to receive the GIF file's global
  6981.    header and first local header. In BASIC, it must be a fixed-length 23-byte
  6982.    string.
  6983.  
  6984. Return value
  6985.  
  6986.     0 = Success
  6987.    -1 = The specified file does not exist
  6988.    -2 = The specified file is not a GIF file
  6989.  
  6990. Restrictions
  6991.  
  6992.    none
  6993.  
  6994. See also
  6995.  
  6996.    fg_gifmode, fg_gifrange, fg_showgif
  6997.  
  6998. Examples
  6999.  
  7000.    9-5
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.                                       112                                      
  7019. -------------------------------------------------------------------------------
  7020. fg_gifmode
  7021. -------------------------------------------------------------------------------
  7022.  
  7023. Prototype
  7024.  
  7025.    int fg_gifmode (char *gif_header);
  7026.    function FGgifmode% (gif_header$)
  7027.    int function fg_gifmode (int1 gif_header)
  7028.    function fg_gifmode (var gif_header) : integer;
  7029.  
  7030. Description
  7031.  
  7032.    The fg_gifmode routine determines the optimal video mode for the GIF image
  7033.    associated with the specified GIF file header.  The optimal mode is the
  7034.    video mode having the lowest resolution larger than or equal to the image
  7035.    dimensions.
  7036.  
  7037. Parameters
  7038.  
  7039.    gif_header is the name of the buffer containing the 23-byte GIF file
  7040.    header.
  7041.  
  7042. Return value
  7043.  
  7044.    >0 = The optimal video mode for displaying the GIF image
  7045.    -1 = The gif_header buffer does not contain a valid GIF file header
  7046.    -2 = Cannot determine a compatible video mode
  7047.  
  7048. Restrictions
  7049.  
  7050.    none
  7051.  
  7052. See also
  7053.  
  7054.    fg_gifhead, fg_setmode, fg_showgif
  7055.  
  7056. Examples
  7057.  
  7058.    9-5
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.                                       113                                      
  7078. -------------------------------------------------------------------------------
  7079. fg_gifpal
  7080. -------------------------------------------------------------------------------
  7081.  
  7082. Prototype
  7083.  
  7084.    int fg_gifpal (char *gif_file, char *gif_palette);
  7085.    function FGgifpal% (gif_file$, gif_palette$)
  7086.    int function fg_gifpal (char gif_file, int1 gif_palette)
  7087.    function fg_gifpal (gif_file : string; var gif_palette) : integer;
  7088.  
  7089. Description
  7090.  
  7091.    The fg_gifpal routine retrieves the palette of an image stored in a GIF
  7092.    file. The palette values are returned as RGB color components, each between
  7093.    0 and 63. For video modes 18 and above, the palette values are suitable for
  7094.    fg_setdacs. For the native EGA graphics modes (13 to 16), the palette
  7095.    values must be converted into mode-specific values (with fg_maprgb) before
  7096.    being used with fg_palette or fg_palettes.
  7097.  
  7098.    If the GIF file includes a local palette for the first image, fg_gifpal
  7099.    will return the values from the local palette. Otherwise, fg_gifpal will
  7100.    return the values from the GIF file's global palette.
  7101.  
  7102. Parameters
  7103.  
  7104.    gif_file is the name of the GIF file. The file name must be terminated by a
  7105.    zero byte.
  7106.  
  7107.    gif_palette is the name of the array that will receive the GIF palette
  7108.    values. The palette values are returned as RGB color components, each
  7109.    between 0 and 63. The first three bytes of gif_palette will contain the RGB
  7110.    values for color 0, the next three for color 1, and so forth. The size of
  7111.    the gif_palette array must be at least three times the number of colors in
  7112.    the GIF image.
  7113.  
  7114. Return value
  7115.  
  7116.    >0 = the number of colors in the GIF palette
  7117.    -1 = file not found
  7118.    -2 = file is not a GIF file
  7119.  
  7120. Restrictions
  7121.  
  7122.    none
  7123.  
  7124. See also
  7125.  
  7126.    fg_maprgb, fg_palette, fg_palettes, fg_setdacs, fg_showgif
  7127.  
  7128. Examples
  7129.  
  7130.    9-5
  7131.  
  7132.  
  7133.  
  7134.  
  7135.  
  7136.                                       114                                      
  7137. -------------------------------------------------------------------------------
  7138. fg_gifrange
  7139. -------------------------------------------------------------------------------
  7140.  
  7141. Prototype
  7142.  
  7143.    void fg_gifrange (char *gif_header, int *minx, int *maxx, int *miny,
  7144.      int *maxy);
  7145.    sub FGgifrange (gif_header$, minx%, maxx%, miny%, maxy%)
  7146.    subroutine fg_gifrange (int1 gif_header, int minx, int maxx, int miny,
  7147.      int maxy)
  7148.    procedure fg_gifrange (var gif_header; var minx, maxx, miny, maxy :
  7149.      integer);
  7150.  
  7151. Description
  7152.  
  7153.    The fg_gifrange routine returns the image extents for the GIF image
  7154.    associated with the specified GIF file header.
  7155.  
  7156. Parameters
  7157.  
  7158.    gif_header is the name of the buffer containing the 23-byte GIF file
  7159.    header.
  7160.  
  7161.    minx receives the x coordinate of the image's left edge. If gif_header does
  7162.    not contain a valid GIF file header, minx will be set to -1.
  7163.  
  7164.    maxx receives the x coordinate of the image's right edge. If gif_header
  7165.    does not contain a valid GIF file header, maxx will be set to -1.
  7166.  
  7167.    miny receives the y coordinate of the image's top edge. If gif_header does
  7168.    not contain a valid GIF file header, miny will be set to -1.
  7169.  
  7170.    maxy receives the y coordinate of the image's bottom edge. If gif_header
  7171.    does not contain a valid GIF file header, maxy will be set to -1.
  7172.  
  7173. Return value
  7174.  
  7175.    none
  7176.  
  7177. Restrictions
  7178.  
  7179.    none
  7180.  
  7181. See also
  7182.  
  7183.    fg_gifhead, fg_showgif
  7184.  
  7185. Examples
  7186.  
  7187.    9-5
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.                                       115                                      
  7196. -------------------------------------------------------------------------------
  7197. fg_hush
  7198. -------------------------------------------------------------------------------
  7199.  
  7200. Prototype
  7201.  
  7202.    void fg_hush (void);
  7203.    sub FGhush ()
  7204.    subroutine fg_hush ()
  7205.    procedure fg_hush;
  7206.  
  7207. Description
  7208.  
  7209.    The fg_hush routine immediately stops asynchronous sound started with
  7210.    fg_musicb, fg_sounds, or fg_voices. It has no effect if there is no
  7211.    asynchronous sound in progress.
  7212.  
  7213. Parameters
  7214.  
  7215.    none
  7216.  
  7217. Return value
  7218.  
  7219.    none
  7220.  
  7221. Restrictions
  7222.  
  7223.    none
  7224.  
  7225. See also
  7226.  
  7227.    fg_hushnext, fg_musicb, fg_sounds, fg_suspend, fg_voices
  7228.  
  7229. Examples
  7230.  
  7231.    15-7
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.                                       116                                      
  7255. -------------------------------------------------------------------------------
  7256. fg_hushnext
  7257. -------------------------------------------------------------------------------
  7258.  
  7259. Prototype
  7260.  
  7261.    void fg_hushnext (void);
  7262.    sub FGhushnext ()
  7263.    subroutine fg_hushnext ()
  7264.    procedure fg_hushnext;
  7265.  
  7266. Description
  7267.  
  7268.    The fg_hushnext routine stops asynchronous sound started with fg_musicb,
  7269.    fg_sounds, or fg_voices, but not until the current repetition finishes. It
  7270.    has no effect if there is no asynchronous sound in progress.
  7271.  
  7272. Parameters
  7273.  
  7274.    none
  7275.  
  7276. Return value
  7277.  
  7278.    none
  7279.  
  7280. Restrictions
  7281.  
  7282.    This routine has no effect unless the asynchronous sound is continuous.
  7283.  
  7284. See also
  7285.  
  7286.    fg_hush, fg_musicb, fg_sounds, fg_suspend, fg_voices
  7287.  
  7288. Examples
  7289.  
  7290.    15-7
  7291.  
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.                                       117                                      
  7314. -------------------------------------------------------------------------------
  7315. fg_imagebuf
  7316. -------------------------------------------------------------------------------
  7317.  
  7318. Prototype
  7319.  
  7320.    void fg_imagebuf (char [far] *buffer, unsigned size);
  7321.    sub FGimagebuf (buffer$, size%)
  7322.    subroutine fg_imagebuf (int1 [far] buffer, int size)
  7323.    procedure fg_imagebuf (buffer : pointer; size : word);
  7324.  
  7325. Description
  7326.  
  7327.    The fg_imagebuf routine specifies the size and address of the buffer used
  7328.    internally when creating or displaying GIF, PCX, PPR, or SPR files.
  7329.    Fastgraph's default internal buffer size is 4,096 bytes. Image display or
  7330.    creation is typically faster when a larger buffer is used.
  7331.  
  7332. Parameters
  7333.  
  7334.    buffer is the segmented address of the internal buffer. It is passed by far
  7335.    reference in 16-bit modes except when using BASIC.
  7336.  
  7337.    size is the buffer size in bytes. If size is zero, Fastgraph will use its
  7338.    own internal buffers when creating or displaying image files.
  7339.  
  7340. Return value
  7341.  
  7342.    none
  7343.  
  7344. Restrictions
  7345.  
  7346.    In real mode Pascal programs, buffer must be allocated dynamically with the
  7347.    GetMem procedure. This is the only way to pass something by far reference
  7348.    in Pascal.
  7349.  
  7350. See also
  7351.  
  7352.    fg_dispfile, fg_flicplay, fg_makegif, fg_makepcx, fg_makeppr, fg_makespr,
  7353.    fg_showflic, fg_showgif, fg_showpcx, fg_showppr, fg_showspr
  7354.  
  7355. Examples
  7356.  
  7357.    9-12
  7358.  
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.                                       118                                      
  7373. -------------------------------------------------------------------------------
  7374. fg_imagesiz
  7375. -------------------------------------------------------------------------------
  7376.  
  7377. Prototype
  7378.  
  7379.    long fg_imagesiz (int width, int height);
  7380.    function FGimagesiz& (width%, height%)
  7381.    int4 function fg_imagesiz (int width, int height)
  7382.    function fg_imagesiz (width, height : integer) : longint;
  7383.  
  7384. Description
  7385.  
  7386.    The fg_imagesiz routine determines the number of bytes required to store a
  7387.    mode-specific bitmapped image of specified dimensions.
  7388.  
  7389. Parameters
  7390.  
  7391.    width specifies the image width in pixels.
  7392.  
  7393.    height specifies the image height in pixels.
  7394.  
  7395. Return value
  7396.  
  7397.    The number of bytes required to store a mode-specific bitmapped image of
  7398.    the specified size in the current video mode. The return value is always a
  7399.    32-bit quantity.
  7400.  
  7401. Restrictions
  7402.  
  7403.    none
  7404.  
  7405. See also
  7406.  
  7407.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_revimage
  7408.  
  7409. Examples
  7410.  
  7411.    10-12
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.                                       119                                      
  7432. -------------------------------------------------------------------------------
  7433. fg_initems
  7434. -------------------------------------------------------------------------------
  7435.  
  7436. Prototype
  7437.  
  7438.    int fg_initems (void);
  7439.    function FGinitems% ()
  7440.    int function fg_initems ()
  7441.    function fg_initems : integer;
  7442.  
  7443. Description
  7444.  
  7445.    The fg_initems routine initializes expanded memory (EMS) for use with
  7446.    Fastgraph.
  7447.  
  7448. Parameters
  7449.  
  7450.    none
  7451.  
  7452. Return value
  7453.  
  7454.     0 = success
  7455.    -1 = Expanded Memory Manager not installed or not accessible
  7456.  
  7457. Restrictions
  7458.  
  7459.    This routine requires an Expanded Memory Manager (EMM) that conforms to the
  7460.    Lotus/Intel/Microsoft Expanded Memory Specification (LIM-EMS) version 3.2
  7461.    or later. On 80386 and 80486 systems, the EMM386.EXE device driver supplied
  7462.    with DOS 5.0 can be used to treat some or all of extended memory as
  7463.    expanded memory.
  7464.  
  7465.    After calling fg_setmode, the Expanded Memory Manager is disabled and must
  7466.    be re-initialized.
  7467.  
  7468.    This routine is meaningful only in real mode. In protected mode, it will
  7469.    always return -1.
  7470.  
  7471.    The Expanded Memory Manager uses interrupt 67h. As a result, this vector is
  7472.    not available for application programs.
  7473.  
  7474. See also
  7475.  
  7476.    fg_allocems, fg_initxms
  7477.  
  7478. Examples
  7479.  
  7480.    8-10
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.                                       120                                      
  7491. -------------------------------------------------------------------------------
  7492. fg_initjoy
  7493. -------------------------------------------------------------------------------
  7494.  
  7495. Prototype
  7496.  
  7497.    int fg_initjoy (int n);
  7498.    function FGinitjoy% (n%)
  7499.    int function fg_initjoy (int n)
  7500.    function fg_initjoy (n : integer) : integer;
  7501.  
  7502. Description
  7503.  
  7504.    The fg_initjoy routine initializes either joystick and must be called
  7505.    before using fg_getxjoy, fg_getyjoy, or fg_intjoy.
  7506.  
  7507. Parameters
  7508.  
  7509.    n specifies the joystick number, either 1 or 2.
  7510.  
  7511. Return value
  7512.  
  7513.    If the return value is 0, it means the joystick initialization was
  7514.    successful. If it is -1, it means the machine has no game port, or the
  7515.    requested joystick is not connected to the game port.
  7516.  
  7517. Restrictions
  7518.  
  7519.    When you call fg_initjoy, Fastgraph assumes the requested joystick is
  7520.    centered.
  7521.  
  7522. See also
  7523.  
  7524.    fg_button, fg_getxjoy, fg_getyjoy, fg_intjoy
  7525.  
  7526. Examples
  7527.  
  7528.    14-11, 14-12, 14-13
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.                                       121                                      
  7550. -------------------------------------------------------------------------------
  7551. fg_initpm
  7552. -------------------------------------------------------------------------------
  7553.  
  7554. Prototype
  7555.  
  7556.    void fg_initpm (void);
  7557.    sub FGinitpm ()
  7558.    subroutine fg_initpm ()
  7559.    procedure fg_initpm;
  7560.  
  7561. Description
  7562.  
  7563.    The fg_initpm routine initializes Fastgraph's protected mode kernel for
  7564.    specific DOS extenders. It must be called before any other Fastgraph
  7565.    routine in protected mode programs.
  7566.  
  7567. Parameters
  7568.  
  7569.    none
  7570.  
  7571. Return value
  7572.  
  7573.    none
  7574.  
  7575. Restrictions
  7576.  
  7577.    This routine is not meaningful in real mode.
  7578.  
  7579. Examples
  7580.  
  7581.    1-1
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.                                       122                                      
  7609. -------------------------------------------------------------------------------
  7610. fg_initw
  7611. -------------------------------------------------------------------------------
  7612.  
  7613. Prototype
  7614.  
  7615.    void fg_initw (void);
  7616.    sub FGinitw ()
  7617.    subroutine fg_initw ()
  7618.    procedure fg_initw;
  7619.  
  7620. Description
  7621.  
  7622.    The fg_initw routine initializes Fastgraph's internal parameters for world
  7623.    space. This routine must be called once, before any other routine that uses
  7624.    world space coordinates.
  7625.  
  7626. Parameters
  7627.  
  7628.    none
  7629.  
  7630. Return value
  7631.  
  7632.    none
  7633.  
  7634. Restrictions
  7635.  
  7636.    This routine is not available in Fastgraph/Light.
  7637.  
  7638. Examples
  7639.  
  7640.    4-4, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.                                       123                                      
  7668. -------------------------------------------------------------------------------
  7669. fg_initxms
  7670. -------------------------------------------------------------------------------
  7671.  
  7672. Prototype
  7673.  
  7674.    int fg_initxms (void);
  7675.    function FGinitxms% ()
  7676.    int function fg_initxms ()
  7677.    function fg_initxms : integer;
  7678.  
  7679. Description
  7680.  
  7681.    The fg_initxms routine initializes extended memory (XMS) for use with
  7682.    Fastgraph.
  7683.  
  7684. Parameters
  7685.  
  7686.    none
  7687.  
  7688. Return value
  7689.  
  7690.     0 = success
  7691.    -1 = XMS driver not installed or not accessible
  7692.  
  7693. Restrictions
  7694.  
  7695.    This routine requires an external driver that conforms to the
  7696.    Lotus/Intel/Microsoft/AST eXtended Memory Specification (XMS) version 2.0,
  7697.    such as HIMEM.SYS. XMS drivers require an 80286, 80386, or 80486 system.
  7698.  
  7699.    After calling fg_setmode, the XMS driver is disabled and must be re-
  7700.    initialized.
  7701.  
  7702.    This routine is meaningful only in real mode. In protected mode, it will
  7703.    always return -1.
  7704.  
  7705. See also
  7706.  
  7707.    fg_allocxms, fg_initems
  7708.  
  7709. Examples
  7710.  
  7711.    8-10
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.                                       124                                      
  7727. -------------------------------------------------------------------------------
  7728. fg_inside
  7729. -------------------------------------------------------------------------------
  7730.  
  7731. Prototype
  7732.  
  7733.    int fg_inside (int *vertex_array, int n, int ix, int iy);
  7734.    function FGinside% (vertex_array%(), n%, ix%, iy%)
  7735.    int function fg_inside (int vertex_array, int n, int ix, int iy)
  7736.    function fg_inside (var vertex_array : integer; n, ix, iy : integer) :
  7737.      integer;
  7738.  
  7739. Description
  7740.  
  7741.    The fg_inside routine determines if the specified point is inside a convex
  7742.    polygon. The fg_polyoff offsets are applied to the polygon vertices but not
  7743.    to the test point.
  7744.  
  7745. Parameters
  7746.  
  7747.    vertex_array is the name of the array containing the (x,y) coordinate pairs
  7748.    of each vertex. The first array element is the x component of the first
  7749.    vertex, the second element is the y component of the first vertex, the
  7750.    third element is the x component of the second vertex, and so forth.
  7751.  
  7752.    n is the number of vertices in the polygon. Normally, it is one-half the
  7753.    size of vertex_array.
  7754.  
  7755.    ix is the screen space x coordinate of the test point.
  7756.  
  7757.    iy is the screen space y coordinate of the test point.
  7758.  
  7759. Return value
  7760.  
  7761.    0 = the test point is outside the polygon
  7762.    1 = the test point is inside the polygon
  7763.  
  7764. Restrictions
  7765.  
  7766.    If vertex_array does not define a convex polygon, the return value is
  7767.    undefined.
  7768.  
  7769.    In 16-bit modes, the size of vertex_array is limited to 64K bytes.
  7770.  
  7771. See also
  7772.  
  7773.    fg_polyfill, fg_polyline, fg_polyoff
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.                                       125                                      
  7786. -------------------------------------------------------------------------------
  7787. fg_intjoy
  7788. -------------------------------------------------------------------------------
  7789.  
  7790. Prototype
  7791.  
  7792.    void fg_intjoy (int n, char *key, char *aux);
  7793.    sub FGintjoy (n%, key$, aux$)
  7794.    subroutine fg_intjoy (int n, int1 key, int1 aux)
  7795.    procedure fg_intjoy (n : integer; var key, aux : byte);
  7796.  
  7797. Description
  7798.  
  7799.    The fg_intjoy routine returns the standard and extended keyboard codes
  7800.    analogous to the current position and button status of the specified
  7801.    joystick.
  7802.  
  7803. Parameters
  7804.  
  7805.    n specifies the joystick number, either 1 or 2.
  7806.  
  7807.    key receives the joystick's button status. If any button on the requested
  7808.    joystick is pressed, key is set to 13, the standard keyboard code for the
  7809.    Enter key. If no buttons are pressed, key is set to zero. In BASIC, you
  7810.    must explicitly declare key as a fixed-length string variable of length 1.
  7811.  
  7812.    aux receives the joystick's analog position, as listed below. In BASIC, you
  7813.    must explicitly declare aux as a fixed-length string variable of length 1.
  7814.  
  7815.           joystick position   corresponding key   extended key code
  7816.  
  7817.              up and left            Home                  71
  7818.                  up               up arrow                72
  7819.             up and right            PgUp                  73
  7820.                 left             left arrow               75
  7821.               centered           (no action)               0
  7822.                 right            right arrow              77
  7823.             down and left            End                  79
  7824.                 down             down arrow               80
  7825.            down and right           PgDn                  81
  7826.  
  7827.    If the requested joystick has not been initialized, both key and aux will
  7828.    be set to zero.
  7829.  
  7830. Return value
  7831.  
  7832.    none
  7833.  
  7834. Restrictions
  7835.  
  7836.    Before using this routine, you must use fg_initjoy to initialize the
  7837.    requested joystick.
  7838.  
  7839. See also
  7840.  
  7841.    fg_button, fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intkey
  7842.  
  7843.  
  7844.                                       126                                      
  7845. -------------------------------------------------------------------------------
  7846. fg_intjoy (continued)
  7847. -------------------------------------------------------------------------------
  7848.  
  7849. Examples
  7850.  
  7851.    14-13
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.  
  7859.  
  7860.  
  7861.  
  7862.  
  7863.  
  7864.  
  7865.  
  7866.  
  7867.  
  7868.  
  7869.  
  7870.  
  7871.  
  7872.  
  7873.  
  7874.  
  7875.  
  7876.  
  7877.  
  7878.  
  7879.  
  7880.  
  7881.  
  7882.  
  7883.  
  7884.  
  7885.  
  7886.  
  7887.  
  7888.  
  7889.  
  7890.  
  7891.  
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.                                       127                                      
  7904. -------------------------------------------------------------------------------
  7905. fg_intkey
  7906. -------------------------------------------------------------------------------
  7907.  
  7908. Prototype
  7909.  
  7910.    void fg_intkey (unsigned char *key, unsigned char *aux);
  7911.    sub FGintkey (key$, aux$)
  7912.    subroutine fg_intkey (int1 key, int1 aux)
  7913.    procedure fg_intkey (var key, aux : byte);
  7914.  
  7915. Description
  7916.  
  7917.    The fg_intkey routine reads the next entry from the BIOS keyboard buffer
  7918.    (without echo) and returns the keystroke's standard or extended keyboard
  7919.    code (a list of these appears in Chapter 14 of the Fastgraph User's Guide).
  7920.    It is similar to fg_getkey, but it does not wait for a keystroke if the
  7921.    keyboard buffer is empty.
  7922.  
  7923. Parameters
  7924.  
  7925.    key receives the keystroke's standard keyboard code if it represents a
  7926.    standard character. If the keystroke represents an extended character, key
  7927.    will be set to zero. In BASIC, you must explicitly declare key as a fixed-
  7928.    length string variable of length 1.
  7929.  
  7930.    aux receives the keystroke's extended keyboard code if it represents an
  7931.    extended character. If the keystroke represents a standard character, aux
  7932.    will be set to zero. In BASIC, you must explicitly declare aux as a fixed-
  7933.    length string variable of length 1.
  7934.  
  7935.    If the BIOS keyboard buffer is empty, both key and aux will be set to zero.
  7936.  
  7937. Return value
  7938.  
  7939.    none
  7940.  
  7941. Restrictions
  7942.  
  7943.    none
  7944.  
  7945. See also
  7946.  
  7947.    fg_getkey, fg_intjoy, fg_kbtest, fg_waitkey
  7948.  
  7949. Examples
  7950.  
  7951.    14-2, 15-7, 16-1, 16-3
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.                                       128                                      
  7963. -------------------------------------------------------------------------------
  7964. fg_invert
  7965. -------------------------------------------------------------------------------
  7966.  
  7967. Prototype
  7968.  
  7969.    void fg_invert (char *map_array, int width, int height);
  7970.    sub FGinvert (map_array$, width%, height%)
  7971.    subroutine fg_invert (int1 map_array, int width, int height)
  7972.    procedure fg_invert (var map_array; width, height : integer);
  7973.  
  7974. Description
  7975.  
  7976.    The fg_invert routine inverts the orientation of a mode-specific or mode-
  7977.    independent bitmapped image. Fastgraph's bitmapped image display routines
  7978.    expect the image to be stored starting with the bottom row and proceeding
  7979.    toward the top. The fg_invert routine will reverse the row order of such
  7980.    images, so that a "top to bottom" image becomes a "bottom to top" image, or
  7981.    vice versa.
  7982.  
  7983. Parameters
  7984.  
  7985.    map_array is the name of the array containing the bitmap.
  7986.  
  7987.    width is the width in bytes of the bitmap.
  7988.  
  7989.    height is the height in bytes (pixel rows) of the bitmap.
  7990.  
  7991. Return value
  7992.  
  7993.    none
  7994.  
  7995. Restrictions
  7996.  
  7997.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  7998.  
  7999. See also
  8000.  
  8001.    fg_clipmap, fg_clpimage, fg_drawmap, fg_drwimage, fg_flpimage, fg_putimage,
  8002.    fg_revimage
  8003.  
  8004. Examples
  8005.  
  8006.    10-14
  8007.  
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.                                       129                                      
  8022. -------------------------------------------------------------------------------
  8023. fg_justify
  8024. -------------------------------------------------------------------------------
  8025.  
  8026. Prototype
  8027.  
  8028.    void fg_justify (int xjust, int yjust);
  8029.    sub FGjustify (xjust%, yjust%)
  8030.    subroutine fg_justify (int xjust, int yjust)
  8031.    procedure fg_justify (xjust, yjust : integer);
  8032.  
  8033. Description
  8034.  
  8035.    The fg_justify routine defines the horizontal and vertical justification
  8036.    settings for strings displayed with fg_print and fg_printc.
  8037.  
  8038. Parameters
  8039.  
  8040.    xjust defines the horizontal justification. If xjust is -1, strings will be
  8041.    displayed left justified relative to the current graphics x position. If
  8042.    xjust is 0, strings will be centered about the x position. If xjust is 1,
  8043.    strings will be right justified.
  8044.  
  8045.    yjust defines the vertical justification. If yjust is -1, the bottom of the
  8046.    characters will be the current graphics y position. If yjust is 0, strings
  8047.    will be centered about the y position. If yjust is 1, the top of the
  8048.    characters will be at the y position.
  8049.  
  8050. Return value
  8051.  
  8052.    none
  8053.  
  8054. Restrictions
  8055.  
  8056.    The values of xjust and yjust must be -1, 0, or 1.
  8057.  
  8058. See also
  8059.  
  8060.    fg_print, fg_printc
  8061.  
  8062. Examples
  8063.  
  8064.    7-6, 10-17, 10-18, 13-7, 13-9
  8065.  
  8066.  
  8067.  
  8068.  
  8069.  
  8070.  
  8071.  
  8072.  
  8073.  
  8074.  
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.                                       130                                      
  8081. -------------------------------------------------------------------------------
  8082. fg_kbinit
  8083. -------------------------------------------------------------------------------
  8084.  
  8085. Prototype
  8086.  
  8087.    void fg_kbinit (int state);
  8088.    sub FGkbinit (state%)
  8089.    subroutine fg_kbinit (int state)
  8090.    procedure fg_kbinit (state : integer);
  8091.  
  8092. Description
  8093.  
  8094.    The fg_kbinit routine enables or disables Fastgraph's low-level keyboard
  8095.    handler. If the keyboard handler is already in the requested state, nothing
  8096.    happens.
  8097.  
  8098. Parameters
  8099.  
  8100.    state is a flag specifying if the keyboard handler is to be enabled (state
  8101.    = 1) or disabled (state = 0).
  8102.  
  8103. Return value
  8104.  
  8105.    none
  8106.  
  8107. Restrictions
  8108.  
  8109.    When the low-level keyboard handler is enabled, it is not possible to use
  8110.    fg_getkey, fg_intkey, fg_waitkey, or any third party functions that use
  8111.    BIOS or DOS services to access the keyboard.
  8112.  
  8113. See also
  8114.  
  8115.    fg_kblast, fg_kbreset, fg_kbtest
  8116.  
  8117. Examples
  8118.  
  8119.    14-5
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.                                       131                                      
  8140. -------------------------------------------------------------------------------
  8141. fg_kblast
  8142. -------------------------------------------------------------------------------
  8143.  
  8144. Prototype
  8145.  
  8146.    int fg_kblast (void);
  8147.    function FGkblast% ()
  8148.    int function fg_kblast ()
  8149.    function fg_kblast : integer;
  8150.  
  8151. Description
  8152.  
  8153.    The fg_kblast routine returns the scan code for the most recent keypress
  8154.    processed by Fastgraph's low-level keyboard handler.
  8155.  
  8156. Parameters
  8157.  
  8158.    none
  8159.  
  8160. Return value
  8161.  
  8162.    The scan code for the most recent keypress processed by the low-level
  8163.    keyboard handler. If there have been no key presses since calling
  8164.    fg_kbinit, the return value will be zero.
  8165.  
  8166. Restrictions
  8167.  
  8168.    The low-level keyboard handler must be enabled for fg_kblast to work
  8169.    properly.
  8170.  
  8171. See also
  8172.  
  8173.    fg_kbinit, fg_kbreset, fg_kbtest
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.  
  8181.  
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.  
  8189.  
  8190.  
  8191.  
  8192.  
  8193.  
  8194.  
  8195.  
  8196.  
  8197.  
  8198.                                       132                                      
  8199. -------------------------------------------------------------------------------
  8200. fg_kbreset
  8201. -------------------------------------------------------------------------------
  8202.  
  8203. Prototype
  8204.  
  8205.    void fg_kbreset (void);
  8206.    sub FGkbreset ()
  8207.    subroutine fg_kbreset ()
  8208.    procedure fg_kbreset;
  8209.  
  8210. Description
  8211.  
  8212.    The fg_kbreset routine resets the state of Fastgraph's low-level keyboard
  8213.    handler to what it was after being initialized with fg_kbinit(1).
  8214.  
  8215. Parameters
  8216.  
  8217.    none
  8218.  
  8219. Return value
  8220.  
  8221.    none
  8222.  
  8223. Restrictions
  8224.  
  8225.    The low-level keyboard handler must be enabled for fg_kbreset to work
  8226.    properly.
  8227.  
  8228. See also
  8229.  
  8230.    fg_kbinit, fg_kblast, fg_kbtest
  8231.  
  8232.  
  8233.  
  8234.  
  8235.  
  8236.  
  8237.  
  8238.  
  8239.  
  8240.  
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.  
  8257.                                       133                                      
  8258. -------------------------------------------------------------------------------
  8259. fg_kbtest
  8260. -------------------------------------------------------------------------------
  8261.  
  8262. Prototype
  8263.  
  8264.    int fg_kbtest (int scan_code);
  8265.    function FGkbtest% (scan_code%)
  8266.    int function fg_kbtest (int scan_code)
  8267.    function fg_kbtest (scan_code : integer) : integer;
  8268.  
  8269. Description
  8270.  
  8271.    The fg_kbtest routine determines if the key having the specified scan code
  8272.    is now pressed or released.
  8273.  
  8274. Parameters
  8275.  
  8276.    scan_code is the scan code of the key to check, or zero. If scan_code is
  8277.    zero, fg_kbtest reports whether any key is pressed. Refer to the Fastgraph
  8278.    User's Guide for a list of scan codes.
  8279.  
  8280. Return value
  8281.  
  8282.    0 = key is released
  8283.    1 = key is pressed
  8284.  
  8285. Restrictions
  8286.  
  8287.    The low-level keyboard handler must be enabled for fg_kbtest to work
  8288.    properly.
  8289.  
  8290. See also
  8291.  
  8292.    fg_kbinit, fg_kblast, fg_kbreset
  8293.  
  8294. Examples
  8295.  
  8296.    14-5
  8297.  
  8298.  
  8299.  
  8300.  
  8301.  
  8302.  
  8303.  
  8304.  
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.                                       134                                      
  8317. -------------------------------------------------------------------------------
  8318. fg_loadpcx
  8319. -------------------------------------------------------------------------------
  8320.  
  8321. Prototype
  8322.  
  8323.    int fg_loadpcx (char *filename, int flags);
  8324.    function FGloadpcx% (filename$, flags%)
  8325.    int function fg_loadpcx (char filename, int flags)
  8326.    function fg_loadpcx (filename : string; flags : integer) : integer;
  8327.  
  8328. Description
  8329.  
  8330.    The fg_loadpcx routine loads a PCX image into the active virtual buffer.
  8331.  
  8332. Parameters
  8333.  
  8334.    filename is the name of the PCX file. A device and path name may be
  8335.    included as part of the file name. The file name must be terminated by a
  8336.    zero byte.
  8337.  
  8338.    flags is a bit mask that controls how the image is displayed.
  8339.      Bit 0
  8340.         0 = use palette values stored in the PCX file
  8341.         1 = use the current palette settings
  8342.      Bit 1
  8343.         0 = load image at position indicated in PCX header
  8344.         1 = load image at current graphics position
  8345.      Bit 2
  8346.         0 = load image from the specified PCX file
  8347.         1 = load image from the fg_imagebuf buffer
  8348.      Bits 3-15 are reserved for future use and should be zero.
  8349.  
  8350. Return value
  8351.  
  8352.    0 = success
  8353.    1 = file not found
  8354.    2 = file is not a PCX file
  8355.  
  8356. Restrictions
  8357.  
  8358.    none
  8359.  
  8360. See also
  8361.  
  8362.    fg_showpcx, fg_vbopen
  8363.  
  8364. Examples
  8365.  
  8366.    9-2, 10-19, 13-8
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.                                       135                                      
  8376. -------------------------------------------------------------------------------
  8377. fg_locate
  8378. -------------------------------------------------------------------------------
  8379.  
  8380. Prototype
  8381.  
  8382.    void fg_locate (int row, int column);
  8383.    sub FGlocate (row%, column%)
  8384.    subroutine fg_locate (int row, int column)
  8385.    procedure fg_locate (row, column : integer);
  8386.  
  8387. Description
  8388.  
  8389.    The fg_locate routine changes the text cursor position for the active
  8390.    display page. The fg_setmode routine sets each page's text cursor position
  8391.    to (0,0).
  8392.  
  8393. Parameters
  8394.  
  8395.    row is the text cursor's destination row number, between 0 and one less
  8396.    than the number of character rows available.
  8397.  
  8398.    column is text cursor's destination column number, between 0 and one less
  8399.    than the number of character columns available.
  8400.  
  8401. Return value
  8402.  
  8403.    none
  8404.  
  8405. Restrictions
  8406.  
  8407.    The first eight video pages (0 to 7) each have their own text cursor. Each
  8408.    subsequent group of 8 video pages (pages 8 through 15, pages 16 to 23, and
  8409.    so forth) respectively share the same text cursor positions as the first 8
  8410.    pages. For example, changing the text cursor position on video page 9 also
  8411.    changes its position on video page 1.
  8412.  
  8413. See also
  8414.  
  8415.    fg_text, fg_textc, fg_where
  8416.  
  8417. Examples
  8418.  
  8419.    7-1, 7-2, 7-3, 7-4, 7-5, 7-7, 7-8, 7-9, 7-10
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.                                       136                                      
  8435. -------------------------------------------------------------------------------
  8436. fg_makegif
  8437. -------------------------------------------------------------------------------
  8438.  
  8439. Prototype
  8440.  
  8441.    int fg_makegif (int minx, int maxx, int miny, int maxy, char *filename);
  8442.    function FGmakegif% (minx%, maxx%, miny%, maxy%, filename$)
  8443.    int function fg_makegif (int minx, int maxx, int miny, int maxy,
  8444.     char filename)
  8445.    function fg_makegif (minx, maxx, miny, maxy : integer; filename : string) :
  8446.     integer;
  8447.  
  8448. Description
  8449.  
  8450.    The fg_makegif routine creates a GIF file from the specified rectangular
  8451.    region of the active video page or virtual buffer. The region's extremes
  8452.    are expressed in screen space units.
  8453.  
  8454. Parameters
  8455.  
  8456.    minx is the x coordinate of the region's left edge.
  8457.  
  8458.    maxx is the x coordinate of the region's right edge. It must be greater
  8459.    than or equal to minx.
  8460.  
  8461.    miny is the y coordinate of the region's top edge.
  8462.  
  8463.    maxy is the y coordinate of the region's bottom edge. It must be greater
  8464.    than or equal to miny.
  8465.  
  8466.    filename is the name of the GIF file to create. A device and path name may
  8467.    be included as part of the file name. The file name must be terminated by a
  8468.    null character (that is, a zero byte). If an identically named file already
  8469.    exists, it is overwritten.
  8470.  
  8471. Return value
  8472.  
  8473.    0 = success
  8474.    1 = file not created
  8475.  
  8476. Restrictions
  8477.  
  8478.    The fg_makegif routine has no effect in text video modes, or in the CGA and
  8479.    Hercules graphics modes.
  8480.  
  8481.    In the Tandy/PCjr 16-color graphics mode (mode 9) and the native EGA
  8482.    graphics modes (modes 13 through 16), the palette registers are not
  8483.    readable. Hence, fg_makegif will use the default palette settings when used
  8484.    in these video modes on Tandy or EGA systems.
  8485.  
  8486. See also
  8487.  
  8488.    fg_imagebuf, fg_makepcx, fg_makeppr, fg_makespr, fg_showgif
  8489.  
  8490.  
  8491.  
  8492.  
  8493.                                       137                                      
  8494. -------------------------------------------------------------------------------
  8495. fg_makegif (continued)
  8496. -------------------------------------------------------------------------------
  8497.  
  8498. Examples
  8499.  
  8500.    9-4
  8501.  
  8502.  
  8503.  
  8504.  
  8505.  
  8506.  
  8507.  
  8508.  
  8509.  
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.  
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524.  
  8525.  
  8526.  
  8527.  
  8528.  
  8529.  
  8530.  
  8531.  
  8532.  
  8533.  
  8534.  
  8535.  
  8536.  
  8537.  
  8538.  
  8539.  
  8540.  
  8541.  
  8542.  
  8543.  
  8544.  
  8545.  
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.                                       138                                      
  8553. -------------------------------------------------------------------------------
  8554. fg_makepcx
  8555. -------------------------------------------------------------------------------
  8556.  
  8557. Prototype
  8558.  
  8559.    int fg_makepcx (int minx, int maxx, int miny, int maxy, char *filename);
  8560.    function FGmakepcx% (minx%, maxx%, miny%, maxy%, filename$)
  8561.    int function fg_makepcx (int minx, int maxx, int miny, int maxy,
  8562.      char filename)
  8563.    function fg_makepcx (minx, maxx, miny, maxy : integer; filename : string) :
  8564.      integer;
  8565.  
  8566. Description
  8567.  
  8568.    The fg_makepcx routine creates a PCX file from the specified rectangular
  8569.    region of the active video page or virtual buffer. The region's extremes
  8570.    are expressed in screen space units.
  8571.  
  8572. Parameters
  8573.  
  8574.    minx is the x coordinate of the region's left edge. Its value is reduced to
  8575.    a byte boundary if necessary.
  8576.  
  8577.    maxx is the x coordinate of the region's right edge. It must be greater
  8578.    than or equal to minx.
  8579.  
  8580.    miny is the y coordinate of the region's top edge.
  8581.  
  8582.    maxy is the y coordinate of the region's bottom edge. It must be greater
  8583.    than or equal to miny.
  8584.  
  8585.    filename is the name of the PCX file to create. A device and path name may
  8586.    be included as part of the file name. The file name must be terminated by a
  8587.    null character (that is, a zero byte). If an identically named file already
  8588.    exists, it is overwritten.
  8589.  
  8590. Return value
  8591.  
  8592.    0 = success
  8593.    1 = file not created
  8594.  
  8595. Restrictions
  8596.  
  8597.    The fg_makepcx routine has no effect in text video modes or in the Hercules
  8598.    low-resolution graphics mode. Refer to the description of fg_showpcx for
  8599.    information about PCX file compatibility between different video modes.
  8600.  
  8601.    In the Tandy/PCjr 16-color graphics mode (mode 9) and the native EGA
  8602.    graphics modes (modes 13 through 16), the palette registers are not
  8603.    readable. Hence, fg_makepcx will use the default palette settings when used
  8604.    in these video modes on Tandy or EGA systems.
  8605.  
  8606.    When a virtual buffer is active, fg_makepcx always creates 256-color PCX
  8607.    files, regardless of the current video mode. If the video mode is not a
  8608.    256-color video mode, the 256-color PCX file will not have an extended
  8609.    palette.
  8610.  
  8611.                                       139                                      
  8612. -------------------------------------------------------------------------------
  8613. fg_makepcx (continued)
  8614. -------------------------------------------------------------------------------
  8615.  
  8616. See also
  8617.  
  8618.    fg_imagebuf, fg_makegif, fg_makespr, fg_makeppr, fg_showpcx
  8619.  
  8620. Examples
  8621.  
  8622.    9-1
  8623.  
  8624.  
  8625.  
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.  
  8643.  
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.  
  8654.  
  8655.  
  8656.  
  8657.  
  8658.  
  8659.  
  8660.  
  8661.  
  8662.  
  8663.  
  8664.  
  8665.  
  8666.  
  8667.  
  8668.  
  8669.  
  8670.                                       140                                      
  8671. -------------------------------------------------------------------------------
  8672. fg_makeppr
  8673. -------------------------------------------------------------------------------
  8674.  
  8675. Prototype
  8676.  
  8677.    int fg_makeppr (int minx, int maxx, int miny, int maxy, char *filename);
  8678.    function FGmakeppr% (minx%, maxx%, miny%, maxy%, filename$)
  8679.    int function fg_makeppr (int minx, int maxx, int miny, int maxy,
  8680.      char filename)
  8681.    function fg_makeppr (minx, maxx, miny, maxy : integer; filename : string) :
  8682.      integer;
  8683.  
  8684. Description
  8685.  
  8686.    The fg_makeppr routine creates a packed pixel run (PPR) file from the
  8687.    specified rectangular region of the active video page or virtual buffer.
  8688.    The region's extremes are expressed in screen space units.
  8689.  
  8690. Parameters
  8691.  
  8692.    minx is the x coordinate of the region's left edge.
  8693.  
  8694.    maxx is the x coordinate of the region's right edge. It must be greater
  8695.    than or equal to minx.
  8696.  
  8697.    miny is the y coordinate of the region's top edge.
  8698.  
  8699.    maxy is the y coordinate of the region's bottom edge. It must be greater
  8700.    than or equal to miny.
  8701.  
  8702.    filename is the name of the PPR file to create. A device and path name may
  8703.    be included as part of the file name. The file name must be terminated by a
  8704.    null character (that is, a zero byte). If an identically named file already
  8705.    exists, it is overwritten.
  8706.  
  8707. Return value
  8708.  
  8709.    0 = success
  8710.    1 = file not created
  8711.  
  8712. Restrictions
  8713.  
  8714.    This routine has no effect in text video modes.
  8715.  
  8716. See also
  8717.  
  8718.    fg_imagebuf, fg_makegif, fg_makepcx, fg_makespr, fg_showppr
  8719.  
  8720.  
  8721.  
  8722.  
  8723.  
  8724.  
  8725.  
  8726.  
  8727.  
  8728.  
  8729.                                       141                                      
  8730. -------------------------------------------------------------------------------
  8731. fg_makespr
  8732. -------------------------------------------------------------------------------
  8733.  
  8734. Prototype
  8735.  
  8736.    int fg_makespr (int minx, int maxx, int miny, int maxy, char *filename);
  8737.    function FGmakespr% (minx%, maxx%, miny%, maxy%, filename$)
  8738.    int function fg_makespr (int minx, int maxx, int miny, int maxy,
  8739.      char filename)
  8740.    function fg_makespr (minx, maxx, miny, maxy : integer; filename : string) :
  8741.      integer;
  8742.  
  8743. Description
  8744.  
  8745.    The fg_makespr routine creates a standard pixel run (SPR) file from the
  8746.    specified rectangular region of the active video page or virtual buffer.
  8747.  
  8748. Parameters
  8749.  
  8750.    minx is the x coordinate of the region's left edge. Its value is reduced to
  8751.    a byte boundary if necessary.
  8752.  
  8753.    maxx is the x coordinate of the region's right edge. It must be greater
  8754.    than or equal to minx.
  8755.  
  8756.    miny is the y coordinate of the region's top edge.
  8757.  
  8758.    maxy is the y coordinate of the region's bottom edge. It must be greater
  8759.    than or equal to miny.
  8760.  
  8761.    filename is the name of the SPR file to create. A device and path name may
  8762.    be included as part of the file name. The file name must be terminated by a
  8763.    null character (that is, a zero byte). If an identically named file already
  8764.    exists, it is overwritten.
  8765.  
  8766. Return value
  8767.  
  8768.    0 = success
  8769.    1 = file not created
  8770.  
  8771. Restrictions
  8772.  
  8773.    This routine has no effect in text video modes.
  8774.  
  8775. See also
  8776.  
  8777.    fg_imagebuf, fg_makegif, fg_makepcx, fg_makeppr, fg_showspr
  8778.  
  8779. Examples
  8780.  
  8781.    9-9
  8782.  
  8783.  
  8784.  
  8785.  
  8786.  
  8787.  
  8788.                                       142                                      
  8789. -------------------------------------------------------------------------------
  8790. fg_maprgb
  8791. -------------------------------------------------------------------------------
  8792.  
  8793. Prototype
  8794.  
  8795.    int fg_maprgb (int red, int green, int blue);
  8796.    function FGmaprgb% (red%, green%, blue%)
  8797.    int function fg_maprgb (int red, int green, int blue)
  8798.    function fg_maprgb (red, green, blue : integer) : integer;
  8799.  
  8800. Description
  8801.  
  8802.    The fg_maprgb routine maps six-bit red, green, and blue color components
  8803.    into a suitable palette value for the current video mode. You can then pass
  8804.    this value to fg_palette.
  8805.  
  8806. Parameters
  8807.  
  8808.    red, green, and blue respectively specify the color's red, green, and blue
  8809.    components. These values must be between 0 and 63; increasing values
  8810.    produce more intense colors.
  8811.  
  8812. Return value
  8813.  
  8814.    The mode-specific palette value for the specified color components.
  8815.  
  8816. Restrictions
  8817.  
  8818.    This routine is meaningful only in 16-color graphics video modes.
  8819.  
  8820. See also
  8821.  
  8822.    fg_palette, fg_palettes, fg_setrgb
  8823.  
  8824. Examples
  8825.  
  8826.    5-13
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.                                       143                                      
  8848. -------------------------------------------------------------------------------
  8849. fg_measure
  8850. -------------------------------------------------------------------------------
  8851.  
  8852. Prototype
  8853.  
  8854.    int fg_measure (void);
  8855.    function FGmeasure% ()
  8856.    int function fg_measure ()
  8857.    function fg_measure : integer;
  8858.  
  8859. Description
  8860.  
  8861.    The fg_measure routine returns the approximate number of delay units per
  8862.    clock tick. This quantity is proportional to the system's processor speed.
  8863.    Delay units are used by fg_stall.
  8864.  
  8865. Parameters
  8866.  
  8867.    none
  8868.  
  8869. Return value
  8870.  
  8871.    The approximate number of delay units per clock tick. Typical values for
  8872.    some common systems are:
  8873.  
  8874.                                    system    delay units
  8875.                                     type   per clock tick
  8876.                                 Tandy 1000 HX    280
  8877.                                 25 MHz 80386    3,400
  8878.                                 40 MHz 80386    7,100
  8879.  
  8880. Restrictions
  8881.  
  8882.    none
  8883.  
  8884. See also
  8885.  
  8886.    fg_stall
  8887.  
  8888. Examples
  8889.  
  8890.    13-9, 16-3
  8891.  
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.  
  8899.  
  8900.  
  8901.  
  8902.  
  8903.  
  8904.  
  8905.  
  8906.                                       144                                      
  8907. -------------------------------------------------------------------------------
  8908. fg_memavail
  8909. -------------------------------------------------------------------------------
  8910.  
  8911. Prototype
  8912.  
  8913.    long fg_memavail (void);
  8914.    function FGmemavail& ()
  8915.    int4 function fg_memavail ()
  8916.    function fg_memavail : longint;
  8917.  
  8918. Description
  8919.  
  8920.    The fg_memavail routine determines the amount of conventional memory
  8921.    available to DOS.
  8922.  
  8923. Parameters
  8924.  
  8925.    none
  8926.  
  8927. Return value
  8928.  
  8929.    The amount of conventional memory (in bytes) available to DOS. The return
  8930.    value is always a 32-bit quantity.
  8931.  
  8932. Restrictions
  8933.  
  8934.    none
  8935.  
  8936. Examples
  8937.  
  8938.    17-1
  8939.  
  8940.  
  8941.  
  8942.  
  8943.  
  8944.  
  8945.  
  8946.  
  8947.  
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.                                       145                                      
  8966. -------------------------------------------------------------------------------
  8967. fg_memory
  8968. -------------------------------------------------------------------------------
  8969.  
  8970. Prototype
  8971.  
  8972.    int fg_memory (void);
  8973.    function FGmemory% ()
  8974.    int function fg_memory ()
  8975.    function fg_memory : integer;
  8976.  
  8977. Description
  8978.  
  8979.    The fg_memory routine returns the amount of video memory present (in
  8980.    kilobytes) on the user's SVGA card.
  8981.  
  8982. Parameters
  8983.  
  8984.    none
  8985.  
  8986. Return value
  8987.  
  8988.    The amount of video memory in kilobytes. For example, if the user's SVGA
  8989.    card has 1MB of video memory installed, the return value will be 1,024.
  8990.  
  8991. Restrictions
  8992.  
  8993.    This routine is only meaningful after successfully initializing Fastgraph's
  8994.    SVGA kernel with fg_svgainit.
  8995.  
  8996. See also
  8997.  
  8998.    fg_svgainit
  8999.  
  9000. Examples
  9001.  
  9002.    3-9, 8-8
  9003.  
  9004.  
  9005.  
  9006.  
  9007.  
  9008.  
  9009.  
  9010.  
  9011.  
  9012.  
  9013.  
  9014.  
  9015.  
  9016.  
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.                                       146                                      
  9025. -------------------------------------------------------------------------------
  9026. fg_mouse256
  9027. -------------------------------------------------------------------------------
  9028.  
  9029. Prototype
  9030.  
  9031.    void fg_mouse256 (char *masks, int xoffset, int yoffset);
  9032.    sub FGmouse256 (masks$, xoffset%, yoffset%)
  9033.    subroutine fg_mouse256 (int1 masks, int xoffset, int yoffset)
  9034.    procedure fg_mouse256 (var masks; xoffset, yoffset : integer);
  9035.  
  9036. Description
  9037.  
  9038.    The fg_mouse256 routine defines the shape and appearance of a multicolored
  9039.    mouse cursor in XVGA and 256-color SVGA graphics modes. Refer to Chapter 14
  9040.    of the Fastgraph User's Guide for complete information about defining the
  9041.    mouse cursor in graphics modes.
  9042.  
  9043. Parameters
  9044.  
  9045.    masks is a 512-byte array containing the 256-element screen mask followed
  9046.    by the 256-element cursor mask. The mouse driver displays the mouse cursor
  9047.    by logically ANDing video memory with the screen mask, and then XORing that
  9048.    result with the cursor mask. The first item of each mask corresponds to the
  9049.    top row of the mouse cursor. Screen mask values are typically 0 or 255,
  9050.    while cursor mask values are between 0 and 255.
  9051.  
  9052.    xoffset is the x coordinate of the "hot spot" relative to the upper left
  9053.    corner of the mouse cursor.
  9054.  
  9055.    yoffset The y coordinate of the "hot spot" relative to the upper left
  9056.    corner of the mouse cursor.
  9057.  
  9058. Return value
  9059.  
  9060.    none
  9061.  
  9062. Restrictions
  9063.  
  9064.    This routine is meaningful only in XVGA and 256-color SVGA graphics modes.
  9065.  
  9066. See also
  9067.  
  9068.    fg_mouseini, fg_mouseptr, fg_mousevis
  9069.  
  9070.  
  9071.  
  9072.  
  9073.  
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.                                       147                                      
  9084. -------------------------------------------------------------------------------
  9085. fg_mousebut
  9086. -------------------------------------------------------------------------------
  9087.  
  9088. Prototype
  9089.  
  9090.    void fg_mousebut (int number, int *count, int *lastx, int *lasty);
  9091.    sub FGmousebut (number%, count%, lastx%, lasty%)
  9092.    subroutine fg_mousebut (int number, int count, int lastx, int lasty)
  9093.    procedure fg_mousebut (number : integer; var count, lastx, lasty :
  9094.      integer);
  9095.  
  9096. Description
  9097.  
  9098.    The fg_mousebut routine returns information about mouse button press or
  9099.    release counts, as well as the mouse cursor position at the time of the
  9100.    last button press or release.
  9101.  
  9102. Parameters
  9103.  
  9104.    number is the mouse button for which to report information (1 means the
  9105.    left button, 2 the right button, and 3 the middle button). If number is
  9106.    positive, button press counts will be reported. If it is negative, release
  9107.    counts will be reported.
  9108.  
  9109.    count receives the number of press or release counts for the requested
  9110.    button since the last check, or since calling fg_mouseini.
  9111.  
  9112.    lastx receives the x coordinate (in screen space) of the mouse cursor
  9113.    position at the time of the last press or release of the requested button.
  9114.    If count is zero, lastx is also set to zero.
  9115.  
  9116.    lasty receives the y coordinate (in screen space) of the mouse cursor
  9117.    position at the time of the last press or release of the requested button.
  9118.    If count is zero, lasty is also set to zero.
  9119.  
  9120. Return value
  9121.  
  9122.    none
  9123.  
  9124. Restrictions
  9125.  
  9126.    none
  9127.  
  9128. See also
  9129.  
  9130.    fg_mousepos
  9131.  
  9132. Examples
  9133.  
  9134.    14-8
  9135.  
  9136.  
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.                                       148                                      
  9143. -------------------------------------------------------------------------------
  9144. fg_mousecur
  9145. -------------------------------------------------------------------------------
  9146.  
  9147. Prototype
  9148.  
  9149.    void fg_mousecur (int screen_mask, int cursor_mask);
  9150.    sub FGmousecur (screen_mask%, cursor_mask%)
  9151.    subroutine fg_mousecur (int screen_mask, int cursor_mask)
  9152.    procedure fg_mousecur (screen_mask, cursor_mask : integer);
  9153.  
  9154. Description
  9155.  
  9156.    The fg_mousecur routine defines the appearance of the mouse cursor in text
  9157.    video modes. Refer to Chapter 14 of the Fastgraph User's Guide for complete
  9158.    information about defining the mouse cursor in text modes.
  9159.  
  9160. Parameters
  9161.  
  9162.    screen_mask defines the screen mask. When you position the mouse over a
  9163.    specific character cell, the mouse driver logically ANDs the screen mask
  9164.    with the existing contents of that cell.
  9165.  
  9166.    cursor_mask defines the cursor mask. After logically ANDing the screen mask
  9167.    with the contents of a character cell, the mouse driver XORs the cursor
  9168.    mask with the result to produce the mouse cursor.
  9169.  
  9170.    The binary structure of screen_mask and cursor_mask is:
  9171.  
  9172.                                 bits    meaning
  9173.  
  9174.                                 0 to 7  ASCII character value
  9175.                                 8 to 11 foreground color
  9176.                                 12 to 14background color
  9177.                                 15      blink
  9178.  
  9179. Return value
  9180.  
  9181.    none
  9182.  
  9183. Restrictions
  9184.  
  9185.    This routine has no effect in graphics video modes.
  9186.  
  9187. See also
  9188.  
  9189.    fg_mouseini, fg_mouseptr, fg_mousevis
  9190.  
  9191. Examples
  9192.  
  9193.    14-9
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.                                       149                                      
  9202. -------------------------------------------------------------------------------
  9203. fg_mousefin
  9204. -------------------------------------------------------------------------------
  9205.  
  9206. Prototype
  9207.  
  9208.    void fg_mousefin (void);
  9209.    sub FGmousefin ()
  9210.    subroutine fg_mousefin ()
  9211.    procedure fg_mousefin;
  9212.  
  9213. Description
  9214.  
  9215.    The fg_mousefin routine unhooks Fastgraph's XVGA or SVGA mouse handler from
  9216.    the mouse driver. This routine should be used just before reverting to a
  9217.    text mode in programs that have called fg_mouseini in XVGA or SVGA graphics
  9218.    modes.
  9219.  
  9220. Parameters
  9221.  
  9222.    none
  9223.  
  9224. Return value
  9225.  
  9226.    none
  9227.  
  9228. Restrictions
  9229.  
  9230.    This routine is only meaningful in XVGA and SVGA graphics modes.
  9231.  
  9232. See also
  9233.  
  9234.    fg_mouseini
  9235.  
  9236.  
  9237.  
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.  
  9244.  
  9245.  
  9246.  
  9247.  
  9248.  
  9249.  
  9250.  
  9251.  
  9252.  
  9253.  
  9254.  
  9255.  
  9256.  
  9257.  
  9258.  
  9259.  
  9260.                                       150                                      
  9261. -------------------------------------------------------------------------------
  9262. fg_mouseini
  9263. -------------------------------------------------------------------------------
  9264.  
  9265. Prototype
  9266.  
  9267.    int fg_mouseini (void);
  9268.    function FGmouseini% ()
  9269.    int function fg_mouseini ()
  9270.    function fg_mouseini : integer;
  9271.  
  9272. Description
  9273.  
  9274.    The fg_mouseini routine initializes the mouse and must be called before any
  9275.    of Fastgraph's other mouse support routines.
  9276.  
  9277. Parameters
  9278.  
  9279.    none
  9280.  
  9281. Return value
  9282.  
  9283.    If the return value is positive, it indicates the number of buttons on the
  9284.    mouse being used (2 or 3). If the return value is -1, it means the
  9285.    initialization failed because the mouse driver has not been loaded or the
  9286.    mouse is not physically connected.
  9287.  
  9288. Restrictions
  9289.  
  9290.    This routine is not functional when a virtual buffer is active.
  9291.  
  9292. See also
  9293.  
  9294.    fg_mouse256, fg_mousebut, fg_mousecur, fg_mousefin, fg_mouselim,
  9295.    fg_mousemov, fg_mousepos, fg_mouseptr, fg_mousespd, fg_mousevis, fg_resize
  9296.  
  9297. Examples
  9298.  
  9299.    14-6, 14-7, 14-8, 14-9, 14-10
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.  
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.                                       151                                      
  9320. -------------------------------------------------------------------------------
  9321. fg_mouselim
  9322. -------------------------------------------------------------------------------
  9323.  
  9324. Prototype
  9325.  
  9326.    void fg_mouselim (int minx, int maxx, int miny, int maxy);
  9327.    sub FGmouselim (minx%, maxx%, miny%, maxy%)
  9328.    subroutine fg_mouselim (int minx, int maxx, int miny, int maxy)
  9329.    procedure fg_mouselim (minx, maxx, miny, maxy : integer);
  9330.  
  9331. Description
  9332.  
  9333.    The fg_mouselim routine defines the rectangular area in which the mouse
  9334.    cursor may move. In graphics modes, the area is defined in screen space
  9335.    coordinates. In text modes, it is defined in rows and columns.
  9336.  
  9337. Parameters
  9338.  
  9339.    minx is the x coordinate of the area's left edge.
  9340.  
  9341.    maxx is the x coordinate of the area's right edge. It must be greater than
  9342.    or equal to the value of minx.
  9343.  
  9344.    miny is the y coordinate of the area's top edge.
  9345.  
  9346.    maxy is the y coordinate of the area's bottom edge. It must be greater than
  9347.    or equal to the value of miny.
  9348.  
  9349. Return value
  9350.  
  9351.    none
  9352.  
  9353. Restrictions
  9354.  
  9355.    none
  9356.  
  9357. See also
  9358.  
  9359.    fg_mouseini, fg_mousemov
  9360.  
  9361. Examples
  9362.  
  9363.    14-7
  9364.  
  9365.  
  9366.  
  9367.  
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.                                       152                                      
  9379. -------------------------------------------------------------------------------
  9380. fg_mousemov
  9381. -------------------------------------------------------------------------------
  9382.  
  9383. Prototype
  9384.  
  9385.    void fg_mousemov (int ix, int iy);
  9386.    sub FGmousemov (ix%, iy%)
  9387.    subroutine fg_mousemov (int ix, int iy)
  9388.    procedure fg_mousemov (ix, iy : integer);
  9389.  
  9390. Description
  9391.  
  9392.    The fg_mousemov routine moves the mouse cursor to the specified character
  9393.    cell (in text modes) or screen space position (in graphics modes). The
  9394.    mouse cursor is moved whether or not it is currently visible.
  9395.  
  9396. Parameters
  9397.  
  9398.    ix is the x coordinate of the new mouse cursor position.
  9399.  
  9400.    iy is the y coordinate of the new mouse cursor position.
  9401.  
  9402. Return value
  9403.  
  9404.    none
  9405.  
  9406. Restrictions
  9407.  
  9408.    If you attempt to move the mouse cursor outside the area defined by
  9409.    fg_mouselim, fg_mousemov positions the cursor at the nearest point possible
  9410.    within that area.
  9411.  
  9412. See also
  9413.  
  9414.    fg_mouseini, fg_mouselim
  9415.  
  9416. Examples
  9417.  
  9418.    14-7
  9419.  
  9420.  
  9421.  
  9422.  
  9423.  
  9424.  
  9425.  
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.                                       153                                      
  9438. -------------------------------------------------------------------------------
  9439. fg_mousepos
  9440. -------------------------------------------------------------------------------
  9441.  
  9442. Prototype
  9443.  
  9444.    void fg_mousepos (int *ix, int *iy, int *buttons);
  9445.    sub FGmousepos (ix%, iy%, buttons%)
  9446.    subroutine fg_mousepos (int ix, int iy, int buttons)
  9447.    procedure fg_mousepos (var ix, iy, buttons : integer);
  9448.  
  9449. Description
  9450.  
  9451.    The fg_mousepos routine returns the current mouse position and button
  9452.    status. In graphics modes, the position is defined in screen space
  9453.    coordinates. In text modes, it is defined in rows and columns.
  9454.  
  9455. Parameters
  9456.  
  9457.    ix receives the x coordinate of the mouse cursor position.
  9458.  
  9459.    iy receives the y coordinate of the mouse cursor position.
  9460.  
  9461.    buttons receives a bit mask representing the button status, where each bit
  9462.    is set if the corresponding button is pressed. Bit 0 corresponds to the
  9463.    left button, bit 1 to the right button, and bit 2 to the middle button.
  9464.  
  9465. Return value
  9466.  
  9467.    none
  9468.  
  9469. Restrictions
  9470.  
  9471.    none
  9472.  
  9473. See also
  9474.  
  9475.    fg_mousebut, fg_mouseini
  9476.  
  9477. Examples
  9478.  
  9479.    14-8
  9480.  
  9481.  
  9482.  
  9483.  
  9484.  
  9485.  
  9486.  
  9487.  
  9488.  
  9489.  
  9490.  
  9491.  
  9492.  
  9493.  
  9494.  
  9495.  
  9496.                                       154                                      
  9497. -------------------------------------------------------------------------------
  9498. fg_mouseptr
  9499. -------------------------------------------------------------------------------
  9500.  
  9501. Prototype
  9502.  
  9503.    void fg_mouseptr (short *masks, int xoffset, int yoffset);
  9504.    sub FGmouseptr (masks%(), xoffset%, yoffset%)
  9505.    subroutine fg_mouseptr (int2 masks, int xoffset, int yoffset)
  9506.    procedure fg_mouseptr (var masks : integer; xoffset, yoffset :
  9507.      integer);
  9508.  
  9509. Description
  9510.  
  9511.    The fg_mouseptr routine defines the shape and appearance of the mouse
  9512.    cursor in graphics video modes. Refer to Chapter 14 of the Fastgraph User's
  9513.    Guide for complete information about defining the mouse cursor in graphics
  9514.    modes.
  9515.  
  9516. Parameters
  9517.  
  9518.    masks is a 32-element array containing the 16-element screen mask followed
  9519.    by the 16-element cursor mask. The mouse driver displays the mouse cursor
  9520.    by logically ANDing video memory with the screen mask, and then XORing that
  9521.    result with the cursor mask. The first item of each mask corresponds to the
  9522.    top row of the mouse cursor. The following table summarizes the cursor
  9523.    appearance for all possible combinations of mask bits.
  9524.  
  9525.           screen mask bit  cursor mask bit  resulting cursor pixel
  9526.  
  9527.                  0                0                 black
  9528.                  0                1                 white
  9529.                  1                0               unchanged
  9530.                  1                1                inverted
  9531.  
  9532.    xoffset is the x coordinate of the "hot spot" relative to the upper left
  9533.    corner of the mouse cursor.
  9534.  
  9535.    yoffset is the y coordinate of the "hot spot" relative to the upper left
  9536.    corner of the mouse cursor.
  9537.  
  9538. Return value
  9539.  
  9540.    none
  9541.  
  9542. Restrictions
  9543.  
  9544.    This routine has no effect in text video modes.
  9545.  
  9546. See also
  9547.  
  9548.    fg_mouse256, fg_mousecur, fg_mouseini, fg_mousevis
  9549.  
  9550. Examples
  9551.  
  9552.    14-10
  9553.  
  9554.  
  9555.                                       155                                      
  9556. -------------------------------------------------------------------------------
  9557. fg_mousespd
  9558. -------------------------------------------------------------------------------
  9559.  
  9560. Prototype
  9561.  
  9562.    void fg_mousespd (int xmickeys, int ymickeys);
  9563.    sub FGmousespd (xmickeys%, ymickeys%)
  9564.    subroutine fg_mousespd (int xmickeys, int ymickeys)
  9565.    procedure fg_mousespd (xmickeys, ymickeys : integer);
  9566.  
  9567. Description
  9568.  
  9569.    The fg_mousespd routine defines the number of mickey units per eight pixels
  9570.    of cursor movement (depending on the mouse driver, one mickey unit equals
  9571.    1/200 or 1/400 of an inch). This effectively controls the speed at which
  9572.    the mouse cursor moves relative to the movement of the mouse itself.
  9573.  
  9574. Parameters
  9575.  
  9576.    xmickeys is the number of mickey units per eight pixels of horizontal mouse
  9577.    cursor movement (the default is 8).
  9578.  
  9579.    ymickeys is the number of mickey units per eight pixels of vertical mouse
  9580.    cursor movement (the default is 16).
  9581.  
  9582. Return value
  9583.  
  9584.    none
  9585.  
  9586. Restrictions
  9587.  
  9588.    none
  9589.  
  9590. See also
  9591.  
  9592.    fg_mouseini
  9593.  
  9594. Examples
  9595.  
  9596.    14-7
  9597.  
  9598.  
  9599.  
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.                                       156                                      
  9615. -------------------------------------------------------------------------------
  9616. fg_mousevis
  9617. -------------------------------------------------------------------------------
  9618.  
  9619. Prototype
  9620.  
  9621.    void fg_mousevis (int state);
  9622.    sub FGmousevis (state%)
  9623.    subroutine fg_mousevis (int state)
  9624.    procedure fg_mousevis (state : integer);
  9625.  
  9626. Description
  9627.  
  9628.    The fg_mousevis routine makes the mouse cursor visible or invisible. After
  9629.    calling fg_mouseini, the mouse cursor is invisible.
  9630.  
  9631. Parameters
  9632.  
  9633.    state defines the mouse cursor visibility. If state is 0, the mouse cursor
  9634.    is made invisible. If it is 1, the mouse cursor is made visible.
  9635.  
  9636. Return value
  9637.  
  9638.    none
  9639.  
  9640. Restrictions
  9641.  
  9642.    none
  9643.  
  9644. See also
  9645.  
  9646.    fg_mouseini
  9647.  
  9648. Examples
  9649.  
  9650.    14-7, 14-8, 14-9, 14-10
  9651.  
  9652.  
  9653.  
  9654.  
  9655.  
  9656.  
  9657.  
  9658.  
  9659.  
  9660.  
  9661.  
  9662.  
  9663.  
  9664.  
  9665.  
  9666.  
  9667.  
  9668.  
  9669.  
  9670.  
  9671.  
  9672.  
  9673.                                       157                                      
  9674. -------------------------------------------------------------------------------
  9675. fg_move
  9676. -------------------------------------------------------------------------------
  9677.  
  9678. Prototype
  9679.  
  9680.    void fg_move (int ix, int iy);
  9681.    sub FGmove (ix%, iy%)
  9682.    subroutine fg_move (int ix, int iy)
  9683.    procedure fg_move (ix, iy : integer);
  9684.  
  9685. Description
  9686.  
  9687.    The fg_move routine establishes the graphics cursor position at an absolute
  9688.    screen space point. The fg_setmode routine sets the graphics cursor
  9689.    position to (0,0).
  9690.  
  9691. Parameters
  9692.  
  9693.    ix is the screen space x coordinate of the graphics cursor's new position.
  9694.  
  9695.    iy is the screen space y coordinate of the graphics cursor's new position.
  9696.  
  9697. Return value
  9698.  
  9699.    none
  9700.  
  9701. Restrictions
  9702.  
  9703.    This routine has no effect in text video modes.
  9704.  
  9705. See also
  9706.  
  9707.    fg_moverel, fg_moverw, fg_movew
  9708.  
  9709. Examples
  9710.  
  9711.    6-2, 6-3, 6-5, 6-6, 6-10, 6-17, 7-6, 9-9, 9-10, 9-11, 10-1, 12-4, 12-5,
  9712.    12-6, 13-5, 13-6
  9713.  
  9714.  
  9715.  
  9716.  
  9717.  
  9718.  
  9719.  
  9720.  
  9721.  
  9722.  
  9723.  
  9724.  
  9725.  
  9726.  
  9727.  
  9728.  
  9729.  
  9730.  
  9731.  
  9732.                                       158                                      
  9733. -------------------------------------------------------------------------------
  9734. fg_moverel
  9735. -------------------------------------------------------------------------------
  9736.  
  9737. Prototype
  9738.  
  9739.    void fg_moverel (int ix, int iy);
  9740.    sub FGmoverel (ix%, iy%)
  9741.    subroutine fg_moverel (int ix, int iy)
  9742.    procedure fg_moverel (ix, iy : integer);
  9743.  
  9744. Description
  9745.  
  9746.    The fg_moverel routine establishes the graphics cursor position at a screen
  9747.    space point relative to the current position.
  9748.  
  9749. Parameters
  9750.  
  9751.    ix is the screen space x offset of the graphics cursor's new position.
  9752.  
  9753.    iy is the screen space y offset of the graphics cursor's new position.
  9754.  
  9755. Return value
  9756.  
  9757.    none
  9758.  
  9759. Restrictions
  9760.  
  9761.    This routine has no effect in text video modes.
  9762.  
  9763. See also
  9764.  
  9765.    fg_move, fg_moverw, fg_movew
  9766.  
  9767. Examples
  9768.  
  9769.    6-3
  9770.  
  9771.  
  9772.  
  9773.  
  9774.  
  9775.  
  9776.  
  9777.  
  9778.  
  9779.  
  9780.  
  9781.  
  9782.  
  9783.  
  9784.  
  9785.  
  9786.  
  9787.  
  9788.  
  9789.  
  9790.  
  9791.                                       159                                      
  9792. -------------------------------------------------------------------------------
  9793. fg_moverw
  9794. -------------------------------------------------------------------------------
  9795.  
  9796. Prototype
  9797.  
  9798.    void fg_moverw (double x, double y);
  9799.    sub FGmoverw (x#, y#)
  9800.    subroutine fg_moverw (dbl x, dbl y)
  9801.    procedure fg_moverw (x, y : real);
  9802.  
  9803. Description
  9804.  
  9805.    The fg_moverw routine establishes the graphics cursor position at a world
  9806.    space point relative to the current position.
  9807.  
  9808. Parameters
  9809.  
  9810.    x is the world space x offset of the graphics cursor's new position.
  9811.  
  9812.    y is the world space y offset of the graphics cursor's new position.
  9813.  
  9814. Return value
  9815.  
  9816.    none
  9817.  
  9818. Restrictions
  9819.  
  9820.    This routine is not available in Fastgraph/Light and has no effect in text
  9821.    video modes.
  9822.  
  9823. See also
  9824.  
  9825.    fg_move, fg_moverel, fg_movew
  9826.  
  9827.  
  9828.  
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.  
  9839.  
  9840.  
  9841.  
  9842.  
  9843.  
  9844.  
  9845.  
  9846.  
  9847.  
  9848.  
  9849.  
  9850.                                       160                                      
  9851. -------------------------------------------------------------------------------
  9852. fg_movew
  9853. -------------------------------------------------------------------------------
  9854.  
  9855. Prototype
  9856.  
  9857.    void fg_movew (double x, double y);
  9858.    sub FGmovew (x#, y#)
  9859.    subroutine fg_movew (dbl x, dbl y)
  9860.    procedure fg_movew (x, y : real);
  9861.  
  9862. Description
  9863.  
  9864.    The fg_movew routine establishes the graphics cursor position at an
  9865.    absolute world space point. The fg_initw routine sets the graphics cursor
  9866.    position to (0.0,0.0).
  9867.  
  9868. Parameters
  9869.  
  9870.    x is the world space x coordinate of the graphics cursor's new position.
  9871.  
  9872.    y is the world space y coordinate of the graphics cursor's new position.
  9873.  
  9874. Return value
  9875.  
  9876.    none
  9877.  
  9878. Restrictions
  9879.  
  9880.    This routine is not available in Fastgraph/Light and has no effect in text
  9881.    video modes.
  9882.  
  9883. See also
  9884.  
  9885.    fg_move, fg_moverel, fg_moverw
  9886.  
  9887. Examples
  9888.  
  9889.    4-4, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  9890.  
  9891.  
  9892.  
  9893.  
  9894.  
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.  
  9905.  
  9906.  
  9907.  
  9908.  
  9909.                                       161                                      
  9910. -------------------------------------------------------------------------------
  9911. fg_music
  9912. -------------------------------------------------------------------------------
  9913.  
  9914. Prototype
  9915.  
  9916.    void fg_music (char *music_string);
  9917.    sub FGmusic (music_string$)
  9918.    subroutine fg_music (char music_string)
  9919.    procedure fg_music (music_string : string);
  9920.  
  9921. Description
  9922.  
  9923.    The fg_music routine uses the programmable timer to play a sequence of
  9924.    musical tones.
  9925.  
  9926. Parameters
  9927.  
  9928.    music_string is an arbitrary-length sequence of music commands, followed by
  9929.    a dollar-sign ($) terminator. Music commands are summarized in the
  9930.    following table:
  9931.  
  9932. command meaning
  9933.  
  9934. A thru G  Play the specified note in the current octave.
  9935.  
  9936. #       May be appended to a note character (A through G) to make that note
  9937.         sharp.
  9938.  
  9939. .       May be appended to a note character (A through G) or a sharp (#) to
  9940.         extend that note by half its normal length. Multiple dots may be used,
  9941.         and each will again extend the note by half as much as the previous
  9942.         extension.
  9943.  
  9944. Ln      Set the length of subsequent notes and pauses. The value of n is an
  9945.         integer between 1 and 64, where 1 indicates a whole note, 2 a half
  9946.         note, 4 a quarter note, and so forth. If no L command is present, L4
  9947.         is assumed.
  9948.  
  9949. On      Set the octave for subsequent notes. The value of n may be an integer
  9950.         between 0 and 6 to set a specific octave. It also can be a plus (+) or
  9951.         minus (-) character to increment or decrement the current octave
  9952.         number. Octave 4 contains middle C, and if no O command is present, O4
  9953.         is assumed.
  9954.  
  9955. P       Pause (rest) for the duration specified by the most recent L command.
  9956.  
  9957. Sn      Set the amount of silence between notes. The value of n is an integer
  9958.         between 0 and 2. If n is 0, each note plays for the full period set by
  9959.         the L command (music legato). If n is 1, each note plays for 7/8 the
  9960.         period set by the L command (music normal). If n is 2, each note plays
  9961.         for 3/4 the period set by the L command (music staccato). If no S
  9962.         command is present, S1 is assumed.
  9963.  
  9964. Tn      Set the tempo of the music (the number of quarter notes per minute).
  9965.         The value of n is an integer between 32 and 255. If no T command is
  9966.         present, T120 is assumed.
  9967.  
  9968.                                       162                                      
  9969. -------------------------------------------------------------------------------
  9970. fg_music (continued)
  9971. -------------------------------------------------------------------------------
  9972.  
  9973. Parameters (continued)
  9974.  
  9975.    The fg_music routine ignores any other characters in music_string. It also
  9976.    ignores command values outside the allowable range, such as T20 or O8.
  9977.  
  9978. Return value
  9979.  
  9980.    none
  9981.  
  9982. Restrictions
  9983.  
  9984.    This routine has no effect if there is asynchronous sound in progress.
  9985.  
  9986. See also
  9987.  
  9988.    fg_musicb
  9989.  
  9990. Examples
  9991.  
  9992.    15-3
  9993.  
  9994.  
  9995.  
  9996.  
  9997.  
  9998.  
  9999.  
  10000.  
  10001.  
  10002.  
  10003.  
  10004.  
  10005.  
  10006.  
  10007.  
  10008.  
  10009.  
  10010.  
  10011.  
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.  
  10019.  
  10020.  
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.                                       163                                      
  10028. -------------------------------------------------------------------------------
  10029. fg_musicb
  10030. -------------------------------------------------------------------------------
  10031.  
  10032. Prototype
  10033.  
  10034.    void fg_musicb (char *music_string, int ntimes);
  10035.    sub FGmusicb (music_string$, ntimes%)
  10036.    subroutine fg_musicb (char music_string, int ntimes)
  10037.    procedure fg_musicb (music_string : string; ntimes : integer);
  10038.  
  10039. Description
  10040.  
  10041.    The fg_musicb routine uses the programmable timer to play a sequence of
  10042.    musical tones, concurrent with other activity.
  10043.  
  10044. Parameters
  10045.  
  10046.    music_string is an arbitrary-length sequence of music commands, followed by
  10047.    a dollar-sign ($) terminator. Refer to the description of fg_music for a
  10048.    complete list of music commands.
  10049.  
  10050.    ntimes specifies the number of times to cycle through the music commands in
  10051.    music_string. If ntimes is negative, the music will play repetitively until
  10052.    you stop it with fg_hush or fg_hushnext.
  10053.  
  10054. Return value
  10055.  
  10056.    none
  10057.  
  10058. Restrictions
  10059.  
  10060.    This routine has no effect if there is asynchronous sound already in
  10061.    progress.
  10062.  
  10063.    To allow for fast-tempo music, Fastgraph temporarily quadruples the clock
  10064.    tick interrupt rate from 18.2 to 72.8 ticks per second while producing
  10065.    asynchronous sound. Because many disk controllers rely on the 18.2 tick per
  10066.    second clock rate to synchronize disk accesses, your programs should not
  10067.    perform any disk operations when asynchronous sound is in progress.
  10068.  
  10069. See also
  10070.  
  10071.    fg_hush, fg_hushnext, fg_music, fg_playing, fg_resume, fg_suspend
  10072.  
  10073. Examples
  10074.  
  10075.    15-6, 15-7, 15-8
  10076.  
  10077.  
  10078.  
  10079.  
  10080.  
  10081.  
  10082.  
  10083.  
  10084.  
  10085.  
  10086.                                       164                                      
  10087. -------------------------------------------------------------------------------
  10088. fg_numlock
  10089. -------------------------------------------------------------------------------
  10090.  
  10091. Prototype
  10092.  
  10093.    int fg_numlock (void);
  10094.    function FGnumlock% ()
  10095.    int function fg_numlock ()
  10096.    function fg_numlock : integer;
  10097.  
  10098. Description
  10099.  
  10100.    The fg_numlock routine determines the state of the NumLock key.
  10101.  
  10102. Parameters
  10103.  
  10104.    none
  10105.  
  10106. Return value
  10107.  
  10108.    If the return value is 0, it means the NumLock key is off. If it is 1, it
  10109.    means the NumLock key is on.
  10110.  
  10111. Restrictions
  10112.  
  10113.    none
  10114.  
  10115. See also
  10116.  
  10117.    fg_capslock, fg_scrlock, fg_setcaps, fg_setnum
  10118.  
  10119. Examples
  10120.  
  10121.    14-4
  10122.  
  10123.  
  10124.  
  10125.  
  10126.  
  10127.  
  10128.  
  10129.  
  10130.  
  10131.  
  10132.  
  10133.  
  10134.  
  10135.  
  10136.  
  10137.  
  10138.  
  10139.  
  10140.  
  10141.  
  10142.  
  10143.  
  10144.  
  10145.                                       165                                      
  10146. -------------------------------------------------------------------------------
  10147. fg_pack
  10148. -------------------------------------------------------------------------------
  10149.  
  10150. Prototype
  10151.  
  10152.    void fg_pack (char *source, char *dest, int width, int height);
  10153.    sub FGpack (source$, dest$, width%, height%)
  10154.    subroutine fg_pack (int1 source, int1 dest, int width, int height)
  10155.    procedure fg_pack (var source, dest; width, height : integer);
  10156.  
  10157. Description
  10158.  
  10159.    The fg_pack routine converts a bitmap in the "one pixel per byte" format
  10160.    used in 256-color graphics modes and virtual buffers to the mode-specific
  10161.    bitmap format for the current video mode. Refer to the Fastgraph User's
  10162.    Guide for complete information about mode-specific bitmaps.
  10163.  
  10164.    In 256-color graphics modes, or when a virtual buffer is active, fg_pack
  10165.    merely copies the source array to the dest array.
  10166.  
  10167. Parameters
  10168.  
  10169.    source is the name of the array containing the "one pixel per byte" bitmap
  10170.    to convert.
  10171.  
  10172.    dest is the name of the array that will receive the converted bitmap.
  10173.  
  10174.    width is the width of the source bitmap in pixels.
  10175.  
  10176.    height is the height of the source bitmap in pixels.
  10177.  
  10178. Return value
  10179.  
  10180.    none
  10181.  
  10182. Restrictions
  10183.  
  10184.    In 16-bit modes, the size of the source and dest arrays are limited to 64K
  10185.    bytes.
  10186.  
  10187.    This routine has no effect in text video modes.
  10188.  
  10189. See also
  10190.  
  10191.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_putimage,
  10192.    fg_revimage, fg_scale, fg_shear, fg_unpack
  10193.  
  10194. Examples
  10195.  
  10196.    10-15
  10197.  
  10198.  
  10199.  
  10200.  
  10201.  
  10202.  
  10203.  
  10204.                                       166                                      
  10205. -------------------------------------------------------------------------------
  10206. fg_pagesize
  10207. -------------------------------------------------------------------------------
  10208.  
  10209. Prototype
  10210.  
  10211.    long fg_pagesize (void);
  10212.    function FGpagesize& ()
  10213.    int4 function fg_pagesize ()
  10214.    function fg_pagesize : longint;
  10215.  
  10216. Description
  10217.  
  10218.    The fg_pagesize routine returns the video page size in bytes for the
  10219.    current video mode.
  10220.  
  10221. Parameters
  10222.  
  10223.    none
  10224.  
  10225. Return value
  10226.  
  10227.    The video page size in bytes. The return value is always a 32-bit quantity.
  10228.  
  10229. Restrictions
  10230.  
  10231.    This routine always returns the video page size, even when a virtual buffer
  10232.    is active.
  10233.  
  10234.  
  10235.  
  10236.  
  10237.  
  10238.  
  10239.  
  10240.  
  10241.  
  10242.  
  10243.  
  10244.  
  10245.  
  10246.  
  10247.  
  10248.  
  10249.  
  10250.  
  10251.  
  10252.  
  10253.  
  10254.  
  10255.  
  10256.  
  10257.  
  10258.  
  10259.  
  10260.  
  10261.  
  10262.  
  10263.                                       167                                      
  10264. -------------------------------------------------------------------------------
  10265. fg_paint
  10266. -------------------------------------------------------------------------------
  10267.  
  10268. Prototype
  10269.  
  10270.    void fg_paint (int ix, int iy);
  10271.    sub FGpaint (ix%, iy%)
  10272.    subroutine fg_paint (int ix, int iy)
  10273.    procedure fg_paint (ix, iy : integer);
  10274.  
  10275. Description
  10276.  
  10277.    The fg_paint routine fills an arbitrary closed region with the current
  10278.    color value. The region is defined by specifying a screen space point
  10279.    within its interior.
  10280.  
  10281. Parameters
  10282.  
  10283.    ix is the screen space x coordinate of the interior point.
  10284.  
  10285.    iy is the screen space y coordinate of the interior point.
  10286.  
  10287. Return value
  10288.  
  10289.    none
  10290.  
  10291. Restrictions
  10292.  
  10293.    This routine has no effect in text video modes. The screen edges are not
  10294.    considered region boundaries, and filling an open region will cause
  10295.    fg_paint to behave unpredictably.
  10296.  
  10297. See also
  10298.  
  10299.    fg_flood, fg_paintw
  10300.  
  10301. Examples
  10302.  
  10303.    6-17, 13-5
  10304.  
  10305.  
  10306.  
  10307.  
  10308.  
  10309.  
  10310.  
  10311.  
  10312.  
  10313.  
  10314.  
  10315.  
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.                                       168                                      
  10323. -------------------------------------------------------------------------------
  10324. fg_paintw
  10325. -------------------------------------------------------------------------------
  10326.  
  10327. Prototype
  10328.  
  10329.    void fg_paintw (double x, double y);
  10330.    sub FGpaintw (x#, y#)
  10331.    subroutine fg_paintw (dbl x, dbl y)
  10332.    procedure fg_paintw (x, y : real);
  10333.  
  10334. Description
  10335.  
  10336.    The fg_paintw routine fills an arbitrary closed region with the current
  10337.    color value. The region is defined by specifying a world space point within
  10338.    its interior.
  10339.  
  10340. Parameters
  10341.  
  10342.    x is the world space x coordinate of the interior point.
  10343.  
  10344.    y is the world space y coordinate of the interior point.
  10345.  
  10346. Return value
  10347.  
  10348.    none
  10349.  
  10350. Restrictions
  10351.  
  10352.    This routine is not available in Fastgraph/Light and has no effect in text
  10353.    video modes. The screen edges are not considered region boundaries, and
  10354.    filling an open region will cause fg_paintw to behave unpredictably.
  10355.  
  10356. See also
  10357.  
  10358.    fg_floodw, fg_paint
  10359.  
  10360.  
  10361.  
  10362.  
  10363.  
  10364.  
  10365.  
  10366.  
  10367.  
  10368.  
  10369.  
  10370.  
  10371.  
  10372.  
  10373.  
  10374.  
  10375.  
  10376.  
  10377.  
  10378.  
  10379.  
  10380.  
  10381.                                       169                                      
  10382. -------------------------------------------------------------------------------
  10383. fg_palette
  10384. -------------------------------------------------------------------------------
  10385.  
  10386. Prototype
  10387.  
  10388.    void fg_palette (int number, int color);
  10389.    sub FGpalette (number%, color%)
  10390.    subroutine fg_palette (int number, int color)
  10391.    procedure fg_palette (number, color : integer);
  10392.  
  10393. Description
  10394.  
  10395.    The fg_palette routine has different functions depending on the current
  10396.    graphics video mode. For CGA four-color modes (modes 4 and 5), it
  10397.    establishes the current palette and defines the background color for that
  10398.    palette. In the CGA two-color mode (mode 6), it defines the foreground
  10399.    color. For 16-color graphics modes (modes 9, 13, 14, 15, 16, 17, 18, 28,
  10400.    and 29), it defines the value of a palette register. For 256-color graphics
  10401.    modes (modes 19 through 27), it defines the value of a video DAC register.
  10402.  
  10403. Parameters
  10404.  
  10405.    The meanings of the number and color parameters depend on the current video
  10406.    mode. The following table summarizes the parameter meanings and legal
  10407.    values for each video mode.
  10408.  
  10409.    mode    number parameter (range)          color parameter (range)
  10410.  
  10411.    4-5     CGA palette number (0 to 5)       background color (0 to 15)
  10412.    6       ignored                           foreground color (0 to 15)
  10413.    9       palette register (0 to 15)        palette value (0 to 15)
  10414.    13-14   palette register (0 to 15)        palette value (0 to 23)
  10415.    15      palette register (0, 1, 4, or 5)  palette value (0, 8, or 24)
  10416.    16      palette register (0 to 15)        palette value (0 to 63)
  10417.    17      palette register (0 or 1)         video DAC register (0 to 15)
  10418.    18      palette register (0 to 15)        video DAC register (0 to 15)
  10419.    19-27   video DAC register (0 to 255)     DAC value (0 to 63)
  10420.    28-29   palette register (0 to 15)        video DAC register (0 to 15)
  10421.  
  10422.    Refer to Chapter 5 of the Fastgraph User's Guide for more specific
  10423.    information about the number and color parameters.
  10424.  
  10425. Return value
  10426.  
  10427.    none
  10428.  
  10429. Restrictions
  10430.  
  10431.    This routine has no effect in text video modes or Hercules graphics modes.
  10432.    Changing the foreground color (in mode 6) always works on true CGA
  10433.    adapters, but there are very few EGA and VGA adapters that correctly
  10434.    implement this capability in their mode 6 emulation.
  10435.  
  10436. See also
  10437.  
  10438.    fg_defcolor, fg_maprgb, fg_palettes, fg_setcolor, fg_setdacs, fg_setrgb
  10439.  
  10440.                                       170                                      
  10441. -------------------------------------------------------------------------------
  10442. fg_palette (continued)
  10443. -------------------------------------------------------------------------------
  10444.  
  10445. Examples
  10446.  
  10447.    5-1, 5-2, 5-3, 5-6, 5-7, 5-8, 5-9, 5-13, 5-16, 9-11
  10448.  
  10449.  
  10450.  
  10451.  
  10452.  
  10453.  
  10454.  
  10455.  
  10456.  
  10457.  
  10458.  
  10459.  
  10460.  
  10461.  
  10462.  
  10463.  
  10464.  
  10465.  
  10466.  
  10467.  
  10468.  
  10469.  
  10470.  
  10471.  
  10472.  
  10473.  
  10474.  
  10475.  
  10476.  
  10477.  
  10478.  
  10479.  
  10480.  
  10481.  
  10482.  
  10483.  
  10484.  
  10485.  
  10486.  
  10487.  
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.  
  10499.                                       171                                      
  10500. -------------------------------------------------------------------------------
  10501. fg_palettes
  10502. -------------------------------------------------------------------------------
  10503.  
  10504. Prototype
  10505.  
  10506.    void fg_palettes (int *color_array);
  10507.    sub FGpalettes (color_array%())
  10508.    subroutine fg_palettes (int color_array)
  10509.    procedure fg_palettes (var color_array : integer);
  10510.  
  10511. Description
  10512.  
  10513.    The fg_palettes routine defines all 16 palette registers (in 16-color
  10514.    graphics modes), or the first 16 video DAC registers (in 256-color graphics
  10515.    modes).
  10516.  
  10517. Parameters
  10518.  
  10519.    color_array is a 16-element array that contains the values to assign to the
  10520.    palette registers or video DAC registers.
  10521.  
  10522. Return value
  10523.  
  10524.    none
  10525.  
  10526. Restrictions
  10527.  
  10528.    This routine has no effect in text video modes, CGA graphics modes, or
  10529.    Hercules graphics modes.
  10530.  
  10531. See also
  10532.  
  10533.    fg_maprgb, fg_palette, fg_setdacs
  10534.  
  10535. Examples
  10536.  
  10537.    5-14
  10538.  
  10539.  
  10540.  
  10541.  
  10542.  
  10543.  
  10544.  
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.  
  10557.  
  10558.                                       172                                      
  10559. -------------------------------------------------------------------------------
  10560. fg_pan
  10561. -------------------------------------------------------------------------------
  10562.  
  10563. Prototype
  10564.  
  10565.    void fg_pan (int ix, int iy);
  10566.    sub FGpan (ix%, iy%)
  10567.    subroutine fg_pan (int ix, int iy)
  10568.    procedure fg_pan (ix, iy : integer);
  10569.  
  10570. Description
  10571.  
  10572.    The fg_pan routine changes the screen origin (the upper left corner of the
  10573.    screen) to the specified screen space coordinates.
  10574.  
  10575. Parameters
  10576.  
  10577.    ix is the new screen space x coordinate for the screen origin.
  10578.  
  10579.    iy is the new screen space y coordinate for the screen origin.
  10580.  
  10581. Return value
  10582.  
  10583.    none
  10584.  
  10585. Restrictions
  10586.  
  10587.    This routine has no effect in text video modes. Because of hardware
  10588.    limitations, only certain coordinate positions can be used as the screen
  10589.    origin. Fastgraph compensates for these restrictions by reducing ix and iy
  10590.    to acceptable values in the pertinent video modes, as shown here:
  10591.  
  10592.                                 x will be reduced   y will be reduced
  10593.                video mode       to a multiple of:   to a multiple of:
  10594.  
  10595.                    4-5                  8                   2
  10596.                     6                  16                   2
  10597.                     9                   4                   4
  10598.                    11                   8                   4
  10599.                    12                   4                2 or 3
  10600.  
  10601.    The fg_pan routine always applies to video memory, even when a virtual
  10602.    buffer is active.
  10603.  
  10604. See also
  10605.  
  10606.    fg_panw
  10607.  
  10608. Examples
  10609.  
  10610.    13-6, 13-7, 13-9
  10611.  
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.                                       173                                      
  10618. -------------------------------------------------------------------------------
  10619. fg_panw
  10620. -------------------------------------------------------------------------------
  10621.  
  10622. Prototype
  10623.  
  10624.    void fg_panw (double x, double y);
  10625.    sub FGpanw (x#, y#)
  10626.    subroutine fg_panw (dbl x, dbl y)
  10627.    procedure fg_panw (x, y : real);
  10628.  
  10629. Description
  10630.  
  10631.    The fg_panw routine changes the screen origin (the upper left corner of the
  10632.    screen) to the specified world space coordinates.
  10633.  
  10634. Parameters
  10635.  
  10636.    x is the new world space x coordinate for the screen origin.
  10637.  
  10638.    y is the new world space y coordinate for the screen origin.
  10639.  
  10640. Return value
  10641.  
  10642.    none
  10643.  
  10644. Restrictions
  10645.  
  10646.    This routine is not available in Fastgraph/Light and has no effect in text
  10647.    video modes.
  10648.  
  10649.    To compensate for the hardware limitations that restrict the screen origin
  10650.    coordinates (see the description of fg_pan), Fastgraph reduces x and y to
  10651.    an acceptable screen space equivalent.
  10652.  
  10653.    The fg_panw routine always applies to video memory, even when a virtual
  10654.    buffer is active.
  10655.  
  10656. See also
  10657.  
  10658.    fg_pan
  10659.  
  10660.  
  10661.  
  10662.  
  10663.  
  10664.  
  10665.  
  10666.  
  10667.  
  10668.  
  10669.  
  10670.  
  10671.  
  10672.  
  10673.  
  10674.  
  10675.  
  10676.                                       174                                      
  10677. -------------------------------------------------------------------------------
  10678. fg_pattern
  10679. -------------------------------------------------------------------------------
  10680.  
  10681. Prototype
  10682.  
  10683.    void fg_pattern (int index, int display_pattern);
  10684.    sub FGpattern (index%, display_pattern%)
  10685.    subroutine fg_pattern (int index, int display_pattern)
  10686.    procedure fg_pattern (index, display_pattern : integer);
  10687.  
  10688. Description
  10689.  
  10690.    The fg_pattern routine defines one of Fastgraph's 256 display patterns used
  10691.    with fg_dispfile, fg_display, fg_displayp, fg_showppr, or fg_showspr. When
  10692.    using these routines to display a pixel run map, Fastgraph will use the
  10693.    pattern associated with that color index instead of displaying the color
  10694.    itself. Refer to the Fastgraph User's Guide for more information about
  10695.    display patterns and their default values for each graphics video mode.
  10696.  
  10697. Parameters
  10698.  
  10699.    index is the number of the display pattern to define, between 0 and 255.
  10700.  
  10701.    display_pattern represents a 16-bit display pattern. Its structure depends
  10702.    on the video mode, as summarized here:
  10703.  
  10704.      video modes         pattern structure
  10705.  
  10706.      4, 5, 12            shift count (8 bits), four pixels (2 bits each)
  10707.      6, 11               shift count (8 bits), eight pixels (1 bit each)
  10708.      9                   shift count (8 bits), two pixels (4 bits each)
  10709.      13-16, 18, 28, 29   unused (8 bits), two pixels (4 bits each)
  10710.      17                  unused (14 bits), two pixels (1 bit each)
  10711.  
  10712.    The shift count defines the number of bits that display_pattern is rotated
  10713.    left when applied to odd-numbered pixel rows, while the pixels are the
  10714.    actual color values replicated through the pixel run. For the EGA and VGA
  10715.    graphics modes, an implied one pixel shift count is used.
  10716.  
  10717. Return value
  10718.  
  10719.    none
  10720.  
  10721. Restrictions
  10722.  
  10723.    This routine has no effect in text video modes or in 256-color graphics
  10724.    modes.
  10725.  
  10726. See also
  10727.  
  10728.    fg_dispfile, fg_display, fg_displayp, fg_showppr, fg_showspr
  10729.  
  10730. Examples
  10731.  
  10732.    9-11
  10733.  
  10734.  
  10735.                                       175                                      
  10736. -------------------------------------------------------------------------------
  10737. fg_pcxhead
  10738. -------------------------------------------------------------------------------
  10739.  
  10740. Prototype
  10741.  
  10742.    int fg_pcxhead (char *pcx_file, char *pcx_header);
  10743.    function FGpcxhead% (pcx_file$, pcx_header$)
  10744.    int function fg_pcxhead (char pcx_file, int1 pcx_header)
  10745.    function fg_pcxhead (pcx_file : string; var pcx_header : byte) : integer;
  10746.  
  10747. Description
  10748.  
  10749.    The fg_pcxhead routine reads a PCX file header into a 128-byte buffer.
  10750.  
  10751. Parameters
  10752.  
  10753.    pcx_file is the name of the PCX file. It may include a path specification
  10754.    and must be terminated by a zero byte.
  10755.  
  10756.    pcx_header is the name of the 128-byte buffer to receive the PCX file
  10757.    header. In BASIC, it must be a fixed-length 128-byte string.
  10758.  
  10759. Return value
  10760.  
  10761.     0 = Success
  10762.    -1 = The specified file does not exist
  10763.    -2 = The specified file is not a PCX file
  10764.  
  10765. Restrictions
  10766.  
  10767.    none
  10768.  
  10769. See also
  10770.  
  10771.    fg_loadpcx, fg_pcxmode, fg_pcxpal, fg_pcxrange, fg_showpcx
  10772.  
  10773. Examples
  10774.  
  10775.    9-2
  10776.  
  10777.  
  10778.  
  10779.  
  10780.  
  10781.  
  10782.  
  10783.  
  10784.  
  10785.  
  10786.  
  10787.  
  10788.  
  10789.  
  10790.  
  10791.  
  10792.  
  10793.  
  10794.                                       176                                      
  10795. -------------------------------------------------------------------------------
  10796. fg_pcxmode
  10797. -------------------------------------------------------------------------------
  10798.  
  10799. Prototype
  10800.  
  10801.    int fg_pcxmode (char *pcx_header);
  10802.    function FGpcxmode% (pcx_header$)
  10803.    int function fg_pcxmode (int1 pcx_header)
  10804.    function fg_pcxmode (var pcx_header : byte) : integer;
  10805.  
  10806. Description
  10807.  
  10808.    The fg_pcxmode routine determines the optimal video mode for displaying a
  10809.    PCX file. The optimal mode is the compatible video mode having the lowest
  10810.    resolution larger than or equal to the image dimensions. See the
  10811.    description of fg_showpcx for a table of compatible video modes for PCX
  10812.    files.
  10813.  
  10814. Parameters
  10815.  
  10816.    pcx_header is the name of a 128-byte buffer containing the PCX file header.
  10817.    In BASIC, it must be a fixed-length 128-byte string.
  10818.  
  10819. Return value
  10820.  
  10821.    >0 = The optimal video mode for displaying the PCX image
  10822.    -1 = pcx_header does not contain a valid PCX file header
  10823.    -2 = Cannot determine a compatible video mode
  10824.  
  10825. Restrictions
  10826.  
  10827.    none
  10828.  
  10829. See also
  10830.  
  10831.    fg_pcxhead, fg_setmode, fg_showpcx
  10832.  
  10833. Examples
  10834.  
  10835.    9-2
  10836.  
  10837.  
  10838.  
  10839.  
  10840.  
  10841.  
  10842.  
  10843.  
  10844.  
  10845.  
  10846.  
  10847.  
  10848.  
  10849.  
  10850.  
  10851.  
  10852.  
  10853.                                       177                                      
  10854. -------------------------------------------------------------------------------
  10855. fg_pcxpal
  10856. -------------------------------------------------------------------------------
  10857.  
  10858. Prototype
  10859.  
  10860.    int fg_pcxpal (char *pcx_file, char *pcx_palette);
  10861.    function FGpcxpal% (pcx_file$, pcx_palette$)
  10862.    int function fg_pcxpal (char pcx_file, int1 pcx_palette)
  10863.    function fg_pcxpal (pcx_file : string; var pcx_palette) : integer;
  10864.  
  10865. Description
  10866.  
  10867.    The fg_pcxpal routine retrieves the palette of an image stored in a PCX
  10868.    file. The palette values are returned as RGB color components, each between
  10869.    0 and 63. For video modes 18 and above, the palette values are suitable for
  10870.    fg_setdacs. For the native EGA graphics modes (13 to 16), the palette
  10871.    values must be converted into mode-specific values (with fg_maprgb) before
  10872.    being used with fg_palette or fg_palettes.
  10873.  
  10874.    If the PCX file includes an extended (256-color) palette, fg_pcxpal will
  10875.    return the values in the extended palette. Otherwise, fg_pcxpal will return
  10876.    the values from the 16-color palette in the PCX header.
  10877.  
  10878. Parameters
  10879.  
  10880.    pcx_file is name of the PCX file. The file name must be terminated by a
  10881.    zero byte.
  10882.  
  10883.    pcx_palette is the name of the array that will receive the PCX palette
  10884.    values. The palette values are returned as RGB color components, each
  10885.    between 0 and 63. The first three bytes of pcx_palette will contain the RGB
  10886.    values for color 0, the next three for color 1, and so forth. The size of
  10887.    the pcx_palette array must be at least three times the number of colors in
  10888.    the PCX image.
  10889.  
  10890. Return value
  10891.  
  10892.    >0 = the number of colors in the PCX palette (16 or 256)
  10893.    -1 = file not found
  10894.    -2 = file is not a PCX file
  10895.  
  10896. Restrictions
  10897.  
  10898.    none
  10899.  
  10900. See also
  10901.  
  10902.    fg_loadpcx, fg_maprgb, fg_pcxhead, fg_palette, fg_palettes, fg_setdacs,
  10903.    fg_showpcx
  10904.  
  10905. Examples
  10906.  
  10907.    9-3
  10908.  
  10909.  
  10910.  
  10911.  
  10912.                                       178                                      
  10913. -------------------------------------------------------------------------------
  10914. fg_pcxrange
  10915. -------------------------------------------------------------------------------
  10916.  
  10917. Prototype
  10918.  
  10919.    void fg_pcxrange (char *pcx_header, int *minx, int *maxx, int *miny,
  10920.      int *maxy);
  10921.    sub FGpcxrange (pcx_header$, minx%, maxx%, miny%, maxy%)
  10922.    subroutine fg_pcxrange (int1 pcx_header, int minx, int maxx, int miny,
  10923.      int maxy)
  10924.    procedure fg_pcxrange (var pcx_header; var minx, maxx, miny, maxy :
  10925.      integer);
  10926.  
  10927. Description
  10928.  
  10929.    The fg_pcxrange routine returns the image extents for the PCX image
  10930.    associated with the specified PCX file header.
  10931.  
  10932. Parameters
  10933.  
  10934.    pcx_header is the name of the buffer containing the 128-byte PCX file
  10935.    header.
  10936.  
  10937.    minx receives the x coordinate of the image's left edge. If pcx_header does
  10938.    not contain a valid PCX file header, minx will be set to -1.
  10939.  
  10940.    maxx receives the x coordinate of the image's right edge. If pcx_header
  10941.    does not contain a valid PCX file header, maxx will be set to -1.
  10942.  
  10943.    miny receives the y coordinate of the image's top edge. If pcx_header does
  10944.    not contain a valid PCX file header, miny will be set to -1.
  10945.  
  10946.    maxy receives the y coordinate of the image's bottom edge. If pcx_header
  10947.    does not contain a valid PCX file header, maxy will be set to -1.
  10948.  
  10949. Return value
  10950.  
  10951.    none
  10952.  
  10953. Restrictions
  10954.  
  10955.    none
  10956.  
  10957. See also
  10958.  
  10959.    fg_pcxhead, fg_loadpcx, fg_showpcx
  10960.  
  10961. Examples
  10962.  
  10963.    9-3
  10964.  
  10965.  
  10966.  
  10967.  
  10968.  
  10969.  
  10970.  
  10971.                                       179                                      
  10972. -------------------------------------------------------------------------------
  10973. fg_playing
  10974. -------------------------------------------------------------------------------
  10975.  
  10976. Prototype
  10977.  
  10978.    int fg_playing (void);
  10979.    function FGplaying% ()
  10980.    int function fg_playing ()
  10981.    function fg_playing : integer;
  10982.  
  10983. Description
  10984.  
  10985.    The fg_playing routine determines whether or not there is any asynchronous
  10986.    sound in progress.
  10987.  
  10988. Parameters
  10989.  
  10990.    none
  10991.  
  10992. Return value
  10993.  
  10994.    If the return value is 0, it means there is no asynchronous sound in
  10995.    progress. If it is 1, then there is asynchronous sound in progress.
  10996.  
  10997. Restrictions
  10998.  
  10999.    none
  11000.  
  11001. See also
  11002.  
  11003.    fg_musicb, fg_sounds, fg_voices
  11004.  
  11005. Examples
  11006.  
  11007.    15-4, 15-5, 15-6, 15-7, 15-8
  11008.  
  11009.  
  11010.  
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.  
  11019.  
  11020.  
  11021.  
  11022.  
  11023.  
  11024.  
  11025.  
  11026.  
  11027.  
  11028.  
  11029.  
  11030.                                       180                                      
  11031. -------------------------------------------------------------------------------
  11032. fg_point
  11033. -------------------------------------------------------------------------------
  11034.  
  11035. Prototype
  11036.  
  11037.    void fg_point (int ix, int iy);
  11038.    sub FGpoint (ix%, iy%)
  11039.    subroutine fg_point (int ix, int iy)
  11040.    procedure fg_point (ix, iy : integer);
  11041.  
  11042. Description
  11043.  
  11044.    The fg_point routine draws a point (displays a pixel) in screen space.
  11045.  
  11046. Parameters
  11047.  
  11048.    ix is the point's screen space x coordinate.
  11049.  
  11050.    iy is the point's screen space y coordinate.
  11051.  
  11052. Return value
  11053.  
  11054.    none
  11055.  
  11056. Restrictions
  11057.  
  11058.    This routine has no effect in text video modes.
  11059.  
  11060. See also
  11061.  
  11062.    fg_pointw, fg_pointx
  11063.  
  11064. Examples
  11065.  
  11066.    6-1
  11067.  
  11068.  
  11069.  
  11070.  
  11071.  
  11072.  
  11073.  
  11074.  
  11075.  
  11076.  
  11077.  
  11078.  
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.  
  11087.  
  11088.  
  11089.                                       181                                      
  11090. -------------------------------------------------------------------------------
  11091. fg_pointw
  11092. -------------------------------------------------------------------------------
  11093.  
  11094. Prototype
  11095.  
  11096.    void fg_pointw (double x, double y);
  11097.    sub FGpointw (x#, y#)
  11098.    subroutine fg_pointw (dbl x, dbl y)
  11099.    procedure fg_pointw (x, y : real);
  11100.  
  11101. Description
  11102.  
  11103.    The fg_pointw routine draws a point (displays a pixel) in world space.
  11104.  
  11105. Parameters
  11106.  
  11107.    x is the point's world space x coordinate.
  11108.  
  11109.    y is the point's world space y coordinate.
  11110.  
  11111. Return value
  11112.  
  11113.    none
  11114.  
  11115. Restrictions
  11116.  
  11117.    This routine is not available in Fastgraph/Light and has no effect in text
  11118.    video modes.
  11119.  
  11120. See also
  11121.  
  11122.    fg_point, fg_pointxw
  11123.  
  11124.  
  11125.  
  11126.  
  11127.  
  11128.  
  11129.  
  11130.  
  11131.  
  11132.  
  11133.  
  11134.  
  11135.  
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.                                       182                                      
  11149. -------------------------------------------------------------------------------
  11150. fg_pointx
  11151. -------------------------------------------------------------------------------
  11152.  
  11153. Prototype
  11154.  
  11155.    void fg_pointx (int ix, int iy);
  11156.    sub FGpointx (ix%, iy%)
  11157.    subroutine fg_pointx (int ix, int iy)
  11158.    procedure fg_pointx (ix, iy : integer);
  11159.  
  11160. Description
  11161.  
  11162.    The fg_pointx routine draws a point (displays a pixel) in "exclusive or"
  11163.    mode in screen space.
  11164.  
  11165. Parameters
  11166.  
  11167.    ix is the point's screen space x coordinate.
  11168.  
  11169.    iy is the point's screen space y coordinate.
  11170.  
  11171. Return value
  11172.  
  11173.    none
  11174.  
  11175. Restrictions
  11176.  
  11177.    This routine has no effect in text video modes.
  11178.  
  11179.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  11180.    is reset to its default replacement mode on return.
  11181.  
  11182. See also
  11183.  
  11184.    fg_point, fg_pointxw
  11185.  
  11186.  
  11187.  
  11188.  
  11189.  
  11190.  
  11191.  
  11192.  
  11193.  
  11194.  
  11195.  
  11196.  
  11197.  
  11198.  
  11199.  
  11200.  
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.                                       183                                      
  11208. -------------------------------------------------------------------------------
  11209. fg_pointxw
  11210. -------------------------------------------------------------------------------
  11211.  
  11212. Prototype
  11213.  
  11214.    void fg_pointxw (double x, double y);
  11215.    sub FGpointxw (x#, y#)
  11216.    subroutine fg_pointxw (dbl x, dbl y)
  11217.    procedure fg_pointxw (x, y : real);
  11218.  
  11219. Description
  11220.  
  11221.    The fg_pointxw routine draws a point (displays a pixel) in "exclusive or"
  11222.    mode in world space.
  11223.  
  11224. Parameters
  11225.  
  11226.    x is the point's world space x coordinate.
  11227.  
  11228.    y is the point's world space y coordinate.
  11229.  
  11230. Return value
  11231.  
  11232.    none
  11233.  
  11234. Restrictions
  11235.  
  11236.    This routine is not available in Fastgraph/Light and has no effect in text
  11237.    video modes.
  11238.  
  11239.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  11240.    is reset to its default replacement mode on return.
  11241.  
  11242. See also
  11243.  
  11244.    fg_pointw, fg_pointx
  11245.  
  11246.  
  11247.  
  11248.  
  11249.  
  11250.  
  11251.  
  11252.  
  11253.  
  11254.  
  11255.  
  11256.  
  11257.  
  11258.  
  11259.  
  11260.  
  11261.  
  11262.  
  11263.  
  11264.  
  11265.  
  11266.                                       184                                      
  11267. -------------------------------------------------------------------------------
  11268. fg_polyedge
  11269. -------------------------------------------------------------------------------
  11270.  
  11271. Prototype
  11272.  
  11273.    void fg_polyedge (int edge_flag);
  11274.    sub FGpolyedge (edge_flag%)
  11275.    subroutine fg_polyedge (int edge_flag)
  11276.    procedure fg_polyedge (edge_flag : integer);
  11277.  
  11278. Description
  11279.  
  11280.    The fg_polyedge routine specifies if polygons drawn with fg_polyfill will
  11281.    have their right and bottom edge pixels included. By default, such pixels
  11282.    are excluded.
  11283.  
  11284. Parameters
  11285.  
  11286.    edge_flag controls the drawing of a filled polygon's right and bottom edge
  11287.    pixels. If edge_flag is 0, these pixels are included. If it is 1, these
  11288.    pixels are excluded.
  11289.  
  11290. Return value
  11291.  
  11292.    none
  11293.  
  11294. Restrictions
  11295.  
  11296.    none
  11297.  
  11298. See also
  11299.  
  11300.    fg_polyfill
  11301.  
  11302.  
  11303.  
  11304.  
  11305.  
  11306.  
  11307.  
  11308.  
  11309.  
  11310.  
  11311.  
  11312.  
  11313.  
  11314.  
  11315.  
  11316.  
  11317.  
  11318.  
  11319.  
  11320.  
  11321.  
  11322.  
  11323.  
  11324.  
  11325.                                       185                                      
  11326. -------------------------------------------------------------------------------
  11327. fg_polyfill
  11328. -------------------------------------------------------------------------------
  11329.  
  11330. Prototype
  11331.  
  11332.    void fg_polyfill (int *vertex_array, int *work_array, int n);
  11333.    sub FGpolyfill (vertex_array%(), work_array%(), n%)
  11334.    subroutine fg_polyfill (int vertex_array, int work_array, int n)
  11335.    procedure fg_polyfill (var vertex_array, work_array : integer;
  11336.      n : integer);
  11337.  
  11338. Description
  11339.  
  11340.    The fg_polyfill routine draws a filled convex polygon in screen space. The
  11341.    polygon is filled with pixels of the current color. By default, pixels
  11342.    along the polygon's right and bottom edges are excluded to improve polygon
  11343.    meshing. This feature can be disabled through fg_polyedge.
  11344.  
  11345. Parameters
  11346.  
  11347.    vertex_array is the name of the array containing the (x,y) coordinate pairs
  11348.    of each vertex. The first array element is the x component of the first
  11349.    vertex, the second element is the y component of the first vertex, the
  11350.    third element is the x component of the second vertex, and so forth.
  11351.  
  11352.    work_array is used internally by fg_polyfill. Its size in bytes must be at
  11353.    least four times the unclipped polygon height.
  11354.  
  11355.    n is the number of vertices in the polygon.
  11356.  
  11357. Return value
  11358.  
  11359.    none
  11360.  
  11361. Restrictions
  11362.  
  11363.    If you attempt to fill a non-convex polygon, only a portion of it will be
  11364.    filled.
  11365.  
  11366.    In 16-bit modes, the size of vertex_array is limited to 64K bytes.
  11367.  
  11368.    This routine has no effect in text video modes.
  11369.  
  11370. See also
  11371.  
  11372.    fg_polyedge, fg_polyline, fg_polyoff
  11373.  
  11374. Examples
  11375.  
  11376.    6-8
  11377.  
  11378.  
  11379.  
  11380.  
  11381.  
  11382.  
  11383.  
  11384.                                       186                                      
  11385. -------------------------------------------------------------------------------
  11386. fg_polygon
  11387. -------------------------------------------------------------------------------
  11388.  
  11389. Prototype
  11390.  
  11391.    void fg_polygon (int *ix_array, int *iy_array, int n);
  11392.    sub FGpolygon (ix_array%(), iy_array%(), n%)
  11393.    subroutine fg_polygon (int ix_array, int iy_array, int n)
  11394.    procedure fg_polygon (var ix_array, iy_array : integer; n : integer);
  11395.  
  11396. Description
  11397.  
  11398.    The fg_polygon routine draws an unfilled polygon in screen space, using two
  11399.    coordinate arrays to define the polygon vertices. The drawing of the
  11400.    polygon begins at the first vertex defined in the coordinate arrays,
  11401.    through the remaining vertices in sequence, and finally back to the first
  11402.    vertex if necessary.
  11403.  
  11404. Parameters
  11405.  
  11406.    ix_array is the name of the array containing the screen space x coordinates
  11407.    of the polygon vertices.
  11408.  
  11409.    iy_array is the name of the array containing the screen space y coordinates
  11410.    of the polygon vertices.
  11411.  
  11412.    n is the number of vertices in the polygon.
  11413.  
  11414. Return value
  11415.  
  11416.    none
  11417.  
  11418. Restrictions
  11419.  
  11420.    In 16-bit modes, the size of ix_array and iy_array is limited to 64K bytes.
  11421.  
  11422.    This routine has no effect in text video modes.
  11423.  
  11424. See also
  11425.  
  11426.    fg_polyline, fg_polygonw
  11427.  
  11428. Examples
  11429.  
  11430.    6-7
  11431.  
  11432.  
  11433.  
  11434.  
  11435.  
  11436.  
  11437.  
  11438.  
  11439.  
  11440.  
  11441.  
  11442.  
  11443.                                       187                                      
  11444. -------------------------------------------------------------------------------
  11445. fg_polygonw
  11446. -------------------------------------------------------------------------------
  11447.  
  11448. Prototype
  11449.  
  11450.    void fg_polygonw (double *x_array, double *y_array, int n);
  11451.    sub FGpolygonw (x_array#(), y_array#(), n%)
  11452.    subroutine fg_polygonw (dbl x_array, dbl y_array, int n)
  11453.    procedure fg_polygonw (var x_array, y_array : real; n : integer);
  11454.  
  11455. Description
  11456.  
  11457.    The fg_polygonw routine draws an unfilled polygon in world space, using two
  11458.    coordinate arrays to define the polygon vertices. The drawing of the
  11459.    polygon begins at the first vertex defined in the coordinate arrays,
  11460.    through the remaining vertices in sequence, and finally back to the first
  11461.    vertex if necessary.
  11462.  
  11463. Parameters
  11464.  
  11465.    x_array is the name of the array containing the world space x coordinates
  11466.    of the polygon vertices.
  11467.  
  11468.    y_array is the name of the array containing the world space y coordinates
  11469.    of the polygon vertices.
  11470.  
  11471.    n is the number of vertices in the polygon.
  11472.  
  11473. Return value
  11474.  
  11475.    none
  11476.  
  11477. Restrictions
  11478.  
  11479.    In 16-bit modes, the size of x_array and y_array is limited to 64K bytes.
  11480.  
  11481.    This routine is not available in Fastgraph/Light and has no effect in text
  11482.    video modes.
  11483.  
  11484. See also
  11485.  
  11486.    fg_polygon
  11487.  
  11488.  
  11489.  
  11490.  
  11491.  
  11492.  
  11493.  
  11494.  
  11495.  
  11496.  
  11497.  
  11498.  
  11499.  
  11500.  
  11501.  
  11502.                                       188                                      
  11503. -------------------------------------------------------------------------------
  11504. fg_polyline
  11505. -------------------------------------------------------------------------------
  11506.  
  11507. Prototype
  11508.  
  11509.    void fg_polyline (int *vertex_array, int n);
  11510.    sub FGpolyline (vertex_array%(), n%)
  11511.    subroutine fg_polyline (int vertex_array, int n)
  11512.    procedure fg_polyline (var vertex_array : integer; n : integer);
  11513.  
  11514. Description
  11515.  
  11516.    The fg_polyline routine draws an unfilled polygon in screen space, using a
  11517.    single array to define the polygon vertices. Compare this to fg_polygon,
  11518.    which uses separate arrays for the x and y components of each vertex.
  11519.  
  11520. Parameters
  11521.  
  11522.    vertex_array is the name of the array containing the (x,y) coordinate pairs
  11523.    of each vertex. The first array element is the x component of the first
  11524.    vertex, the second element is the y component of the first vertex, the
  11525.    third element is the x component of the second vertex, and so forth.
  11526.  
  11527.    n is the number of vertices in the polygon.
  11528.  
  11529. Return value
  11530.  
  11531.    none
  11532.  
  11533. Restrictions
  11534.  
  11535.    In 16-bit modes, the size of vertex_array is limited to 64K bytes.
  11536.  
  11537.    This routine has no effect in text video modes.
  11538.  
  11539. See also
  11540.  
  11541.    fg_polyfill, fg_polygon, fg_polyoff
  11542.  
  11543. Examples
  11544.  
  11545.    6-8
  11546.  
  11547.  
  11548.  
  11549.  
  11550.  
  11551.  
  11552.  
  11553.  
  11554.  
  11555.  
  11556.  
  11557.  
  11558.  
  11559.  
  11560.  
  11561.                                       189                                      
  11562. -------------------------------------------------------------------------------
  11563. fg_polyoff
  11564. -------------------------------------------------------------------------------
  11565.  
  11566. Prototype
  11567.  
  11568.    void fg_polyoff (int ix, int iy);
  11569.    sub FGpolyoff (ix%, iy%)
  11570.    subroutine fg_polyoff (int ix, int iy)
  11571.    procedure fg_polyoff (ix, iy : integer);
  11572.  
  11573. Description
  11574.  
  11575.    The fg_polyoff routine defines the screen space offset applied to each
  11576.    polygon vertex for fg_inside, fg_polyfill, and fg_polyline. By default, the
  11577.    polygon display functions use an offset of zero, meaning their vertex
  11578.    arrays specify the actual vertex coordinates.
  11579.  
  11580. Parameters
  11581.  
  11582.    ix is the horizontal screen space offset applied to the x component of all
  11583.    vertices.
  11584.  
  11585.    iy is the vertical screen space offset applied to the y component of all
  11586.    vertices.
  11587.  
  11588. Return value
  11589.  
  11590.    none
  11591.  
  11592. Restrictions
  11593.  
  11594.    none
  11595.  
  11596. See also
  11597.  
  11598.    fg_inside, fg_polyfill, fg_polyline
  11599.  
  11600. Examples
  11601.  
  11602.    6-8
  11603.  
  11604.  
  11605.  
  11606.  
  11607.  
  11608.  
  11609.  
  11610.  
  11611.  
  11612.  
  11613.  
  11614.  
  11615.  
  11616.  
  11617.  
  11618.  
  11619.  
  11620.                                       190                                      
  11621. -------------------------------------------------------------------------------
  11622. fg_print
  11623. -------------------------------------------------------------------------------
  11624.  
  11625. Prototype
  11626.  
  11627.    void fg_print (char *string, int n);
  11628.    sub FGprint (string$, n%)
  11629.    subroutine fg_print (char string, int n)
  11630.    procedure fg_print (string : string; n : integer);
  11631.  
  11632. Description
  11633.  
  11634.    The fg_print routine displays a string of hardware characters relative to
  11635.    the current graphics position using the current color index, without
  11636.    clipping. By default, strings are displayed such that the bottom row of the
  11637.    first character is at the current graphics position. On return, the
  11638.    graphics cursor is positioned just to the right of the last character
  11639.    displayed.
  11640.  
  11641. Parameters
  11642.  
  11643.    string is the arbitrary-length sequence of characters to display.
  11644.  
  11645.    n is the number of characters to display from string.
  11646.  
  11647. Return value
  11648.  
  11649.    none
  11650.  
  11651. Restrictions
  11652.  
  11653.    This routine has no effect in text video modes.
  11654.  
  11655. See also
  11656.  
  11657.    fg_justify, fg_printc, fg_text
  11658.  
  11659. Examples
  11660.  
  11661.    7-6, 10-17, 10-18, 13-7
  11662.  
  11663.  
  11664.  
  11665.  
  11666.  
  11667.  
  11668.  
  11669.  
  11670.  
  11671.  
  11672.  
  11673.  
  11674.  
  11675.  
  11676.  
  11677.  
  11678.  
  11679.                                       191                                      
  11680. -------------------------------------------------------------------------------
  11681. fg_printc
  11682. -------------------------------------------------------------------------------
  11683.  
  11684. Prototype
  11685.  
  11686.    void fg_printc (char *string, int n);
  11687.    sub FGprintc (string$, n%)
  11688.    subroutine fg_printc (char string, int n)
  11689.    procedure fg_printc (string : string; n : integer);
  11690.  
  11691. Description
  11692.  
  11693.    The fg_printc routine displays a string of hardware characters relative to
  11694.    the current graphics position using the current color index. By default,
  11695.    strings are displayed such that the bottom row of the first character is at
  11696.    the current graphics position. Only that part of the string that falls
  11697.    within the current clipping limits will be displayed. On return, the
  11698.    graphics cursor is positioned just to the right of the last character
  11699.    displayed.
  11700.  
  11701. Parameters
  11702.  
  11703.    string is the arbitrary-length sequence of characters to display.
  11704.  
  11705.    n is the number of characters to display from string.
  11706.  
  11707. Return value
  11708.  
  11709.    none
  11710.  
  11711. Restrictions
  11712.  
  11713.    This routine has no effect in text video modes.
  11714.  
  11715. See also
  11716.  
  11717.    fg_print, fg_setclip, fg_textc
  11718.  
  11719.  
  11720.  
  11721.  
  11722.  
  11723.  
  11724.  
  11725.  
  11726.  
  11727.  
  11728.  
  11729.  
  11730.  
  11731.  
  11732.  
  11733.  
  11734.  
  11735.  
  11736.  
  11737.  
  11738.                                       192                                      
  11739. -------------------------------------------------------------------------------
  11740. fg_putblock
  11741. -------------------------------------------------------------------------------
  11742.  
  11743. Prototype
  11744.  
  11745.    void fg_putblock (char [far] *buffer, int minx, int maxx, int miny,
  11746.      int maxy);
  11747.    sub FGputblock (buffer$, minx%, maxx%, miny%, maxy%)
  11748.    subroutine fg_putblock (int1 [far] buffer, int minx, int maxx, int miny,
  11749.      int maxy)
  11750.    procedure fg_putblock (buffer : pointer; minx, maxx, miny, maxy : integer);
  11751.  
  11752. Description
  11753.  
  11754.    The fg_putblock routine displays a block (previously obtained with
  11755.    fg_getblock) at the specified position on the active video page or virtual
  11756.    buffer. In text modes, the block extremes are defined in character space;
  11757.    in graphics modes, they are defined in screen space.
  11758.  
  11759. Parameters
  11760.  
  11761.    buffer is the name of the array containing the block. It is passed by far
  11762.    reference in 16-bit modes except when using BASIC.
  11763.  
  11764.    minx is the x coordinate of the block's left edge. In graphics modes, its
  11765.    value is reduced to a byte boundary if necessary.
  11766.  
  11767.    maxx is the x coordinate of the block's right edge. It must be greater than
  11768.    or equal to the value of minx. In graphics modes, its value is extended to
  11769.    a byte boundary if necessary.
  11770.  
  11771.    miny is the y coordinate of the block's top edge.
  11772.  
  11773.    maxy is the y coordinate of the block's bottom edge. It must be greater
  11774.    than or equal to the value of miny.
  11775.  
  11776. Return value
  11777.  
  11778.    none
  11779.  
  11780. Restrictions
  11781.  
  11782.    In 16-bit modes, the size of buffer is limited to 64K bytes.
  11783.  
  11784.    In real mode Pascal programs, buffer must be allocated dynamically with the
  11785.    GetMem procedure. This is the only way to pass something by far reference
  11786.    in Pascal.
  11787.  
  11788. See also
  11789.  
  11790.    fg_getblock
  11791.  
  11792. Examples
  11793.  
  11794.    11-10
  11795.  
  11796.  
  11797.                                       193                                      
  11798. -------------------------------------------------------------------------------
  11799. fg_putimage
  11800. -------------------------------------------------------------------------------
  11801.  
  11802. Prototype
  11803.  
  11804.    void fg_putimage (char *map_array, int width, int height);
  11805.    sub FGputimage (map_array$, width%, height%)
  11806.    subroutine fg_putimage (int1 map_array, int width, int height)
  11807.    procedure fg_putimage (var map_array : byte; width, height : integer);
  11808.  
  11809. Description
  11810.  
  11811.    The fg_putimage routine displays an image stored as a mode-specific bitmap,
  11812.    without treating color 0 as transparent. The image will be positioned so
  11813.    that its lower left corner is at the graphics cursor position. Refer to the
  11814.    Fastgraph User's Guide for complete information about mode-specific
  11815.    bitmaps.
  11816.  
  11817. Parameters
  11818.  
  11819.    map_array is the name of the array containing the bitmap.
  11820.  
  11821.    width is the width in bytes of the bitmap.
  11822.  
  11823.    height is the height in bytes (pixel rows) of the bitmap.
  11824.  
  11825. Return value
  11826.  
  11827.    none
  11828.  
  11829. Restrictions
  11830.  
  11831.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  11832.  
  11833. See also
  11834.  
  11835.    fg_drwimage, fg_getimage, fg_invert, fg_pack, fg_unpack
  11836.  
  11837. Examples
  11838.  
  11839.    10-8, 10-9, 10-17, 10-18
  11840.  
  11841.  
  11842.  
  11843.  
  11844.  
  11845.  
  11846.  
  11847.  
  11848.  
  11849.  
  11850.  
  11851.  
  11852.  
  11853.  
  11854.  
  11855.  
  11856.                                       194                                      
  11857. -------------------------------------------------------------------------------
  11858. fg_quiet
  11859. -------------------------------------------------------------------------------
  11860.  
  11861. Prototype
  11862.  
  11863.    void fg_quiet (void);
  11864.    sub FGquiet ()
  11865.    subroutine fg_quiet ()
  11866.    procedure fg_quiet;
  11867.  
  11868. Description
  11869.  
  11870.    The fg_quiet routine stops continuous synchronous sound started with
  11871.    fg_sound or fg_voice. It has no effect if there is no continuous sound in
  11872.    progress.
  11873.  
  11874. Parameters
  11875.  
  11876.    none
  11877.  
  11878. Return value
  11879.  
  11880.    none
  11881.  
  11882. Restrictions
  11883.  
  11884.    none
  11885.  
  11886. See also
  11887.  
  11888.    fg_sound, fg_voice
  11889.  
  11890. Examples
  11891.  
  11892.    15-2
  11893.  
  11894.  
  11895.  
  11896.  
  11897.  
  11898.  
  11899.  
  11900.  
  11901.  
  11902.  
  11903.  
  11904.  
  11905.  
  11906.  
  11907.  
  11908.  
  11909.  
  11910.  
  11911.  
  11912.  
  11913.  
  11914.  
  11915.                                       195                                      
  11916. -------------------------------------------------------------------------------
  11917. fg_rect
  11918. -------------------------------------------------------------------------------
  11919.  
  11920. Prototype
  11921.  
  11922.    void fg_rect (int minx, int maxx, int miny, int maxy);
  11923.    sub FGrect (minx%, maxx%, miny%, maxy%)
  11924.    subroutine fg_rect (int minx, int maxx, int miny, int maxy)
  11925.    procedure fg_rect (minx, maxx, miny, maxy : integer);
  11926.  
  11927. Description
  11928.  
  11929.    The fg_rect routine draws a solid (filled) rectangle in screen space or
  11930.    character space, without regard to the clipping region.
  11931.  
  11932. Parameters
  11933.  
  11934.    minx is the x coordinate of the rectangle's left edge.
  11935.  
  11936.    maxx is the x coordinate of the rectangle's right edge. It must be greater
  11937.    than or equal to the value of minx.
  11938.  
  11939.    miny is the y coordinate of the rectangle's top edge.
  11940.  
  11941.    maxy is the y coordinate of the rectangle's bottom edge. It must be greater
  11942.    than or equal to the value of miny.
  11943.  
  11944. Return value
  11945.  
  11946.    none
  11947.  
  11948. Restrictions
  11949.  
  11950.    none
  11951.  
  11952. See also
  11953.  
  11954.    fg_box, fg_clprect, fg_drect, fg_rectw
  11955.  
  11956. Examples
  11957.  
  11958.    5-8, 5-10, 6-11, 6-13, 7-5, 7-9
  11959.  
  11960.  
  11961.  
  11962.  
  11963.  
  11964.  
  11965.  
  11966.  
  11967.  
  11968.  
  11969.  
  11970.  
  11971.  
  11972.  
  11973.  
  11974.                                       196                                      
  11975. -------------------------------------------------------------------------------
  11976. fg_rectw
  11977. -------------------------------------------------------------------------------
  11978.  
  11979. Prototype
  11980.  
  11981.    void fg_rectw (double xmin, double xmax, double ymin, double ymax);
  11982.    sub FGrectw (xmin#, xmax#, ymin#, ymax#)
  11983.    subroutine fg_rectw (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  11984.    procedure fg_rectw (xmin, xmax, ymin, ymax : real);
  11985.  
  11986. Description
  11987.  
  11988.    The fg_rectw routine draws a solid (filled) rectangle in world space,
  11989.    without regard to the clipping region.
  11990.  
  11991. Parameters
  11992.  
  11993.    xmin is the world space x coordinate of the rectangle's left edge.
  11994.  
  11995.    xmax is the world space x coordinate of the rectangle's right edge. It must
  11996.    be greater than or equal to the value of xmin.
  11997.  
  11998.    ymin is the world space y coordinate of the rectangle's bottom edge.
  11999.  
  12000.    ymax is the world space y coordinate of the rectangle's top edge. It must
  12001.    be greater than or equal to the value of ymin.
  12002.  
  12003. Return value
  12004.  
  12005.    none
  12006.  
  12007. Restrictions
  12008.  
  12009.    This routine is not available in Fastgraph/Light.
  12010.  
  12011. See also
  12012.  
  12013.    fg_boxw, fg_clprectw, fg_drectw, fg_rect
  12014.  
  12015. Examples
  12016.  
  12017.    7-13
  12018.  
  12019.  
  12020.  
  12021.  
  12022.  
  12023.  
  12024.  
  12025.  
  12026.  
  12027.  
  12028.  
  12029.  
  12030.  
  12031.  
  12032.  
  12033.                                       197                                      
  12034. -------------------------------------------------------------------------------
  12035. fg_reset
  12036. -------------------------------------------------------------------------------
  12037.  
  12038. Prototype
  12039.  
  12040.    void fg_reset (void);
  12041.    sub FGreset ()
  12042.    subroutine fg_reset ()
  12043.    procedure fg_reset;
  12044.  
  12045. Description
  12046.  
  12047.    When the ANSI.SYS driver is not loaded, fg_reset erases the screen. When
  12048.    ANSI.SYS is loaded, fg_reset also restores any previously set screen
  12049.    attributes. It is generally the last Fastgraph routine called in a program.
  12050.  
  12051. Parameters
  12052.  
  12053.    none
  12054.  
  12055. Return value
  12056.  
  12057.    none
  12058.  
  12059. Restrictions
  12060.  
  12061.    This routine has no effect in graphics video modes.
  12062.  
  12063. See also
  12064.  
  12065.    fg_erase
  12066.  
  12067. Examples
  12068.  
  12069.    3-2
  12070.  
  12071.  
  12072.  
  12073.  
  12074.  
  12075.  
  12076.  
  12077.  
  12078.  
  12079.  
  12080.  
  12081.  
  12082.  
  12083.  
  12084.  
  12085.  
  12086.  
  12087.  
  12088.  
  12089.  
  12090.  
  12091.  
  12092.                                       198                                      
  12093. -------------------------------------------------------------------------------
  12094. fg_resize
  12095. -------------------------------------------------------------------------------
  12096.  
  12097. Prototype
  12098.  
  12099.    void fg_resize (int width, int height);
  12100.    sub FGresize (width%, height%)
  12101.    subroutine fg_resize (int width, int height)
  12102.    procedure fg_resize (width, height : integer);
  12103.  
  12104. Description
  12105.  
  12106.    The fg_resize routine changes the dimensions of a video page in EGA, VGA,
  12107.    and SVGA graphics modes.
  12108.  
  12109. Parameters
  12110.  
  12111.    width specifies the new video page width in pixels.
  12112.  
  12113.    height specifies the new video page height in pixels.
  12114.  
  12115. Return value
  12116.  
  12117.    none
  12118.  
  12119. Restrictions
  12120.  
  12121.    The size of a video page is constrained only by the amount of video memory
  12122.    available. Increasing the video page size reduces the number of physical
  12123.    pages available proportionally. In mode 13, for example, increasing the
  12124.    page size from 320x200 to 640x400 reduces the number of video pages from 8
  12125.    to 2.
  12126.  
  12127.    When you call fg_resize, the visual page must be page 0.
  12128.  
  12129.    If you have created any logical video pages, you must release them with
  12130.    fg_freepage before calling fg_resize, and then create them again afterward.
  12131.  
  12132.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  12133.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  12134.    fg_initxms), you should re-initialize these resources after calling
  12135.    fg_resize. Most mouse drivers expect a fixed video page width, so the mouse
  12136.    cursor may become distorted after resizing video pages.
  12137.  
  12138.    The fg_setmode routine re-establishes the dimensions of a video page to the
  12139.    default screen resolution for the selected video mode.
  12140.  
  12141.    Partial video pages (initially available in some video modes) are
  12142.    unavailable after calling fg_resize, even if you use the video mode's
  12143.    original resolution.
  12144.  
  12145.    This routine is meaningful only in the native EGA and VGA graphics modes
  12146.    (13 to 18), extended VGA graphics modes (20 to 23), and SVGA graphics modes
  12147.    (24 to 29). It has no effect in other video modes or when a virtual buffer
  12148.    is active.
  12149.  
  12150.  
  12151.                                       199                                      
  12152. -------------------------------------------------------------------------------
  12153. fg_resize (continued)
  12154. -------------------------------------------------------------------------------
  12155.  
  12156. See also
  12157.  
  12158.    fg_pan
  12159.  
  12160. Examples
  12161.  
  12162.    8-11, 13-7
  12163.  
  12164.  
  12165.  
  12166.  
  12167.  
  12168.  
  12169.  
  12170.  
  12171.  
  12172.  
  12173.  
  12174.  
  12175.  
  12176.  
  12177.  
  12178.  
  12179.  
  12180.  
  12181.  
  12182.  
  12183.  
  12184.  
  12185.  
  12186.  
  12187.  
  12188.  
  12189.  
  12190.  
  12191.  
  12192.  
  12193.  
  12194.  
  12195.  
  12196.  
  12197.  
  12198.  
  12199.  
  12200.  
  12201.  
  12202.  
  12203.  
  12204.  
  12205.  
  12206.  
  12207.  
  12208.  
  12209.  
  12210.                                       200                                      
  12211. -------------------------------------------------------------------------------
  12212. fg_restore
  12213. -------------------------------------------------------------------------------
  12214.  
  12215. Prototype
  12216.  
  12217.    void fg_restore (int minx, int maxx, int miny, int maxy);
  12218.    sub FGrestore (minx%, maxx%, miny%, maxy%)
  12219.    subroutine fg_restore (int minx, int maxx, int miny, int maxy)
  12220.    procedure fg_restore (minx, maxx, miny, maxy : integer);
  12221.  
  12222. Description
  12223.  
  12224.    The fg_restore routine copies a rectangular region from the hidden video
  12225.    page to the same position on the active video page. In text modes, the
  12226.    region is defined in character space; in graphics modes, it is defined in
  12227.    screen space. As with Fastgraph's other block transfer routines, no
  12228.    clipping is performed.
  12229.  
  12230. Parameters
  12231.  
  12232.    minx is the x coordinate of the region's left edge. In graphics modes, its
  12233.    value is reduced to a byte boundary if necessary.
  12234.  
  12235.    maxx is the x coordinate of the region's right edge. It must be greater
  12236.    than or equal to the value of minx. In graphics modes, its value is
  12237.    extended to a byte boundary if necessary.
  12238.  
  12239.    miny is the y coordinate of the region's top edge.
  12240.  
  12241.    maxy is the y coordinate of the region's bottom edge. It must be greater
  12242.    than or equal to the value of miny.
  12243.  
  12244. Return value
  12245.  
  12246.    none
  12247.  
  12248. Restrictions
  12249.  
  12250.    This routine always applies to video pages, even when a virtual buffer is
  12251.    active.
  12252.  
  12253. See also
  12254.  
  12255.    fg_restorew, fg_save, fg_sethpage, fg_transfer
  12256.  
  12257. Examples
  12258.  
  12259.    11-2, 11-3
  12260.  
  12261.  
  12262.  
  12263.  
  12264.  
  12265.  
  12266.  
  12267.  
  12268.  
  12269.                                       201                                      
  12270. -------------------------------------------------------------------------------
  12271. fg_restorew
  12272. -------------------------------------------------------------------------------
  12273.  
  12274. Prototype
  12275.  
  12276.    void fg_restorew (double xmin, double xmax, double ymin, double ymax);
  12277.    sub FGrestorew (xmin#, xmax#, ymin#, ymax#)
  12278.    subroutine fg_restorew (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  12279.    procedure fg_restorew (xmin, xmax, ymin, ymax : real);
  12280.  
  12281. Description
  12282.  
  12283.    The fg_restorew routine copies a rectangular region, defined in world
  12284.    space, from the hidden video page to the same position on the active video
  12285.    page. As with Fastgraph's other block transfer routines, no clipping is
  12286.    performed.
  12287.  
  12288. Parameters
  12289.  
  12290.    xmin is the world space x coordinate of the region's left edge. In graphics
  12291.    modes, its value is reduced to a byte boundary if necessary.
  12292.  
  12293.    xmax is the world space x coordinate of the region's right edge. It must be
  12294.    greater than or equal to the value of xmin. In graphics modes, its value is
  12295.    extended to a byte boundary if necessary.
  12296.  
  12297.    ymin is the world space y coordinate of the region's bottom edge.
  12298.  
  12299.    ymax is the world space y coordinate of the region's top edge. It must be
  12300.    greater than or equal to the value of ymin.
  12301.  
  12302. Return value
  12303.  
  12304.    none
  12305.  
  12306. Restrictions
  12307.  
  12308.    This routine always applies to video pages, even when a virtual buffer is
  12309.    active. It is not available in Fastgraph/Light.
  12310.  
  12311. See also
  12312.  
  12313.    fg_restore, fg_savew, fg_sethpage, fg_transfer
  12314.  
  12315.  
  12316.  
  12317.  
  12318.  
  12319.  
  12320.  
  12321.  
  12322.  
  12323.  
  12324.  
  12325.  
  12326.  
  12327.  
  12328.                                       202                                      
  12329. -------------------------------------------------------------------------------
  12330. fg_resume
  12331. -------------------------------------------------------------------------------
  12332.  
  12333. Prototype
  12334.  
  12335.    void fg_resume (void);
  12336.    sub FGresume ()
  12337.    subroutine fg_resume ()
  12338.    procedure fg_resume;
  12339.  
  12340. Description
  12341.  
  12342.    The fg_resume routine restarts asynchronous music previously suspended by
  12343.    fg_suspend. It has no effect if there is no suspended music.
  12344.  
  12345. Parameters
  12346.  
  12347.    none
  12348.  
  12349. Return value
  12350.  
  12351.    none
  12352.  
  12353. Restrictions
  12354.  
  12355.    none
  12356.  
  12357. See also
  12358.  
  12359.    fg_musicb, fg_suspend
  12360.  
  12361. Examples
  12362.  
  12363.    15-8
  12364.  
  12365.  
  12366.  
  12367.  
  12368.  
  12369.  
  12370.  
  12371.  
  12372.  
  12373.  
  12374.  
  12375.  
  12376.  
  12377.  
  12378.  
  12379.  
  12380.  
  12381.  
  12382.  
  12383.  
  12384.  
  12385.  
  12386.  
  12387.                                       203                                      
  12388. -------------------------------------------------------------------------------
  12389. fg_revimage
  12390. -------------------------------------------------------------------------------
  12391.  
  12392. Prototype
  12393.  
  12394.    void fg_revimage (char *map_array, int width, int height);
  12395.    sub FGrevimage (map_array$, width%, height%)
  12396.    subroutine fg_revimage (int1 map_array, int width, int height)
  12397.    procedure fg_revimage (var map_array : byte; width, height : integer);
  12398.  
  12399. Description
  12400.  
  12401.    The fg_revimage routine displays a reversed image stored as a mode-specific
  12402.    bitmap. The image will be positioned so that its lower left corner is at
  12403.    the graphics cursor position. Refer to the Fastgraph User's Guide for
  12404.    complete information about mode-specific bitmaps.
  12405.  
  12406. Parameters
  12407.  
  12408.    map_array is the name of the array containing the bitmap.
  12409.  
  12410.    width is the width in bytes of the bitmap.
  12411.  
  12412.    height is the height in bytes (pixel rows) of the bitmap.
  12413.  
  12414. Return value
  12415.  
  12416.    none
  12417.  
  12418. Restrictions
  12419.  
  12420.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  12421.  
  12422.    This routine has no effect in text video modes.
  12423.  
  12424. See also
  12425.  
  12426.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_invert, fg_pack,
  12427.    fg_putimage, fg_unpack
  12428.  
  12429. Examples
  12430.  
  12431.    10-8, 10-9
  12432.  
  12433.  
  12434.  
  12435.  
  12436.  
  12437.  
  12438.  
  12439.  
  12440.  
  12441.  
  12442.  
  12443.  
  12444.  
  12445.  
  12446.                                       204                                      
  12447. -------------------------------------------------------------------------------
  12448. fg_revmask
  12449. -------------------------------------------------------------------------------
  12450.  
  12451. Prototype
  12452.  
  12453.    void fg_revmask (char *map_array, int runs, int width);
  12454.    sub FGrevmask (map_array$, runs%, width%)
  12455.    subroutine fg_revmask (int1 map_array, int runs, int width)
  12456.    procedure fg_revmask (var map_array : byte; runs, width : integer);
  12457.  
  12458. Description
  12459.  
  12460.    The fg_revmask routine displays a reversed image stored as a masking map.
  12461.    The image will be positioned so that its lower left corner is at the
  12462.    graphics cursor position. Refer to the description of fg_drawmask for more
  12463.    information about masking maps.
  12464.  
  12465. Parameters
  12466.  
  12467.    map_array is the name of the array containing the masking map.
  12468.  
  12469.    runs is the number of pixel runs in the masking map.
  12470.  
  12471.    width is the width in pixels of the masking map.
  12472.  
  12473. Return value
  12474.  
  12475.    none
  12476.  
  12477. Restrictions
  12478.  
  12479.    In 16-bit modes, the size of map_array is limited to 64K bytes.
  12480.  
  12481.    This routine has no effect in text video modes.
  12482.  
  12483. See also
  12484.  
  12485.    fg_clipmask, fg_drawmask, fg_flipmask
  12486.  
  12487. Examples
  12488.  
  12489.    10-23
  12490.  
  12491.  
  12492.  
  12493.  
  12494.  
  12495.  
  12496.  
  12497.  
  12498.  
  12499.  
  12500.  
  12501.  
  12502.  
  12503.  
  12504.  
  12505.                                       205                                      
  12506. -------------------------------------------------------------------------------
  12507. fg_save
  12508. -------------------------------------------------------------------------------
  12509.  
  12510. Prototype
  12511.  
  12512.    void fg_save (int minx, int maxx, int miny, int maxy);
  12513.    sub FGsave (minx%, maxx%, miny%, maxy%)
  12514.    subroutine fg_save (int minx, int maxx, int miny, int maxy)
  12515.    procedure fg_save (minx, maxx, miny, maxy : integer);
  12516.  
  12517. Description
  12518.  
  12519.    The fg_save routine copies a rectangular region from the active video page
  12520.    to the same position on the hidden video page. In text modes, the region is
  12521.    defined in character space; in graphics modes, it is defined in screen
  12522.    space. As with Fastgraph's other block transfer routines, no clipping is
  12523.    performed.
  12524.  
  12525. Parameters
  12526.  
  12527.    minx is the x coordinate of the region's left edge. In graphics modes, its
  12528.    value is reduced to a byte boundary if necessary.
  12529.  
  12530.    maxx is the x coordinate of the region's right edge. It must be greater
  12531.    than or equal to the value of minx. In graphics modes, its value is
  12532.    extended to a byte boundary if necessary.
  12533.  
  12534.    miny is the y coordinate of the region's top edge.
  12535.  
  12536.    maxy is the y coordinate of the region's bottom edge. It must be greater
  12537.    than or equal to the value of miny.
  12538.  
  12539. Return value
  12540.  
  12541.    none
  12542.  
  12543. Restrictions
  12544.  
  12545.    This routine always applies to video pages, even when a virtual buffer is
  12546.    active.
  12547.  
  12548. See also
  12549.  
  12550.    fg_restore, fg_savew, fg_sethpage, fg_transfer
  12551.  
  12552. Examples
  12553.  
  12554.    11-2, 11-3
  12555.  
  12556.  
  12557.  
  12558.  
  12559.  
  12560.  
  12561.  
  12562.  
  12563.  
  12564.                                       206                                      
  12565. -------------------------------------------------------------------------------
  12566. fg_savew
  12567. -------------------------------------------------------------------------------
  12568.  
  12569. Prototype
  12570.  
  12571.    void fg_savew (double xmin, double xmax, double ymin, double ymax);
  12572.    sub FGsavew (xmin#, xmax#, ymin#, ymax#)
  12573.    subroutine fg_savew (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  12574.    procedure fg_savew (xmin, xmax, ymin, ymax : real);
  12575.  
  12576. Description
  12577.  
  12578.    The fg_savew routine copies a rectangular region, defined in world space,
  12579.    from the active video page to the same position on the hidden video page.
  12580.    As with Fastgraph's other block transfer routines, no clipping is
  12581.    performed.
  12582.  
  12583. Parameters
  12584.  
  12585.    xmin is the world space x coordinate of the region's left edge. In graphics
  12586.    modes, its value is reduced to a byte boundary if necessary.
  12587.  
  12588.    xmax is the world space x coordinate of the region's right edge. It must be
  12589.    greater than or equal to the value of xmin. In graphics modes, its value is
  12590.    extended to a byte boundary if necessary.
  12591.  
  12592.    ymin is the world space y coordinate of the region's bottom edge.
  12593.  
  12594.    ymax is the world space y coordinate of the region's top edge. It must be
  12595.    greater than or equal to the value of ymin.
  12596.  
  12597. Return value
  12598.  
  12599.    none
  12600.  
  12601. Restrictions
  12602.  
  12603.    This routine always applies to video pages, even when a virtual buffer is
  12604.    active. It is not available in Fastgraph/Light.
  12605.  
  12606. See also
  12607.  
  12608.    fg_restorew, fg_save, fg_sethpage, fg_transfer
  12609.  
  12610.  
  12611.  
  12612.  
  12613.  
  12614.  
  12615.  
  12616.  
  12617.  
  12618.  
  12619.  
  12620.  
  12621.  
  12622.  
  12623.                                       207                                      
  12624. -------------------------------------------------------------------------------
  12625. fg_scale
  12626. -------------------------------------------------------------------------------
  12627.  
  12628. Prototype
  12629.  
  12630.    void fg_scale (char *source, char *dest, int sw, int sh, int dw, int dh);
  12631.    sub FGscale (source$, dest$, sw%, sh%, dw%, dh%)
  12632.    subroutine fg_scale (int1 source, int1 dest, int sw, int sh, int dw,
  12633.      int dh)
  12634.    procedure fg_scale (var source, dest; sw, sh, dw, dh : integer);
  12635.  
  12636. Description
  12637.  
  12638.    The fg_scale routine scales a bitmapped image stored in the "one pixel per
  12639.    byte" format.
  12640.  
  12641. Parameters
  12642.  
  12643.    source is the name of the array containing the "one pixel per byte"
  12644.    bitmapped image to be scaled.
  12645.  
  12646.    dest is the name of the array that will receive the resulting scaled image.
  12647.  
  12648.    sw is the width of the source image in pixels. It must be greater than
  12649.    zero.
  12650.  
  12651.    sh is the height of the source image in pixels. It must be greater than
  12652.    zero.
  12653.  
  12654.    dw is the width of the dest image in pixels. It must be greater than zero.
  12655.  
  12656.    dh is the height of the dest image in pixels. It must be greater than zero.
  12657.  
  12658. Return value
  12659.  
  12660.    none
  12661.  
  12662. Restrictions
  12663.  
  12664.    In 16-bit modes, the size of the source and dest arrays is limited to 64K
  12665. bytes.
  12666.  
  12667.    The maximum allowable width or height of source and dest is 1,024 pixels.
  12668.  
  12669. See also
  12670.  
  12671.    fg_drwimage, fg_pack, fg_putimage, fg_shear, fg_unpack
  12672.  
  12673. Examples
  12674.  
  12675.    10-17, 10-19
  12676.  
  12677.  
  12678.  
  12679.  
  12680.  
  12681.  
  12682.                                       208                                      
  12683. -------------------------------------------------------------------------------
  12684. fg_scrlock
  12685. -------------------------------------------------------------------------------
  12686.  
  12687. Prototype
  12688.  
  12689.    int fg_scrlock (void);
  12690.    function FGscrlock% ()
  12691.    int function fg_scrlock ()
  12692.    function fg_scrlock : integer;
  12693.  
  12694. Description
  12695.  
  12696.    The fg_scrlock routine determines the state of the ScrollLock key.
  12697.  
  12698. Parameters
  12699.  
  12700.    none
  12701.  
  12702. Return value
  12703.  
  12704.    If the return value is 0, it means the ScrollLock key is off. If it is 1,
  12705.    it means the ScrollLock key is on.
  12706.  
  12707. Restrictions
  12708.  
  12709.    Not all PC keyboards have a ScrollLock key. For such systems, fg_scrlock
  12710.    will return a value of zero.
  12711.  
  12712. See also
  12713.  
  12714.    fg_capslock, fg_numlock, fg_setcaps, fg_setnum
  12715.  
  12716. Examples
  12717.  
  12718.    14-4
  12719.  
  12720.  
  12721.  
  12722.  
  12723.  
  12724.  
  12725.  
  12726.  
  12727.  
  12728.  
  12729.  
  12730.  
  12731.  
  12732.  
  12733.  
  12734.  
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.                                       209                                      
  12742. -------------------------------------------------------------------------------
  12743. fg_scroll
  12744. -------------------------------------------------------------------------------
  12745.  
  12746. Prototype
  12747.  
  12748.    void fg_scroll (int minx, int maxx, int miny, int maxy, int jump,
  12749.      int type);
  12750.    sub FGscroll (minx%, maxx%, miny%, maxy%, jump%, type%)
  12751.    subroutine fg_scroll (int minx, int maxx, int miny, int maxy, int jump,
  12752.      int type)
  12753.    procedure fg_scroll (minx, maxx, miny, maxy, jump, type : integer);
  12754.  
  12755. Description
  12756.  
  12757.    The fg_scroll routine vertically scrolls a region of the active video page.
  12758.    The scrolling may be done either up or down, using either an end-off or
  12759.    circular method. In text modes, the region is defined in character space;
  12760.    in graphics modes, it is defined in screen space.
  12761.  
  12762. Parameters
  12763.  
  12764.    minx is the x coordinate of the scrolling region's left edge. In graphics
  12765.    modes, its value is reduced to a byte boundary if necessary.
  12766.  
  12767.    maxx is the x coordinate of the scrolling region's right edge. It must be
  12768.    greater than or equal to the value of minx. In graphics modes, its value is
  12769.    extended to a byte boundary if necessary.
  12770.  
  12771.    miny is the y coordinate of the scrolling region's top edge.
  12772.  
  12773.    maxy is the y coordinate of the scrolling region's bottom edge. It must be
  12774.    greater than or equal to the value of miny.
  12775.  
  12776.    jump is the number of pixels to jump between each scrolling iteration. If
  12777.    jump is negative, the region will scroll toward the top of the screen. If
  12778.    jump is positive, the region will scroll toward the bottom of the screen.
  12779.  
  12780.    type specifies the type of scroll. If type is zero, rows that scroll off
  12781.    one edge appear at the opposite edge, thus producing a circular scrolling
  12782.    effect. If type is any other value, rows that scroll off one edge will be
  12783.    replaced at the opposite edge by lines of the current color.
  12784.  
  12785. Return value
  12786.  
  12787.    none
  12788.  
  12789. Restrictions
  12790.  
  12791.    This routine has no effect when a virtual buffer is active.
  12792.  
  12793.    Circular scrolling uses part of the hidden page (as defined in the most
  12794.    recent call to fg_sethpage) as a temporary workspace.
  12795.  
  12796. See also
  12797.  
  12798.    fg_setcolor, fg_sethpage
  12799.  
  12800.                                       210                                      
  12801. -------------------------------------------------------------------------------
  12802. fg_scroll (continued)
  12803. -------------------------------------------------------------------------------
  12804.  
  12805. Examples
  12806.  
  12807.    13-3, 13-4, 13-5
  12808.  
  12809.  
  12810.  
  12811.  
  12812.  
  12813.  
  12814.  
  12815.  
  12816.  
  12817.  
  12818.  
  12819.  
  12820.  
  12821.  
  12822.  
  12823.  
  12824.  
  12825.  
  12826.  
  12827.  
  12828.  
  12829.  
  12830.  
  12831.  
  12832.  
  12833.  
  12834.  
  12835.  
  12836.  
  12837.  
  12838.  
  12839.  
  12840.  
  12841.  
  12842.  
  12843.  
  12844.  
  12845.  
  12846.  
  12847.  
  12848.  
  12849.  
  12850.  
  12851.  
  12852.  
  12853.  
  12854.  
  12855.  
  12856.  
  12857.  
  12858.  
  12859.                                       211                                      
  12860. -------------------------------------------------------------------------------
  12861. fg_setangle
  12862. -------------------------------------------------------------------------------
  12863.  
  12864. Prototype
  12865.  
  12866.    void fg_setangle (double angle);
  12867.    sub FGsetangle (angle#)
  12868.    subroutine fg_setangle (dbl angle)
  12869.    procedure fg_setangle (angle : real);
  12870.  
  12871. Description
  12872.  
  12873.    The fg_setangle routine defines the angle of rotation at which software
  12874.    characters are displayed. If a program draws software characters before
  12875.    calling fg_setangle, Fastgraph will use its default angle of zero degrees
  12876.    (that is, horizontal).
  12877.  
  12878. Parameters
  12879.  
  12880.    angle is the angle of rotation, expressed in degrees and measured
  12881.    counterclockwise from the positive x axis.
  12882.  
  12883. Return value
  12884.  
  12885.    none
  12886.  
  12887. Restrictions
  12888.  
  12889.    This routine is not available in Fastgraph/Light. Before using this
  12890.    routine, you must use fg_initw and fg_setworld to establish a world space
  12891.    coordinate system.
  12892.  
  12893. See also
  12894.  
  12895.    fg_initw, fg_setratio, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  12896.    fg_swlength, fg_swtext
  12897.  
  12898. Examples
  12899.  
  12900.    7-12
  12901.  
  12902.  
  12903.  
  12904.  
  12905.  
  12906.  
  12907.  
  12908.  
  12909.  
  12910.  
  12911.  
  12912.  
  12913.  
  12914.  
  12915.  
  12916.  
  12917.  
  12918.                                       212                                      
  12919. -------------------------------------------------------------------------------
  12920. fg_setattr
  12921. -------------------------------------------------------------------------------
  12922.  
  12923. Prototype
  12924.  
  12925.    void fg_setattr (int foreground, int background, int blink);
  12926.    sub FGsetattr (foreground%, background%, blink%)
  12927.    subroutine fg_setattr (int foreground, int background, int blink)
  12928.    procedure fg_setattr (foreground, background, blink : integer);
  12929.  
  12930. Description
  12931.  
  12932.    The fg_setattr routine establishes the current text attribute in text video
  12933.    modes.
  12934.  
  12935. Parameters
  12936.  
  12937.    foreground is attribute's foreground component, between 0 and 15.
  12938.  
  12939.    background is the attribute's background component, between 0 and 7.
  12940.  
  12941.    blink is the attribute's blink component, between 0 and 1.
  12942.  
  12943. Return value
  12944.  
  12945.    none
  12946.  
  12947. Restrictions
  12948.  
  12949.    This routine has no effect in graphics video modes.
  12950.  
  12951. See also
  12952.  
  12953.    fg_setcolor
  12954.  
  12955. Examples
  12956.  
  12957.    7-1, 7-2, 7-3, 7-4, 8-1, 8-3, 8-5, 8-7, 10-13, 11-2, 11-4, 13-4, 14-9
  12958.  
  12959.  
  12960.  
  12961.  
  12962.  
  12963.  
  12964.  
  12965.  
  12966.  
  12967.  
  12968.  
  12969.  
  12970.  
  12971.  
  12972.  
  12973.  
  12974.  
  12975.  
  12976.  
  12977.                                       213                                      
  12978. -------------------------------------------------------------------------------
  12979. fg_setbanks
  12980. -------------------------------------------------------------------------------
  12981.  
  12982. Prototype
  12983.  
  12984.    void fg_setbanks (int read_bank, int write_bank);
  12985.    sub FGsetbanks (read_bank%, write_bank%)
  12986.    subroutine fg_setbanks (int read_bank, int write_bank)
  12987.    procedure fg_setbanks (read_bank, write_bank : integer);
  12988.  
  12989. Description
  12990.  
  12991.    The fg_setbanks routine defines the SVGA read and write bank numbers. This
  12992.    routine is not usually called in an application but is provided as a high-
  12993.    level interface to Fastgraph's SVGA kernel.
  12994.  
  12995. Parameters
  12996.  
  12997.    read_bank is the SVGA bank number used in read operations. If the value of
  12998.    read_bank is negative, the read bank number is not changed.
  12999.  
  13000.    write_bank is the SVGA bank number used in write operations. If the value
  13001.    of write_bank is negative, the write bank number is not changed.
  13002.  
  13003. Return value
  13004.  
  13005.    none
  13006.  
  13007. Restrictions
  13008.  
  13009.    This routine has no effect if Fastgraph's SVGA kernel has not been
  13010.    initialized.
  13011.  
  13012. See also
  13013.  
  13014.    fg_getbanks, fg_svgainit
  13015.  
  13016.  
  13017.  
  13018.  
  13019.  
  13020.  
  13021.  
  13022.  
  13023.  
  13024.  
  13025.  
  13026.  
  13027.  
  13028.  
  13029.  
  13030.  
  13031.  
  13032.  
  13033.  
  13034.  
  13035.  
  13036.                                       214                                      
  13037. -------------------------------------------------------------------------------
  13038. fg_setcaps
  13039. -------------------------------------------------------------------------------
  13040.  
  13041. Prototype
  13042.  
  13043.    void fg_setcaps (int state);
  13044.    sub FGsetcaps (state%)
  13045.    subroutine fg_setcaps (int state)
  13046.    procedure fg_setcaps (state : integer);
  13047.  
  13048. Description
  13049.  
  13050.    The fg_setcaps routine controls the state of the CapsLock key.
  13051.  
  13052. Parameters
  13053.  
  13054.    state defines the CapsLock key state. If state is 0, the CapsLock key is
  13055.    turned off. If it is 1, the CapsLock key is turned on.
  13056.  
  13057. Return value
  13058.  
  13059.    none
  13060.  
  13061. Restrictions
  13062.  
  13063.    On most keyboards, changing the CapsLock key state will also change the
  13064.    keyboard state light to reflect the new key state. However, some older
  13065.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  13066.    update the state light. This makes the state light inconsistent with the
  13067.    true key state.
  13068.  
  13069. See also
  13070.  
  13071.    fg_capslock, fg_numlock, fg_scrlock, fg_setnum
  13072.  
  13073. Examples
  13074.  
  13075.    14-4
  13076.  
  13077.  
  13078.  
  13079.  
  13080.  
  13081.  
  13082.  
  13083.  
  13084.  
  13085.  
  13086.  
  13087.  
  13088.  
  13089.  
  13090.  
  13091.  
  13092.  
  13093.  
  13094.  
  13095.                                       215                                      
  13096. -------------------------------------------------------------------------------
  13097. fg_setclip
  13098. -------------------------------------------------------------------------------
  13099.  
  13100. Prototype
  13101.  
  13102.    void fg_setclip (int minx, int maxx, int miny, int maxy);
  13103.    sub FGsetclip (minx%, maxx%, miny%, maxy%)
  13104.    subroutine fg_setclip (int minx, int maxx, int miny, int maxy)
  13105.    procedure fg_setclip (minx, maxx, miny, maxy : integer);
  13106.  
  13107. Description
  13108.  
  13109.    The fg_setclip routine defines the clipping region in screen space. The
  13110.    clipping region is a rectangular area outside of which graphics are
  13111.    suppressed.
  13112.  
  13113. Parameters
  13114.  
  13115.    minx is the screen space x coordinate of the clipping region's left edge.
  13116.  
  13117.    maxx is the screen space x coordinate of the clipping region's right edge.
  13118.    It must be greater than or equal to the value of minx.
  13119.  
  13120.    miny is the screen space y coordinate of the clipping region's top edge.
  13121.  
  13122.    maxy is the screen space y coordinate of the clipping region's bottom edge.
  13123.    It must be greater than or equal to the value of miny.
  13124.  
  13125. Return value
  13126.  
  13127.    none
  13128.  
  13129. Restrictions
  13130.  
  13131.    This routine has no effect in text video modes.
  13132.  
  13133. See also
  13134.  
  13135.    fg_setclipw
  13136.  
  13137. Examples
  13138.  
  13139.    6-5, 6-8, 10-8, 10-9, 10-23, 12-4
  13140.  
  13141.  
  13142.  
  13143.  
  13144.  
  13145.  
  13146.  
  13147.  
  13148.  
  13149.  
  13150.  
  13151.  
  13152.  
  13153.  
  13154.                                       216                                      
  13155. -------------------------------------------------------------------------------
  13156. fg_setclipw
  13157. -------------------------------------------------------------------------------
  13158.  
  13159. Prototype
  13160.  
  13161.    void fg_setclipw (double xmin, double xmax, double ymin, double ymax);
  13162.    sub FGsetclipw (xmin#, xmax#, ymin#, ymax#)
  13163.    subroutine fg_setclipw (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  13164.    procedure fg_setclipw (xmin, xmax, ymin, ymax : real);
  13165.  
  13166. Description
  13167.  
  13168.    The fg_setclipw routine defines the clipping region in world space. The
  13169.    clipping region is a rectangular area outside of which graphics are
  13170.    suppressed.
  13171.  
  13172. Parameters
  13173.  
  13174.    xmin is the world space x coordinate of the clipping region's left edge.
  13175.  
  13176.    xmax is the world space x coordinate of the clipping region's right edge.
  13177.    It must be greater than or equal to the value of xmin.
  13178.  
  13179.    ymin is the world space y coordinate of the clipping region's bottom edge.
  13180.  
  13181.    ymax is the world space y coordinate of the clipping region's top edge. It
  13182.    must be greater than or equal to the value of ymin.
  13183.  
  13184. Return value
  13185.  
  13186.    none
  13187.  
  13188. Restrictions
  13189.  
  13190.    This routine is not available in Fastgraph/Light and has no effect in text
  13191.    video modes.
  13192.  
  13193. See also
  13194.  
  13195.    fg_setclip
  13196.  
  13197.  
  13198.  
  13199.  
  13200.  
  13201.  
  13202.  
  13203.  
  13204.  
  13205.  
  13206.  
  13207.  
  13208.  
  13209.  
  13210.  
  13211.  
  13212.  
  13213.                                       217                                      
  13214. -------------------------------------------------------------------------------
  13215. fg_setcolor
  13216. -------------------------------------------------------------------------------
  13217.  
  13218. Prototype
  13219.  
  13220.    void fg_setcolor (int color);
  13221.    sub FGsetcolor (color%)
  13222.    subroutine fg_setcolor (int color)
  13223.    procedure fg_setcolor (color : integer);
  13224.  
  13225. Description
  13226.  
  13227.    The fg_setcolor routine establishes the current color index (which may be a
  13228.    virtual color index) in graphics modes. In text modes, fg_setcolor provides
  13229.    an alternate method of defining the current text attribute.
  13230.  
  13231. Parameters
  13232.  
  13233.    color defines the current color index (in graphics modes) or text attribute
  13234.    (in text modes). Its value must be between 0 and 255.
  13235.  
  13236. Return value
  13237.  
  13238.    none
  13239.  
  13240. Restrictions
  13241.  
  13242.    none
  13243.  
  13244. See also
  13245.  
  13246.    fg_colors, fg_defcolor, fg_getcolor, fg_setattr
  13247.  
  13248. Examples
  13249.  
  13250.    3-1 to 3-8, 3-10
  13251.  
  13252.  
  13253.  
  13254.  
  13255.  
  13256.  
  13257.  
  13258.  
  13259.  
  13260.  
  13261.  
  13262.  
  13263.  
  13264.  
  13265.  
  13266.  
  13267.  
  13268.  
  13269.  
  13270.  
  13271.  
  13272.                                       218                                      
  13273. -------------------------------------------------------------------------------
  13274. fg_setdacs
  13275. -------------------------------------------------------------------------------
  13276.  
  13277. Prototype
  13278.  
  13279.    void fg_setdacs (int start, int count, char *values);
  13280.    sub FGsetdacs (start%, count%, values$)
  13281.    subroutine fg_setdacs (int start, int count, int1 values)
  13282.    procedure fg_setdacs (start, count : integer; var values : shortint);
  13283.  
  13284. Description
  13285.  
  13286.    The fg_setdacs routine defines the values of a block of contiguous video
  13287.    DAC registers by specifying their red, green, and blue color components.
  13288.    Defining many DAC registers with fg_setdacs is considerably faster than
  13289.    doing so individually with fg_setrgb.
  13290.  
  13291. Parameters
  13292.  
  13293.    start is the starting video DAC register number, between 0 and 255.
  13294.  
  13295.    count is the number of contiguous DAC registers to define, between 1 and
  13296.    256. If the sum of start and count exceeds 256, the register numbers wrap
  13297.    around and resume with register number 0.
  13298.  
  13299.    values is the name of the array containing the color components. The first
  13300.    three bytes of this array must contain the red, green, and blue components
  13301.    for DAC register start, the next three bytes contain the components for
  13302.    register start+1, and so forth. The size of the values array must be at
  13303.    least 3*count bytes.
  13304.  
  13305. Return value
  13306.  
  13307.    none
  13308.  
  13309. Restrictions
  13310.  
  13311.    This routine has no effect in text modes, or in CGA, Tandy, and Hercules
  13312.    graphics modes. In modes 13 to 16, it is meaningful only when run on a VGA
  13313.    or SVGA system; its results are unpredictable in these modes when run on an
  13314.    EGA. You can use fg_testmode(18,0) to check for a VGA or SVGA system.
  13315.  
  13316. See also
  13317.  
  13318.    fg_getdacs, fg_getrgb, fg_setrgb
  13319.  
  13320. Examples
  13321.  
  13322.    5-12
  13323.  
  13324.  
  13325.  
  13326.  
  13327.  
  13328.  
  13329.  
  13330.  
  13331.                                       219                                      
  13332. -------------------------------------------------------------------------------
  13333. fg_setentry
  13334. -------------------------------------------------------------------------------
  13335.  
  13336. Prototype
  13337.  
  13338.    void fg_setentry (int page_number, int page_addr, int page_type);
  13339.    sub FGsetentry (page_number%, page_addr%, page_type%)
  13340.    subroutine fg_setentry (int page_number, int page_addr, int page_type)
  13341.    procedure fg_setentry (page_number, page_addr, page_type : integer);
  13342.  
  13343. Description
  13344.  
  13345.    The fg_setentry routine specifies the type and address of a physical,
  13346.    virtual, or logical video page. For logical pages, it further specifies if
  13347.    the page resides in conventional, expanded, or extended memory. This
  13348.    routine is useful for saving virtual or logical page contents across video
  13349.    mode changes, or for manual creation of virtual and logical pages.
  13350.  
  13351. Parameters
  13352.  
  13353.    page_number is the number of the video page being defined. It must be
  13354.    between 0 and 63.
  13355.  
  13356.    page_addr is the address of the specified page. For physical pages, virtual
  13357.    pages, and logical pages in conventional memory, the address is an ordinary
  13358.    segment address. For logical pages in EMS or XMS memory, the page address
  13359.    is an EMS or XMS handle.
  13360.  
  13361.    page_type is a code indicating the page type. See the description of
  13362.    fg_getentry for valid page type values.
  13363.  
  13364. Return value
  13365.  
  13366.    none
  13367.  
  13368. Restrictions
  13369.  
  13370.    none
  13371.  
  13372. See also
  13373.  
  13374.    fg_getentry
  13375.  
  13376. Examples
  13377.  
  13378.    8-12, 8-13
  13379.  
  13380.  
  13381.  
  13382.  
  13383.  
  13384.  
  13385.  
  13386.  
  13387.  
  13388.  
  13389.  
  13390.                                       220                                      
  13391. -------------------------------------------------------------------------------
  13392. fg_setfunc
  13393. -------------------------------------------------------------------------------
  13394.  
  13395. Prototype
  13396.  
  13397.    void fg_setfunc (int mode);
  13398.    sub FGsetfunc (mode%)
  13399.    subroutine fg_setfunc (int mode)
  13400.    procedure fg_setfunc (mode : integer);
  13401.  
  13402. Description
  13403.  
  13404.    The fg_setfunc routine specifies the logical operation applied when video
  13405.    memory changes in 16-color EGA/VGA/SVGA graphics modes. Replacement mode is
  13406.    selected after you use fg_setmode to establish a video mode.
  13407.  
  13408. Parameters
  13409.  
  13410.    mode defines the logical operation, as shown here:
  13411.  
  13412.                      value of        logical
  13413.                        mode         operation
  13414.  
  13415.                          0         replacement
  13416.                          1             and
  13417.                          2             or
  13418.                          3        exclusive or
  13419.  
  13420. Return value
  13421.  
  13422.    none
  13423.  
  13424. Restrictions
  13425.  
  13426.    This routine only functions in 16-color EGA/VGA/SVGA graphics video modes
  13427.    (modes 13 through 18, 28, and 29). It always applies to video memory, even
  13428.    when a virtual buffer is active.
  13429.  
  13430. Examples
  13431.  
  13432.    12-3, 17-2
  13433.  
  13434.  
  13435.  
  13436.  
  13437.  
  13438.  
  13439.  
  13440.  
  13441.  
  13442.  
  13443.  
  13444.  
  13445.  
  13446.  
  13447.  
  13448.  
  13449.                                       221                                      
  13450. -------------------------------------------------------------------------------
  13451. fg_sethpage
  13452. -------------------------------------------------------------------------------
  13453.  
  13454. Prototype
  13455.  
  13456.    void fg_sethpage (int page_number);
  13457.    sub FGsethpage (page_number%)
  13458.    subroutine fg_sethpage (int page_number)
  13459.    procedure fg_sethpage (page_number : integer);
  13460.  
  13461. Description
  13462.  
  13463.    The fg_sethpage routine establishes the hidden video page. It may be a
  13464.    physical or virtual video page. The fg_setmode routine designates video
  13465.    page 0 as the hidden page.
  13466.  
  13467. Parameters
  13468.  
  13469.    page_number is the hidden video page number, between 0 and 63.
  13470.  
  13471. Return value
  13472.  
  13473.    none
  13474.  
  13475. Restrictions
  13476.  
  13477.    This routine has no effect if page_number references a physical video page
  13478.    that does not exist, or a virtual video page that has not been created.
  13479.  
  13480. See also
  13481.  
  13482.    fg_gethpage, fg_setpage, fg_setvpage
  13483.  
  13484. Examples
  13485.  
  13486.    11-2, 11-3, 13-2, 13-5
  13487.  
  13488.  
  13489.  
  13490.  
  13491.  
  13492.  
  13493.  
  13494.  
  13495.  
  13496.  
  13497.  
  13498.  
  13499.  
  13500.  
  13501.  
  13502.  
  13503.  
  13504.  
  13505.  
  13506.  
  13507.  
  13508.                                       222                                      
  13509. -------------------------------------------------------------------------------
  13510. fg_setlines
  13511. -------------------------------------------------------------------------------
  13512.  
  13513. Prototype
  13514.  
  13515.    void fg_setlines (int lines);
  13516.    sub FGsetlines (lines%)
  13517.    subroutine fg_setlines (int lines)
  13518.    procedure fg_setlines (lines : integer);
  13519.  
  13520. Description
  13521.  
  13522.    The fg_setlines routine extends an 80-column text mode to 25, 43, or 50
  13523.    lines per screen. The fg_setmode routine sets the number of lines to 25
  13524.    when establishing an 80-column text mode.
  13525.  
  13526. Parameters
  13527.  
  13528.    lines is the number of text rows per screen. On EGA systems, the value of
  13529.    lines must be 25 or 43. On MCGA systems, it must be 25 or 50. On VGA and
  13530.    SVGA systems, it must be 25, 43, or 50. Any other value is ignored. Before
  13531.    calling fg_setlines, you should call fg_testmode with pages=0 to see if the
  13532.    user's system supports the number of rows needed.
  13533.  
  13534. Return value
  13535.  
  13536.    none
  13537.  
  13538. Restrictions
  13539.  
  13540.    This routine is only meaningful when running in 80-column text modes on
  13541.    EGA, MCGA, VGA, or SVGA systems (in other cases it does nothing).
  13542.  
  13543.    When you call fg_setlines, the visual page must be page 0.
  13544.  
  13545.    Calling fg_setlines makes the text cursor visible.
  13546.  
  13547.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  13548.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  13549.    fg_initxms), you should re-initialize these resources after calling
  13550.    fg_setlines.
  13551.  
  13552. See also
  13553.  
  13554.    fg_getlines, fg_testmode
  13555.  
  13556. Examples
  13557.  
  13558.    3-5
  13559.  
  13560.  
  13561.  
  13562.  
  13563.  
  13564.  
  13565.  
  13566.  
  13567.                                       223                                      
  13568. -------------------------------------------------------------------------------
  13569. fg_setmode
  13570. -------------------------------------------------------------------------------
  13571.  
  13572. Prototype
  13573.  
  13574.    void fg_setmode (int mode_number);
  13575.    sub FGsetmode (mode_number%)
  13576.    subroutine fg_setmode (int mode_number)
  13577.    procedure fg_setmode (mode_number : integer);
  13578.  
  13579. Description
  13580.  
  13581.    The fg_setmode routine establishes a video mode and initializes Fastgraph's
  13582.    internal parameters for that mode. It must be called before any Fastgraph
  13583.    routine that performs video output. A program can call fg_setmode as many
  13584.    times as needed to switch between different video modes.
  13585.  
  13586. Parameters
  13587.  
  13588.    mode_number is the video mode number, between 0 and 29, as shown here:
  13589.  
  13590.    Mode                    No. of        Supported             Supported
  13591.     No. Type   Resolution  Colors        Adapters               Displays
  13592.  
  13593.      0    T       40x25     16/8   CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  13594.      1    T       40x25     16/8   CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  13595.      2    T       80x25     16/8   CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  13596.      3    T       80x25     16/8   CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  13597.      4    G      320x200      4    CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  13598.      5    G      320x200      4    CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  13599.      6    G      640x200    2/16   CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  13600.      7    T       80x25      b/w   MDA,HGC,EGA,VGA,SVGA        Monochrome
  13601.      9    G      320x200     16       Tandy 1000,PCjr             RGB
  13602.     11    G      720x348     b/w            HGC                Monochrome
  13603.     12    G      320x200     b/w            HGC                Monochrome
  13604.     13    G      320x200     16        EGA,VGA,SVGA         RGB,ECD,VGA,SVGA
  13605.     14    G      640x200     16        EGA,VGA,SVGA         RGB,ECD,VGA,SVGA
  13606.     15    G      640x350     b/w       EGA,VGA,SVGA          Mono,VGA,SVGA
  13607.     16    G      640x350    16/64      EGA,VGA,SVGA           ECD,VGA,SVGA
  13608.     17    G      640x480   2/256K      VGA,MCGA,SVGA            VGA,SVGA
  13609.     18    G      640x480   16/256K       VGA,SVGA               VGA,SVGA
  13610.     19    G      320x200  256/256K     VGA,MCGA,SVGA            VGA,SVGA
  13611.     20    G      320x200  256/256K       VGA,SVGA               VGA,SVGA
  13612.     21    G      320x400  256/256K       VGA,SVGA               VGA,SVGA
  13613.     22    G      320x240  256/256K       VGA,SVGA               VGA,SVGA
  13614.     23    G      320x480  256/256K       VGA,SVGA               VGA,SVGA
  13615.     24    G      640x400  256/256K         SVGA                   SVGA
  13616.     25    G      640x480  256/256K         SVGA                   SVGA
  13617.     26    G      800x600  256/256K         SVGA                   SVGA
  13618.     27    G     1024x768  256/256K         SVGA                   SVGA
  13619.     28    G      800x600   16/256K         SVGA                   SVGA
  13620.     29    G     1024x768   16/256K         SVGA                   SVGA
  13621.  
  13622.    For more information about each video mode, including their required
  13623.    display adapters (graphics cards) and monitors, please refer to the
  13624.    Fastgraph User's Guide.
  13625.  
  13626.                                       224                                      
  13627. -------------------------------------------------------------------------------
  13628. fg_setmode (continued)
  13629. -------------------------------------------------------------------------------
  13630.  
  13631. Parameters (continued)
  13632.  
  13633.    The value of mode_number can also be -1, which tells Fastgraph to use the
  13634.    current video mode. This feature is often useful in programs that use only
  13635.    text video modes, programs executed from another program, or terminate and
  13636.    stay resident (TSR) programs.
  13637.  
  13638. Return value
  13639.  
  13640.    none
  13641.  
  13642. Restrictions
  13643.  
  13644.    The fg_setmode routine does not check if the specified video mode is
  13645.    available on the user's system. If necessary, you should first use
  13646.    fg_testmode to do this.
  13647.  
  13648.    SVGA graphics modes (24 to 29) are only available after successfully
  13649.    initializing the SVGA kernel with fg_svgainit.
  13650.  
  13651.    This routine has no effect when a virtual buffer is active.
  13652.  
  13653. See also
  13654.  
  13655.    fg_automode, fg_bestmode, fg_svgainit, fg_testmode
  13656.  
  13657. Examples
  13658.  
  13659.    3-1 to 3-8, 3-10
  13660.  
  13661.  
  13662.  
  13663.  
  13664.  
  13665.  
  13666.  
  13667.  
  13668.  
  13669.  
  13670.  
  13671.  
  13672.  
  13673.  
  13674.  
  13675.  
  13676.  
  13677.  
  13678.  
  13679.  
  13680.  
  13681.  
  13682.  
  13683.  
  13684.  
  13685.                                       225                                      
  13686. -------------------------------------------------------------------------------
  13687. fg_setnum
  13688. -------------------------------------------------------------------------------
  13689.  
  13690. Prototype
  13691.  
  13692.    void fg_setnum (int state);
  13693.    sub FGsetnum (state%)
  13694.    subroutine fg_setnum (int state)
  13695.    procedure fg_setnum (state : integer);
  13696.  
  13697. Description
  13698.  
  13699.    The fg_setnum routine controls the state of the NumLock key.
  13700.  
  13701. Parameters
  13702.  
  13703.    state defines the NumLock key state. If state is 0, the NumLock key is
  13704.    turned off. If it is 1, the NumLock key is turned on.
  13705.  
  13706. Return value
  13707.  
  13708.    none
  13709.  
  13710. Restrictions
  13711.  
  13712.    On most keyboards, changing the NumLock key state will also change the
  13713.    keyboard state light to reflect the new key state. However, some older
  13714.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  13715.    update the state light. This makes the state light inconsistent with the
  13716.    true key state.
  13717.  
  13718. See also
  13719.  
  13720.    fg_capslock, fg_numlock, fg_scrlock, fg_setcaps
  13721.  
  13722. Examples
  13723.  
  13724.    14-4
  13725.  
  13726.  
  13727.  
  13728.  
  13729.  
  13730.  
  13731.  
  13732.  
  13733.  
  13734.  
  13735.  
  13736.  
  13737.  
  13738.  
  13739.  
  13740.  
  13741.  
  13742.  
  13743.  
  13744.                                       226                                      
  13745. -------------------------------------------------------------------------------
  13746. fg_setpage
  13747. -------------------------------------------------------------------------------
  13748.  
  13749. Prototype
  13750.  
  13751.    void fg_setpage (int page_number);
  13752.    sub FGsetpage (page_number%)
  13753.    subroutine fg_setpage (int page_number)
  13754.    procedure fg_setpage (page_number : integer);
  13755.  
  13756. Description
  13757.  
  13758.    The fg_setpage routine establishes the active video page. It may be a
  13759.    physical or virtual video page. The fg_setmode routine designates video
  13760.    page 0 as the active page.
  13761.  
  13762. Parameters
  13763.  
  13764.    page_number is the active video page number, between 0 and 63.
  13765.  
  13766. Return value
  13767.  
  13768.    none
  13769.  
  13770. Restrictions
  13771.  
  13772.    This routine has no effect if page_number references a physical video page
  13773.    that does not exist, or a virtual video page that has not been created.
  13774.  
  13775. See also
  13776.  
  13777.    fg_getpage, fg_sethpage, fg_setvpage
  13778.  
  13779. Examples
  13780.  
  13781.    8-1 to 8-9, 8-13, 12-4, 12-5, 12-6, 13-2, 13-9
  13782.  
  13783.  
  13784.  
  13785.  
  13786.  
  13787.  
  13788.  
  13789.  
  13790.  
  13791.  
  13792.  
  13793.  
  13794.  
  13795.  
  13796.  
  13797.  
  13798.  
  13799.  
  13800.  
  13801.  
  13802.  
  13803.                                       227                                      
  13804. -------------------------------------------------------------------------------
  13805. fg_setratio
  13806. -------------------------------------------------------------------------------
  13807.  
  13808. Prototype
  13809.  
  13810.    void fg_setratio (double ratio);
  13811.    sub FGsetratio (ratio#)
  13812.    subroutine fg_setratio (dbl ratio)
  13813.    procedure fg_setratio (ratio : real);
  13814.  
  13815. Description
  13816.  
  13817.    The fg_setratio routine defines the aspect ratio for software characters.
  13818.    The aspect ratio is the ratio of character width to character height. If a
  13819.    program draws software characters before calling fg_setratio, Fastgraph
  13820.    will use its default aspect ratio of 1.
  13821.  
  13822. Parameters
  13823.  
  13824.    ratio is the aspect ratio. It must be greater than zero.
  13825.  
  13826. Return value
  13827.  
  13828.    none
  13829.  
  13830. Restrictions
  13831.  
  13832.    This routine is not available in Fastgraph/Light. Before using this
  13833.    routine, you must use fg_initw and fg_setworld to establish a world space
  13834.    coordinate system.
  13835.  
  13836. See also
  13837.  
  13838.    fg_initw, fg_setangle, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  13839.    fg_swlength, fg_swtext
  13840.  
  13841. Examples
  13842.  
  13843.    7-11
  13844.  
  13845.  
  13846.  
  13847.  
  13848.  
  13849.  
  13850.  
  13851.  
  13852.  
  13853.  
  13854.  
  13855.  
  13856.  
  13857.  
  13858.  
  13859.  
  13860.  
  13861.  
  13862.                                       228                                      
  13863. -------------------------------------------------------------------------------
  13864. fg_setrgb
  13865. -------------------------------------------------------------------------------
  13866.  
  13867. Prototype
  13868.  
  13869.    void fg_setrgb (int number, int red, int green, int blue);
  13870.    sub FGsetrgb (number%, red%, green%, blue%)
  13871.    subroutine fg_setrgb (int number, int red, int green, int blue)
  13872.    procedure fg_setrgb (number, red, green, blue : integer);
  13873.  
  13874. Description
  13875.  
  13876.    The fg_setrgb defines the value of a palette register (in Tandy/PCjr and
  13877.    EGA graphics modes) or video DAC register (in VGA, MCGA, XVGA, and SVGA
  13878.    graphics modes) by specifying its red, green, and blue color components.
  13879.  
  13880. Parameters
  13881.  
  13882.    number is the palette or video DAC register number. If it references a
  13883.    palette register, it must be between 0 and 15 (0 and 1 in mode 17). If it
  13884.    references a video DAC register, it must be between 0 and 255. The value of
  13885.    number may be negative to specify an intense color for that palette
  13886.    register in Tandy/PCjr and 200-line EGA graphics modes.
  13887.  
  13888.    red, green, and blue respectively specify the red, green, and blue
  13889.    components of the specified palette or video DAC register. These values
  13890.    must be 0 or 1 for Tandy/PCjr and 200-line EGA graphics modes, between 0
  13891.    and 3 for 350-line EGA modes, and between 0 and 63 for VGA, MCGA, XVGA, and
  13892.    SVGA modes.
  13893.  
  13894. Return value
  13895.  
  13896.    none
  13897.  
  13898. Restrictions
  13899.  
  13900.    This routine has no effect in text video modes, CGA graphics modes, or
  13901.    Hercules graphics modes.
  13902.  
  13903. See also
  13904.  
  13905.    fg_getrgb, fg_palette, fg_setcolor, fg_setdacs
  13906.  
  13907. Examples
  13908.  
  13909.    5-9, 5-11, 5-13, 5-16, 9-11
  13910.  
  13911.  
  13912.  
  13913.  
  13914.  
  13915.  
  13916.  
  13917.  
  13918.  
  13919.  
  13920.  
  13921.                                       229                                      
  13922. -------------------------------------------------------------------------------
  13923. fg_setsize
  13924. -------------------------------------------------------------------------------
  13925.  
  13926. Prototype
  13927.  
  13928.    void fg_setsize (int size);
  13929.    sub FGsetsize (size%)
  13930.    subroutine fg_setsize (int size)
  13931.    procedure fg_setsize (size : integer);
  13932.  
  13933. Description
  13934.  
  13935.    The fg_setsize routine defines the height of software characters in screen
  13936.    space units. If neither fg_setsize nor fg_setsizew is called, Fastgraph
  13937.    will use its default character height of one world space unit.
  13938.  
  13939. Parameters
  13940.  
  13941.    size is the character height in screen space units.
  13942.  
  13943. Return value
  13944.  
  13945.    none
  13946.  
  13947. Restrictions
  13948.  
  13949.    This routine is not available in Fastgraph/Light. Before using this
  13950.    routine, you must use fg_initw and fg_setworld to establish a world space
  13951.    coordinate system.
  13952.  
  13953. See also
  13954.  
  13955.    fg_initw, fg_setangle, fg_setratio, fg_setsizew, fg_setworld, fg_swchar,
  13956.    fg_swlength, fg_swtext
  13957.  
  13958.  
  13959.  
  13960.  
  13961.  
  13962.  
  13963.  
  13964.  
  13965.  
  13966.  
  13967.  
  13968.  
  13969.  
  13970.  
  13971.  
  13972.  
  13973.  
  13974.  
  13975.  
  13976.  
  13977.  
  13978.  
  13979.  
  13980.                                       230                                      
  13981. -------------------------------------------------------------------------------
  13982. fg_setsizew
  13983. -------------------------------------------------------------------------------
  13984.  
  13985. Prototype
  13986.  
  13987.    void fg_setsizew (double size);
  13988.    sub FGsetsizew (size#)
  13989.    subroutine fg_setsizew (dbl size)
  13990.    procedure fg_setsizew (size : real);
  13991.  
  13992. Description
  13993.  
  13994.    The fg_setsizew routine defines the height of software characters in world
  13995.    space units. If neither fg_setsize nor fg_setsizew is called, Fastgraph
  13996.    will use its default character height of one world space unit.
  13997.  
  13998. Parameters
  13999.  
  14000.    size is the character height in world space units.
  14001.  
  14002. Return value
  14003.  
  14004.    none
  14005.  
  14006. Restrictions
  14007.  
  14008.    This routine is not available in Fastgraph/Light. Before using this
  14009.    routine, you must use fg_initw and fg_setworld to establish a world space
  14010.    coordinate system.
  14011.  
  14012. See also
  14013.  
  14014.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setworld, fg_swchar,
  14015.    fg_swlength, fg_swtext
  14016.  
  14017. Examples
  14018.  
  14019.    7-10, 7-11, 7-12, 7-13
  14020.  
  14021.  
  14022.  
  14023.  
  14024.  
  14025.  
  14026.  
  14027.  
  14028.  
  14029.  
  14030.  
  14031.  
  14032.  
  14033.  
  14034.  
  14035.  
  14036.  
  14037.  
  14038.  
  14039.                                       231                                      
  14040. -------------------------------------------------------------------------------
  14041. fg_setview
  14042. -------------------------------------------------------------------------------
  14043.  
  14044. Prototype
  14045.  
  14046.    void fg_setview (int view_minx, int view_maxx, int view_miny,
  14047.      int view_maxy, int minx, int maxx, int miny, int maxy);
  14048.    sub FGsetview (view_minx%, view_maxx%, view_miny%, view_maxy%, minx%,
  14049.      maxx%, miny%, maxy%)
  14050.    subroutine fg_setview (int view_minx, int view_maxx, int view_miny,
  14051.      int view_maxy, int minx, int maxx, int miny, int maxy)
  14052.    procedure fg_setview (view_minx, view_maxx, view_miny, view_maxy,
  14053.      minx, maxx, miny, maxy : integer);
  14054.  
  14055. Description
  14056.  
  14057.    The fg_setview routine defines a viewport with the specified extremes at
  14058.    the specified screen space position.
  14059.  
  14060. Parameters
  14061.  
  14062.    view_minx is the viewport's left edge in viewport units.
  14063.  
  14064.    view_maxx is the viewport's right edge in viewport units. Its value must be
  14065.    greater than view_minx.
  14066.  
  14067.    view_miny is the viewport's top edge in viewport units.
  14068.  
  14069.    view_maxy is the viewport's bottom edge in viewport units. Its value must
  14070.    be greater than view_miny.
  14071.  
  14072.    minx is the screen space x coordinate corresponding to the viewport's left
  14073.    edge.
  14074.  
  14075.    maxx is the screen space x coordinate corresponding to the viewport's right
  14076.    edge. It must be greater than minx.
  14077.  
  14078.    miny is the screen space y coordinate corresponding to the viewport's top
  14079.    edge.
  14080.  
  14081.    maxy is the screen space y coordinate corresponding to the viewport's
  14082.    bottom edge. It must be greater than miny.
  14083.  
  14084. Return value
  14085.  
  14086.    none
  14087.  
  14088. Restrictions
  14089.  
  14090.    none
  14091.  
  14092. See also
  14093.  
  14094.    fg_getview, fg_xview, fg_yview
  14095.  
  14096.  
  14097.  
  14098.                                       232                                      
  14099. -------------------------------------------------------------------------------
  14100. fg_setview (continued)
  14101. -------------------------------------------------------------------------------
  14102.  
  14103. Examples
  14104.  
  14105.    4-3
  14106.  
  14107.  
  14108.  
  14109.  
  14110.  
  14111.  
  14112.  
  14113.  
  14114.  
  14115.  
  14116.  
  14117.  
  14118.  
  14119.  
  14120.  
  14121.  
  14122.  
  14123.  
  14124.  
  14125.  
  14126.  
  14127.  
  14128.  
  14129.  
  14130.  
  14131.  
  14132.  
  14133.  
  14134.  
  14135.  
  14136.  
  14137.  
  14138.  
  14139.  
  14140.  
  14141.  
  14142.  
  14143.  
  14144.  
  14145.  
  14146.  
  14147.  
  14148.  
  14149.  
  14150.  
  14151.  
  14152.  
  14153.  
  14154.  
  14155.  
  14156.  
  14157.                                       233                                      
  14158. -------------------------------------------------------------------------------
  14159. fg_setvpage
  14160. -------------------------------------------------------------------------------
  14161.  
  14162. Prototype
  14163.  
  14164.    void fg_setvpage (int page_number);
  14165.    sub FGsetvpage (page_number%)
  14166.    subroutine fg_setvpage (int page_number)
  14167.    procedure fg_setvpage (page_number : integer);
  14168.  
  14169. Description
  14170.  
  14171.    The fg_setvpage routine establishes the visual video page. It may be a
  14172.    physical or virtual video page, but not a logical page. The fg_setmode
  14173.    routine designates video page 0 as the visual page.
  14174.  
  14175. Parameters
  14176.  
  14177.    page_number is the visual video page number, between 0 and 63.
  14178.  
  14179. Return value
  14180.  
  14181.    none
  14182.  
  14183. Restrictions
  14184.  
  14185.    This routine has no effect if page_number references a physical video page
  14186.    that does not exist, or a virtual video page that has not been created.
  14187.  
  14188. See also
  14189.  
  14190.    fg_getpage, fg_sethpage, fg_setpage
  14191.  
  14192. Examples
  14193.  
  14194.    8-1 to 8-8, 12-6, 13-9
  14195.  
  14196.  
  14197.  
  14198.  
  14199.  
  14200.  
  14201.  
  14202.  
  14203.  
  14204.  
  14205.  
  14206.  
  14207.  
  14208.  
  14209.  
  14210.  
  14211.  
  14212.  
  14213.  
  14214.  
  14215.  
  14216.                                       234                                      
  14217. -------------------------------------------------------------------------------
  14218. fg_setworld
  14219. -------------------------------------------------------------------------------
  14220.  
  14221. Prototype
  14222.  
  14223.    void fg_setworld (double xmin, double xmax, double ymin, double ymax);
  14224.    sub FGsetworld (xmin#, xmax#, ymin#, ymax#)
  14225.    subroutine fg_setworld (dbl xmin, dbl xmax, dbl ymin, dbl ymax)
  14226.    procedure fg_setworld (xmin, xmax, ymin, ymax : real);
  14227.  
  14228. Description
  14229.  
  14230.    The fg_setworld routine defines the world space coordinates that correspond
  14231.    to the physical edges of the screen.
  14232.  
  14233. Parameters
  14234.  
  14235.    xmin is the world space coordinate of the screen's left edge.
  14236.  
  14237.    xmax is the world space coordinate of the screen's right edge. It must be
  14238.    greater than the value of xmin.
  14239.  
  14240.    ymin is the world space coordinate of the screen's bottom edge.
  14241.  
  14242.    ymax is the world space coordinate of the screen's top edge. It must be
  14243.    greater than the value of ymin.
  14244.  
  14245. Return value
  14246.  
  14247.    none
  14248.  
  14249. Restrictions
  14250.  
  14251.    This routine is not available in Fastgraph/Light. Before using this
  14252.    routine, you must call fg_initw to initialize Fastgraph's world space
  14253.    parameters.
  14254.  
  14255. See also
  14256.  
  14257.    fg_getworld, fg_initw, fg_setview
  14258.  
  14259. Examples
  14260.  
  14261.    4-4, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  14262.  
  14263.  
  14264.  
  14265.  
  14266.  
  14267.  
  14268.  
  14269.  
  14270.  
  14271.  
  14272.  
  14273.  
  14274.  
  14275.                                       235                                      
  14276. -------------------------------------------------------------------------------
  14277. fg_shear
  14278. -------------------------------------------------------------------------------
  14279.  
  14280. Prototype
  14281.  
  14282.    void fg_shear (char *source, char *dest, int width, int height,
  14283.      int new_size, int type);
  14284.    sub FGshear (source$, dest$, width%, height%, new_size%, type%)
  14285.    subroutine fg_shear (int1 source, int1 dest, int width, int height,
  14286.      int new_size, int type)
  14287.    procedure fg_shear (var source, dest; width, height, new_size, type :
  14288.      integer);
  14289.  
  14290. Description
  14291.  
  14292.    The fg_shear routine shears a bitmapped image stored in the "one pixel per
  14293.    byte" format.
  14294.  
  14295. Parameters
  14296.  
  14297.    source is the name of the array containing the "one pixel per byte"
  14298.    bitmapped image to be sheared.
  14299.  
  14300.    dest is the name of the array that will receive the resulting sheared
  14301.    image.
  14302.  
  14303.    width is the width of the source image in pixels. It must be greater than
  14304.    zero.
  14305.  
  14306.    height is the height of the source image in pixels. It must be greater than
  14307.    zero.
  14308.  
  14309.    new_size is the width in pixels (for horizontal shears) or height in pixels
  14310.    (for vertical shears) of the resulting dest image. It must be at least as
  14311.    large as the corresponding dimension in the source image.
  14312.  
  14313.    type is a code indicating the shear type and direction, as shown here:
  14314.      0 = horizontal shear to the left (bottom edge is stretched to the right)
  14315.      1 = horizontal shear to the right (top edge is stretched to the right)
  14316.      2 = vertical shear to the left (left edge is stretched up)
  14317.      3 = vertical shear to the right (right edge is stretched up)
  14318.  
  14319. Return value
  14320.  
  14321.    none
  14322.  
  14323. Restrictions
  14324.  
  14325.    In 16-bit modes, the size of the source and dest arrays is limited to 64K
  14326. bytes.
  14327.  
  14328.    The maximum allowable width or height of source and dest is 1,024 pixels.
  14329.  
  14330. See also
  14331.  
  14332.    fg_drwimage, fg_pack, fg_putimage, fg_scale, fg_unpack
  14333.  
  14334.                                       236                                      
  14335. -------------------------------------------------------------------------------
  14336. fg_shear (continued)
  14337. -------------------------------------------------------------------------------
  14338.  
  14339. Examples
  14340.  
  14341.    10-18
  14342.  
  14343.  
  14344.  
  14345.  
  14346.  
  14347.  
  14348.  
  14349.  
  14350.  
  14351.  
  14352.  
  14353.  
  14354.  
  14355.  
  14356.  
  14357.  
  14358.  
  14359.  
  14360.  
  14361.  
  14362.  
  14363.  
  14364.  
  14365.  
  14366.  
  14367.  
  14368.  
  14369.  
  14370.  
  14371.  
  14372.  
  14373.  
  14374.  
  14375.  
  14376.  
  14377.  
  14378.  
  14379.  
  14380.  
  14381.  
  14382.  
  14383.  
  14384.  
  14385.  
  14386.  
  14387.  
  14388.  
  14389.  
  14390.  
  14391.  
  14392.  
  14393.                                       237                                      
  14394. -------------------------------------------------------------------------------
  14395. fg_showflic
  14396. -------------------------------------------------------------------------------
  14397.  
  14398. Prototype
  14399.  
  14400.    int fg_showflic (char *filename, int count, int flags);
  14401.    function FGshowflic% (filename$, count%, flags%)
  14402.    int function fg_showflic (char filename, int count, int flags)
  14403.    function fg_showflic (filename : string; count, flags : integer) : integer;
  14404.  
  14405. Description
  14406.  
  14407.    The fg_showflic routine displays an image stored in an FLI or FLC file
  14408.    (collectively called flic files).
  14409.  
  14410. Parameters
  14411.  
  14412.    filename is the name of the flic file. A device and path name may be
  14413.    included as part of the file name. The file name must be terminated by a
  14414.    zero byte.
  14415.  
  14416.    count is the number of times to display the flic image. If count is zero,
  14417.    the flic plays continuously. You can stop the flic display at any time by
  14418.    pressing the Escape key.
  14419.  
  14420.    flags is a bit mask that controls how the image is displayed.
  14421.      Bit 0
  14422.         0 = delay between frames as indicated in flic header
  14423.         1 = no delay between frames
  14424.      Bit 1
  14425.         0 = display image relative to screen origin
  14426.         1 = display image relative current graphics position
  14427.      Bit 2
  14428.         0 = display image from the specified flic file
  14429.         1 = display image from the fg_imagebuf buffer
  14430.      Bits 3-15 are reserved for future use and should be zero.
  14431.  
  14432. Return value
  14433.  
  14434.    0 = success
  14435.    1 = file not found
  14436.    2 = file is not a flic file
  14437.  
  14438. Restrictions
  14439.  
  14440.    Flic files are only meaningful in 256-color graphics modes. This routine
  14441.    has no effect in other video modes.
  14442.  
  14443. See also
  14444.  
  14445.    fg_flichead, fg_flicmode, fg_flicplay, fg_flicsize, fg_imagebuf
  14446.  
  14447. Examples
  14448.  
  14449.    9-6
  14450.  
  14451.  
  14452.                                       238                                      
  14453. -------------------------------------------------------------------------------
  14454. fg_showgif
  14455. -------------------------------------------------------------------------------
  14456.  
  14457. Prototype
  14458.  
  14459.    int fg_showgif (char *filename, int flags);
  14460.    function FGshowgif% (filename$, flags%)
  14461.    int function fg_showgif (char filename, int flags)
  14462.    function fg_showgif (filename : string; flags : integer) : integer;
  14463.  
  14464. Description
  14465.  
  14466.    The fg_showgif routine displays an image stored in a GIF file.
  14467.  
  14468. Parameters
  14469.  
  14470.    filename specifies the name of the GIF file. A device and path name may be
  14471.    included as part of the file name. The file name must be terminated by a
  14472.    zero byte.
  14473.  
  14474.    flags is a bit mask that controls how the image is displayed.
  14475.      Bit 0
  14476.         0 = use palette values stored in the GIF file
  14477.         1 = use the current palette settings
  14478.      Bit 1
  14479.         0 = display image at position indicated in GIF header
  14480.         1 = display image at current graphics position
  14481.      Bit 2
  14482.         0 = display image from the GIF file
  14483.         1 = display image from the fg_imagebuf buffer
  14484.      Bits 3-15 are reserved for future use and should be zero.
  14485.  
  14486. Return value
  14487.  
  14488.    0 = success
  14489.    1 = file not found
  14490.    2 = file is not a GIF file
  14491.  
  14492. Restrictions
  14493.  
  14494.    This routine has no effect in text video modes, or the CGA and Hercules
  14495.    graphics modes.
  14496.  
  14497.    When displaying a 256-color GIF in a 16-color graphics mode, fg_showgif
  14498.    displays pixels of color c in color c modulo 16.
  14499.  
  14500. See also
  14501.  
  14502.    fg_gifhead, fg_gifmode, fg_gifpal, fg_gifrange, fg_imagebuf, fg_makegif
  14503.  
  14504. Examples
  14505.  
  14506.    9-4
  14507.  
  14508.  
  14509.  
  14510.  
  14511.                                       239                                      
  14512. -------------------------------------------------------------------------------
  14513. fg_showpcx
  14514. -------------------------------------------------------------------------------
  14515.  
  14516. Prototype
  14517.  
  14518.    int fg_showpcx (char *filename, int flags);
  14519.    function FGshowpcx% (filename$, flags%)
  14520.    int function fg_showpcx (char filename, int flags)
  14521.    function fg_showpcx (filename : string; flags : integer) : integer;
  14522.  
  14523. Description
  14524.  
  14525.    The fg_showpcx routine displays an image stored in a PCX file.
  14526.  
  14527. Parameters
  14528.  
  14529.    filename is the name of the PCX file. A device and path name may be
  14530.    included as part of the file name. The file name must be terminated by a
  14531.    null character (that is, a zero byte).
  14532.  
  14533.    flags is a bit mask that controls how the image is displayed.
  14534.      Bit 0
  14535.         0 = use palette values stored in the PCX file
  14536.         1 = use the current palette settings
  14537.      Bit 1
  14538.         0 = display image at position indicated in PCX header
  14539.         1 = display image at current graphics position
  14540.      Bit 2
  14541.         0 = display image from the PCX file
  14542.         1 = display image from the fg_imagebuf buffer
  14543.      Bits 3-15 are reserved for future use and should be zero.
  14544.  
  14545. Return value
  14546.  
  14547.    0 = success
  14548.    1 = file not found
  14549.    2 = file is not a PCX file
  14550.  
  14551. Restrictions
  14552.  
  14553.    PCX files are specific to certain video modes. The following table
  14554.    summarizes the compatible video modes for PCX files.
  14555.  
  14556.                     If PCX file was     You can display
  14557.                     created in mode     it in these modes
  14558.  
  14559.                     4, 5                4, 5
  14560.                     6, 11               6, 11, 13-18, 28, 29
  14561.                     9                   9
  14562.                     13-18               13-18, 28, 29
  14563.                     19-27               19-27
  14564.                     28-29               13-18, 28, 29
  14565.  
  14566.  
  14567.  
  14568.  
  14569.  
  14570.                                       240                                      
  14571. -------------------------------------------------------------------------------
  14572. fg_showpcx (continued)
  14573. -------------------------------------------------------------------------------
  14574.  
  14575. Restrictions (continued)
  14576.  
  14577.    Displaying a PCX file at a lower resolution (for example, a 640x480 PCX
  14578.    file at 320x200) will truncate the display on the right and on the bottom.
  14579.    This effectively displays the upper left corner of the PCX file. If you
  14580.    attempt to display a PCX file in an incompatible video mode, fg_showpcx
  14581.    will still display something, but it will be garbled.
  14582.  
  14583.    The fg_showpcx routine has no effect in text video modes or in the Hercules
  14584.    low-resolution graphics mode.
  14585.  
  14586.    You cannot use fg_showpcx to load a PCX file into a virtual buffer. The
  14587.    fg_loadpcx routine is provided for this purpose.
  14588.  
  14589. See also
  14590.  
  14591.    fg_imagebuf, fg_loadpcx, fg_makepcx, fg_pcxhead, fg_pcxmode, fg_pcxpal,
  14592.    fg_pcxrange
  14593.  
  14594. Examples
  14595.  
  14596.    9-1, 9-12
  14597.  
  14598.  
  14599.  
  14600.  
  14601.  
  14602.  
  14603.  
  14604.  
  14605.  
  14606.  
  14607.  
  14608.  
  14609.  
  14610.  
  14611.  
  14612.  
  14613.  
  14614.  
  14615.  
  14616.  
  14617.  
  14618.  
  14619.  
  14620.  
  14621.  
  14622.  
  14623.  
  14624.  
  14625.  
  14626.  
  14627.  
  14628.  
  14629.                                       241                                      
  14630. -------------------------------------------------------------------------------
  14631. fg_showppr
  14632. -------------------------------------------------------------------------------
  14633.  
  14634. Prototype
  14635.  
  14636.    int fg_showppr (char *filename, int width);
  14637.    function FGshowppr% (filename$, width%)
  14638.    int function fg_showppr (char filename, int width)
  14639.    function fg_showppr (filename : string; width : integer) : integer;
  14640.  
  14641. Description
  14642.  
  14643.    The fg_showppr routine displays an image stored in a packed pixel run (PPR)
  14644.    file. The image will be positioned so that its lower left corner is at the
  14645.    graphics cursor position on the active video page or virtual buffer.
  14646.  
  14647. Parameters
  14648.  
  14649.    filename specifies the name of the PPR file. A device and path name may be
  14650.    included as part of the file name. The file name must be terminated by a
  14651.    zero byte.
  14652.  
  14653.    width is the width of the image in pixels. It must be greater than zero.
  14654.  
  14655. Return value
  14656.  
  14657.    0 = success
  14658.    1 = file not found
  14659.  
  14660. Restrictions
  14661.  
  14662.    This routine has no effect in text video modes.
  14663.  
  14664. See also
  14665.  
  14666.    fg_dispfile, fg_imagebuf, fg_makeppr, fg_pattern, fg_showspr
  14667.  
  14668. Examples
  14669.  
  14670.    9-11
  14671.  
  14672.  
  14673.  
  14674.  
  14675.  
  14676.  
  14677.  
  14678.  
  14679.  
  14680.  
  14681.  
  14682.  
  14683.  
  14684.  
  14685.  
  14686.  
  14687.  
  14688.                                       242                                      
  14689. -------------------------------------------------------------------------------
  14690. fg_showspr
  14691. -------------------------------------------------------------------------------
  14692.  
  14693. Prototype
  14694.  
  14695.    int fg_showspr (char *filename, int width);
  14696.    function FGshowspr% (filename$, width%)
  14697.    int function fg_showspr (char filename, int width)
  14698.    function fg_showspr (filename : string; width : integer) : integer;
  14699.  
  14700. Description
  14701.  
  14702.    The fg_showspr routine displays an image stored in a standard pixel run
  14703.    (SPR) file. The image will be positioned so that its lower left corner is
  14704.    at the graphics cursor position on the active video page or virtual buffer.
  14705.  
  14706. Parameters
  14707.  
  14708.    filename specifies the name of the SPR file. A device and path name may be
  14709.    included as part of the file name. The file name must be terminated by a
  14710.    zero byte.
  14711.  
  14712.    width is the width of the image in pixels. It must be greater than zero.
  14713.  
  14714. Return value
  14715.  
  14716.    0 = success
  14717.    1 = file not found
  14718.  
  14719. Restrictions
  14720.  
  14721.    This routine has no effect in text video modes.
  14722.  
  14723. See also
  14724.  
  14725.    fg_dispfile, fg_imagebuf, fg_makespr, fg_pattern, fg_showppr
  14726.  
  14727. Examples
  14728.  
  14729.    9-9
  14730.  
  14731.  
  14732.  
  14733.  
  14734.  
  14735.  
  14736.  
  14737.  
  14738.  
  14739.  
  14740.  
  14741.  
  14742.  
  14743.  
  14744.  
  14745.  
  14746.  
  14747.                                       243                                      
  14748. -------------------------------------------------------------------------------
  14749. fg_sound
  14750. -------------------------------------------------------------------------------
  14751.  
  14752. Prototype
  14753.  
  14754.    void fg_sound (int frequency, int duration);
  14755.    sub FGsound (frequency%, duration%)
  14756.    subroutine fg_sound (int frequency, int duration)
  14757.    procedure fg_sound (frequency, duration : integer);
  14758.  
  14759. Description
  14760.  
  14761.    The fg_sound routine produces a tone of a specified frequency and duration
  14762.    using the programmable timer.
  14763.  
  14764. Parameters
  14765.  
  14766.    frequency is tone's frequency in Hertz, between 18 and 32,767.
  14767.  
  14768.    duration is the tone's length in clock ticks (there are approximately 18.2
  14769.    clock ticks per second). If duration is zero or negative, the tone is said
  14770.    to be continuous and will play until you stop it with fg_quiet.
  14771.  
  14772. Return value
  14773.  
  14774.    none
  14775.  
  14776. Restrictions
  14777.  
  14778.    This routine has no effect if there is asynchronous sound already in
  14779.    progress.
  14780.  
  14781. See also
  14782.  
  14783.    fg_music, fg_quiet, fg_sounds, fg_voice
  14784.  
  14785. Examples
  14786.  
  14787.    15-1
  14788.  
  14789.  
  14790.  
  14791.  
  14792.  
  14793.  
  14794.  
  14795.  
  14796.  
  14797.  
  14798.  
  14799.  
  14800.  
  14801.  
  14802.  
  14803.  
  14804.  
  14805.  
  14806.                                       244                                      
  14807. -------------------------------------------------------------------------------
  14808. fg_sounds
  14809. -------------------------------------------------------------------------------
  14810.  
  14811. Prototype
  14812.  
  14813.    void fg_sounds (int *sound_array, int ntimes);
  14814.    sub FGsounds (sound_array%(), ntimes%)
  14815.    subroutine fg_sounds (int sound_array, int ntimes)
  14816.    procedure fg_sounds (var sound_array : integer; ntimes : integer);
  14817.  
  14818. Description
  14819.  
  14820.    The fg_sounds routine uses the programmable timer to play a series of tones
  14821.    of specified frequencies and durations, concurrent with other activity. It
  14822.    is the asynchronous version of fg_sound.
  14823.  
  14824. Parameters
  14825.  
  14826.    sound_array is the name of the array containing a series of
  14827.    (frequency,duration) sound definitions. The format of this array is:
  14828.  
  14829.                           [0]    frequency of sound 1
  14830.  
  14831.                           [1]    duration  of sound 1
  14832.  
  14833.                           [2]    frequency of sound 2
  14834.  
  14835.                           [3]    duration  of sound 2
  14836.  
  14837.                                           .
  14838.                                           .
  14839.                                           .
  14840.  
  14841.                        [2n-2]    frequency of sound n
  14842.  
  14843.                        [2n-1]    duration  of sound n
  14844.  
  14845.                          [2n]       terminator (0)
  14846.  
  14847.    Each frequency value is measured in Hertz and must be between 18 and
  14848.    32,767. The durations are measured in clock ticks (there are approximately
  14849.    72.8 clock ticks per second). A null character (that is, a zero byte)
  14850.    terminates the array.
  14851.  
  14852.    ntimes specifies the number of times to cycle through the sounds defined in
  14853.    sound_array. If ntimes is negative, the sounds will play repetitively until
  14854.    stopped with fg_hush or fg_hushnext.
  14855.  
  14856. Return value
  14857.  
  14858.    none
  14859.  
  14860. Restrictions
  14861.  
  14862.    This routine has no effect if there is asynchronous sound already in
  14863.    progress.
  14864.  
  14865.                                       245                                      
  14866. -------------------------------------------------------------------------------
  14867. fg_sounds (continued)
  14868. -------------------------------------------------------------------------------
  14869.  
  14870. Restrictions (continued)
  14871.  
  14872.    To expand the range of sound effects, Fastgraph temporarily quadruples the
  14873.    clock tick interrupt rate from 18.2 to 72.8 ticks per second while
  14874.    producing asynchronous sound. Because many disk controllers rely on the
  14875.    18.2 tick per second clock rate to synchronize disk accesses, your programs
  14876.    should not perform any disk operations when asynchronous sound is in
  14877.    progress.
  14878.  
  14879.    In 16-bit modes, the size of sound_array is limited to 64K bytes.
  14880.  
  14881. See also
  14882.  
  14883.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sound, fg_voice, fg_voices
  14884.  
  14885. Examples
  14886.  
  14887.    15-4
  14888.  
  14889.  
  14890.  
  14891.  
  14892.  
  14893.  
  14894.  
  14895.  
  14896.  
  14897.  
  14898.  
  14899.  
  14900.  
  14901.  
  14902.  
  14903.  
  14904.  
  14905.  
  14906.  
  14907.  
  14908.  
  14909.  
  14910.  
  14911.  
  14912.  
  14913.  
  14914.  
  14915.  
  14916.  
  14917.  
  14918.  
  14919.  
  14920.  
  14921.  
  14922.  
  14923.  
  14924.                                       246                                      
  14925. -------------------------------------------------------------------------------
  14926. fg_split
  14927. -------------------------------------------------------------------------------
  14928.  
  14929. Prototype
  14930.  
  14931.    void fg_split (int iy);
  14932.    sub FGsplit (iy%)
  14933.    subroutine fg_split (int iy)
  14934.    procedure fg_split (iy : integer);
  14935.  
  14936. Description
  14937.  
  14938.    The fg_split routine enables or disables a split screen environment. When a
  14939.    split screen is enabled, the top portion of the screen (rows 0 through
  14940.    iy-1) will contain a subset of the visual video page. The bottom portion
  14941.    (starting at row iy) will contain the first fg_getmaxy()-iy+1 rows of video
  14942.    page 0.
  14943.  
  14944. Parameters
  14945.  
  14946.    iy is the screen space row number at which the split screen takes effect.
  14947.    To disable a split screen, set iy to the vertical resolution of the current
  14948.    video mode.
  14949.  
  14950. Return value
  14951.  
  14952.    none
  14953.  
  14954. Restrictions
  14955.  
  14956.    This routine is meaningful only in EGA, VGA, MCGA, and XVGA graphics modes
  14957.    (modes 13 to 23) when run on a VGA or SVGA system.
  14958.  
  14959. See also
  14960.  
  14961.    fg_pan, fg_setvpage
  14962.  
  14963. Examples
  14964.  
  14965.    13-9
  14966.  
  14967.  
  14968.  
  14969.  
  14970.  
  14971.  
  14972.  
  14973.  
  14974.  
  14975.  
  14976.  
  14977.  
  14978.  
  14979.  
  14980.  
  14981.  
  14982.  
  14983.                                       247                                      
  14984. -------------------------------------------------------------------------------
  14985. fg_stall
  14986. -------------------------------------------------------------------------------
  14987.  
  14988. Prototype
  14989.  
  14990.    void fg_stall (int delay);
  14991.    sub FGstall (delay%)
  14992.    subroutine fg_stall (int delay)
  14993.    procedure fg_stall (delay : integer);
  14994.  
  14995. Description
  14996.  
  14997.    The fg_stall routine delays a program's execution for a given number of
  14998.    processor-specific delay units. You can use fg_measure to obtain the number
  14999.    of delay units per clock tick for the system being used.
  15000.  
  15001. Parameters
  15002.  
  15003.    delay is the number of delay units to wait.
  15004.  
  15005. Return value
  15006.  
  15007.    none
  15008.  
  15009. Restrictions
  15010.  
  15011.    none
  15012.  
  15013. See also
  15014.  
  15015.    fg_measure, fg_waitfor
  15016.  
  15017. Examples
  15018.  
  15019.    13-9, 16-3
  15020.  
  15021.  
  15022.  
  15023.  
  15024.  
  15025.  
  15026.  
  15027.  
  15028.  
  15029.  
  15030.  
  15031.  
  15032.  
  15033.  
  15034.  
  15035.  
  15036.  
  15037.  
  15038.  
  15039.  
  15040.  
  15041.  
  15042.                                       248                                      
  15043. -------------------------------------------------------------------------------
  15044. fg_suspend
  15045. -------------------------------------------------------------------------------
  15046.  
  15047. Prototype
  15048.  
  15049.    void fg_suspend (void);
  15050.    sub FGsuspend ()
  15051.    subroutine fg_suspend ()
  15052.    procedure fg_suspend;
  15053.  
  15054. Description
  15055.  
  15056.    The fg_suspend routine suspends asynchronous music previously started by
  15057.    fg_musicb. It has no effect if there is no asynchronous music in progress.
  15058.  
  15059. Parameters
  15060.  
  15061.    none
  15062.  
  15063. Return value
  15064.  
  15065.    none
  15066.  
  15067. Restrictions
  15068.  
  15069.    A program must not exit to DOS with music suspended. You must call fg_hush
  15070.    to cancel the music first.
  15071.  
  15072. See also
  15073.  
  15074.    fg_hush, fg_musicb, fg_resume
  15075.  
  15076. Examples
  15077.  
  15078.    15-8
  15079.  
  15080.  
  15081.  
  15082.  
  15083.  
  15084.  
  15085.  
  15086.  
  15087.  
  15088.  
  15089.  
  15090.  
  15091.  
  15092.  
  15093.  
  15094.  
  15095.  
  15096.  
  15097.  
  15098.  
  15099.  
  15100.  
  15101.                                       249                                      
  15102. -------------------------------------------------------------------------------
  15103. fg_svgainit
  15104. -------------------------------------------------------------------------------
  15105.  
  15106. Prototype
  15107.  
  15108.    int fg_svgainit (int method);
  15109.    function FGsvgainit% (method%)
  15110.    int function fg_svgainit (int method)
  15111.    function fg_svgainit (method : integer) : integer;
  15112.  
  15113. Description
  15114.  
  15115.    The fg_svgainit routine initializes Fastgraph's SVGA kernel. It must be
  15116.    called before establishing an SVGA graphics mode (modes 24 to 29) with
  15117.    fg_setmode, before testing SVGA video mode availability with fg_bestmode or
  15118.    fg_testmode, or before calling fg_memory.
  15119.  
  15120. Parameters
  15121.  
  15122.    method specifies how to initialize the SVGA kernel. If method is 0, the
  15123.    SVGA kernel performs a chipset autodetect, giving chipset-specific code
  15124.    precedence over the VESA BIOS. If method is 1, the SVGA kernel also
  15125.    performs an autodetect but gives the VESA BIOS precedence over chipset-
  15126.    specific code. If method is 2 or more, the SVGA kernel is initialized for a
  15127.    specific chipset (without testing for presence of that chipset). Refer to
  15128.    Chapter 3 of the Fastgraph User's Guide for a list of supported chipsets.
  15129.  
  15130. Return value
  15131.  
  15132.    For autodetect requests (method = 0 or 1), fg_svgainit returns a value
  15133.    between 1 and 27 corresponding to the SVGA chipset found. A value of 1
  15134.    means a VESA BIOS will be used. A value between 2 and 27 means a specific
  15135.    SVGA chipset will be used. If no VESA BIOS or supported SVGA chipset is
  15136.    found, fg_svgainit returns zero.
  15137.  
  15138.    For specific chipsets, fg_svgainit returns the chipset value passed to it.
  15139.    No checks are made to see if that chipset is actually present.
  15140.  
  15141. Restrictions
  15142.  
  15143.    none
  15144.  
  15145. See also
  15146.  
  15147.    fg_setmode, fg_svgastat
  15148.  
  15149. Examples
  15150.  
  15151.    3-9, 3-10
  15152.  
  15153.  
  15154.  
  15155.  
  15156.  
  15157.  
  15158.  
  15159.  
  15160.                                       250                                      
  15161. -------------------------------------------------------------------------------
  15162. fg_svgastat
  15163. -------------------------------------------------------------------------------
  15164.  
  15165. Prototype
  15166.  
  15167.    int fg_svgastat (void);
  15168.    function FGsvgastat% ()
  15169.    int function fg_svgastat ()
  15170.    function fg_svgastat : integer;
  15171.  
  15172. Description
  15173.  
  15174.    The fg_svgastat routine returns information about the current state of
  15175.    Fastgraph's SVGA kernel.
  15176.  
  15177. Parameters
  15178.  
  15179.    none
  15180.  
  15181. Return value
  15182.  
  15183.    A bit mask containing information about the SVGA kernel.
  15184.      Bit 0
  15185.         0 = SVGA kernel not initialized (all bits will be 0 in this case)
  15186.         1 = SVGA kernel initialized
  15187.      Bit 1
  15188.         0 = VESA support disabled
  15189.         1 = VESA support enabled
  15190.      Bit 2
  15191.         0 = Extended video pages are not available in modes 13-23
  15192.         1 = Extended video pages are available in these modes
  15193.      Bit 3
  15194.         0 = SVGA chipset uses one bank for reading and writing
  15195.         1 = SVGA chipset has separate read and write banks
  15196.      Bits 4-15 are reserved for future use and are all zero.
  15197.  
  15198. Restrictions
  15199.  
  15200.    none
  15201.  
  15202. See also
  15203.  
  15204.    fg_svgainit
  15205.  
  15206. Examples
  15207.  
  15208.    8-8
  15209.  
  15210.  
  15211.  
  15212.  
  15213.  
  15214.  
  15215.  
  15216.  
  15217.  
  15218.  
  15219.                                       251                                      
  15220. -------------------------------------------------------------------------------
  15221. fg_svgaver
  15222. -------------------------------------------------------------------------------
  15223.  
  15224. Prototype
  15225.  
  15226.    void fg_svgaver (int *major, int *minor);
  15227.    sub FGsvgaver (major%, minor%)
  15228.    subroutine fg_svgaver (int major, int minor)
  15229.    procedure fg_svgaver (var major, minor : integer);
  15230.  
  15231. Description
  15232.  
  15233.    The fg_svgaver routine returns the major and minor version numbers for
  15234.    Fastgraph's SVGA kernel.
  15235.  
  15236. Parameters
  15237.  
  15238.    major receives the SVGA kernel major version number.
  15239.  
  15240.    minor receives the SVGA kernel minor version number, expressed in
  15241.    hundredths.
  15242.  
  15243.  
  15244. Return value
  15245.  
  15246.    none
  15247.  
  15248. Restrictions
  15249.  
  15250.    none
  15251.  
  15252. See also
  15253.  
  15254.    fg_svgainit, fg_version
  15255.  
  15256. Examples
  15257.  
  15258.    3-9
  15259.  
  15260.  
  15261.  
  15262.  
  15263.  
  15264.  
  15265.  
  15266.  
  15267.  
  15268.  
  15269.  
  15270.  
  15271.  
  15272.  
  15273.  
  15274.  
  15275.  
  15276.  
  15277.  
  15278.                                       252                                      
  15279. -------------------------------------------------------------------------------
  15280. fg_swchar
  15281. -------------------------------------------------------------------------------
  15282.  
  15283. Prototype
  15284.  
  15285.    void fg_swchar (char *string, int n, int justify);
  15286.    sub FGswchar (string$, n%, justify%)
  15287.    subroutine fg_swchar (char string, int n, int justify)
  15288.    procedure fg_swchar (string : string; n, justify : integer);
  15289.  
  15290. Description
  15291.  
  15292.    The fg_swchar routine displays a string of software characters in the
  15293.    current color index. The string may be left justified, centered, or right
  15294.    justified relative to the graphics cursor.
  15295.  
  15296. Parameters
  15297.  
  15298.    string is the arbitrary-length sequence of characters to display. It may
  15299.    contain special operators, as summarized in the following table.
  15300.  
  15301.                       operatormeaning
  15302.  
  15303.                          \    switch to other font
  15304.                          \^   superscript the next character
  15305.                          \v   subscript the next character
  15306.                          _    begin underlining characters until another
  15307.                               underscore character is encountered
  15308.  
  15309.    n is the number of characters in string, including any special operator
  15310.    characters.
  15311.  
  15312.    justify determines how string is positioned relative to the current
  15313.    position. If justify is negative, string is left justified; if it is zero,
  15314.    string is centered; if it is positive, string is right justified.
  15315.  
  15316. Return value
  15317.  
  15318.    none
  15319.  
  15320. Restrictions
  15321.  
  15322.    Before using this routine, you must use fg_initw and fg_setworld to
  15323.    establish a world space coordinate system. This routine is not available in
  15324.    Fastgraph/Light and has no effect in text video modes.
  15325.  
  15326. See also
  15327.  
  15328.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  15329.    fg_swlength, fg_swtext
  15330.  
  15331. Examples
  15332.  
  15333.    7-10, 7-11
  15334.  
  15335.  
  15336.  
  15337.                                       253                                      
  15338. -------------------------------------------------------------------------------
  15339. fg_swlength
  15340. -------------------------------------------------------------------------------
  15341.  
  15342. Prototype
  15343.  
  15344.    double fg_swlength (char *string, int n);
  15345.    function FGswlength# (string$, n%)
  15346.    dbl function fg_swlength (char string, int n)
  15347.    function fg_swlength (string : string; n : integer) : real;
  15348.  
  15349. Description
  15350.  
  15351.    The fg_swlength routine computes the length of a string of software
  15352.    characters.
  15353.  
  15354. Parameters
  15355.  
  15356.    string is the arbitrary-length sequence of characters for which to compute
  15357.    the length. It may contain special operators used by the fg_swchar and
  15358.    fg_swtext routines.
  15359.  
  15360.    n is the number of characters in string, including any special operator
  15361.    characters.
  15362.  
  15363. Return value
  15364.  
  15365.    The length of string, in world space units.
  15366.  
  15367. Restrictions
  15368.  
  15369.    Before using this routine, you must use fg_initw and fg_setworld to
  15370.    establish a world space coordinate system. This routine is not available in
  15371.    Fastgraph/Light and has no effect in text video modes.
  15372.  
  15373. See also
  15374.  
  15375.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  15376.    fg_swchar, fg_swtext
  15377.  
  15378. Examples
  15379.  
  15380.    7-13
  15381.  
  15382.  
  15383.  
  15384.  
  15385.  
  15386.  
  15387.  
  15388.  
  15389.  
  15390.  
  15391.  
  15392.  
  15393.  
  15394.  
  15395.  
  15396.                                       254                                      
  15397. -------------------------------------------------------------------------------
  15398. fg_swtext
  15399. -------------------------------------------------------------------------------
  15400.  
  15401. Prototype
  15402.  
  15403.    void fg_swtext (char *string, int n, int justify);
  15404.    sub FGswtext (string$, n%, justify%)
  15405.    subroutine fg_swtext (char string, int n, int justify)
  15406.    procedure fg_swtext (string : string; n, justify : integer);
  15407.  
  15408. Description
  15409.  
  15410.    The fg_swtext routine is a scaled down version of fg_swchar. It does not
  15411.    include the alternate font character definitions and thus requires less
  15412.    memory than fg_swchar.
  15413.  
  15414. Parameters
  15415.  
  15416.    string is the arbitrary-length sequence of characters to display. It may
  15417.    contain special operators, as summarized in the following table.
  15418.  
  15419.                       operatormeaning
  15420.  
  15421.                          \^   superscript the next character
  15422.                          \v   subscript the next character
  15423.                          _    begin underlining characters until another
  15424.                               underscore character is encountered
  15425.  
  15426.    n is the number of characters in string, including any special operator
  15427.    characters.
  15428.  
  15429.    justify determines how string is positioned relative to the current
  15430.    position. If justify is negative, string is left justified; if it is zero,
  15431.    string is centered; if it is positive, string is right justified.
  15432.  
  15433. Return value
  15434.  
  15435.    none
  15436.  
  15437. Restrictions
  15438.  
  15439.    Before using this routine, you must use fg_initw and fg_setworld to
  15440.    establish a world space coordinate system. This routine is not available in
  15441.    Fastgraph/Light and has no effect in text video modes.
  15442.  
  15443. See also
  15444.  
  15445.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  15446.    fg_swchar, fg_swlength
  15447.  
  15448. Examples
  15449.  
  15450.    7-12, 7-13
  15451.  
  15452.  
  15453.  
  15454.  
  15455.                                       255                                      
  15456. -------------------------------------------------------------------------------
  15457. fg_tcdefine
  15458. -------------------------------------------------------------------------------
  15459.  
  15460. Prototype
  15461.  
  15462.    void fg_tcdefine (int index, int attribute);
  15463.    sub FGtcdefine (index%, attribute%)
  15464.    subroutine fg_tcdefine (int index, int attribute)
  15465.    procedure fg_tcdefine (index, attribute : integer);
  15466.  
  15467. Description
  15468.  
  15469.    The fg_tcdefine routine defines the transparency attribute of a color index
  15470.    for use with fg_tcxfer and fg_vbtcxfer.
  15471.  
  15472. Parameters
  15473.  
  15474.    index is the color index being defined (between 0 and 255).
  15475.  
  15476.    attribute is the transparency attribute for the color index. If the
  15477.    attribute is 0, the specified color will be opaque (non-transparent). If it
  15478.    is any other value, fg_tcxfer and fg_vbtcxfer will treat the color as
  15479.    transparent.
  15480.  
  15481. Return value
  15482.  
  15483.    none
  15484.  
  15485. Restrictions
  15486.  
  15487.    This routine has no effect in text video modes.
  15488.  
  15489. See also
  15490.  
  15491.    fg_tcmask, fg_tcxfer, fg_vbtcxfer
  15492.  
  15493. Examples
  15494.  
  15495.    11-9
  15496.  
  15497.  
  15498.  
  15499.  
  15500.  
  15501.  
  15502.  
  15503.  
  15504.  
  15505.  
  15506.  
  15507.  
  15508.  
  15509.  
  15510.  
  15511.  
  15512.  
  15513.  
  15514.                                       256                                      
  15515. -------------------------------------------------------------------------------
  15516. fg_tcmask
  15517. -------------------------------------------------------------------------------
  15518.  
  15519. Prototype
  15520.  
  15521.    void fg_tcmask (int mask);
  15522.    sub FGtcmask (mask%)
  15523.    subroutine fg_tcmask (int mask)
  15524.    procedure fg_tcmask (mask : integer);
  15525.  
  15526. Description
  15527.  
  15528.    The fg_tcmask routine defines which of the first 16 color values fg_tcxfer
  15529.    and fg_vbtcxfer will consider transparent. Use fg_tcdefine to control the
  15530.    transparency of colors 17 to 255 in the 256-color graphics modes.
  15531.  
  15532. Parameters
  15533.  
  15534.    mask is a 16-bit mask, where each bit indicates whether or not the
  15535.    corresponding color value is transparent. For example, if bit 0 (the
  15536.    rightmost bit) is 1, then color 0 will be transparent. If bit 0 is 0, color
  15537.    0 will not be transparent.
  15538.  
  15539. Return value
  15540.  
  15541.    none
  15542.  
  15543. Restrictions
  15544.  
  15545.    This routine has no effect in text video modes.
  15546.  
  15547. See also
  15548.  
  15549.    fg_tcdefine, fg_tcxfer, fg_vbtcxfer
  15550.  
  15551. Examples
  15552.  
  15553.    11-8
  15554.  
  15555.  
  15556.  
  15557.  
  15558.  
  15559.  
  15560.  
  15561.  
  15562.  
  15563.  
  15564.  
  15565.  
  15566.  
  15567.  
  15568.  
  15569.  
  15570.  
  15571.  
  15572.  
  15573.                                       257                                      
  15574. -------------------------------------------------------------------------------
  15575. fg_tcxfer
  15576. -------------------------------------------------------------------------------
  15577.  
  15578. Prototype
  15579.  
  15580.    void fg_tcxfer (int minx, int maxx, int miny, int maxy, int newx, int newy,
  15581.      int source_page, int dest_page);
  15582.    sub FGtcxfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  15583.      dest_page%)
  15584.    subroutine fg_tcxfer (int minx, int maxx, int miny, int maxy, int newx,
  15585.      int newy, int source_page, int dest_page)
  15586.    procedure fg_tcxfer (minx, maxx, miny, maxy, newx, newy, source_page,
  15587.      dest_page : integer);
  15588.  
  15589. Description
  15590.  
  15591.    The fg_tcxfer routine copies a rectangular region from any position on any
  15592.    video page to any position on any video page, excluding any pixels whose
  15593.    color is transparent. As with Fastgraph's other block transfer routines, no
  15594.    clipping is performed. The fg_tcdefine and fg_tcmask routines define which
  15595.    colors are transparent.
  15596.  
  15597. Parameters
  15598.  
  15599.    minx is the x coordinate of the source region's left edge. Its value is
  15600.    reduced to a byte boundary if necessary.
  15601.  
  15602.    maxx is the x coordinate of the source region's right edge. It must be
  15603.    greater than or equal to the value of minx. Its value is extended to a byte
  15604.    boundary if necessary.
  15605.  
  15606.    miny is the y coordinate of the source region's top edge.
  15607.  
  15608.    maxy is the y coordinate of the source region's bottom edge. It must be
  15609.    greater than or equal to the value of miny.
  15610.  
  15611.    newx is the x coordinate of the destination region's left edge. Its value
  15612.    is reduced to a byte boundary if necessary.
  15613.  
  15614.    newy is the y coordinate of the destination region's bottom edge.
  15615.  
  15616.    source_page is the video page number containing the source region.
  15617.  
  15618.    dest_page is the video page number for the destination region.
  15619.  
  15620. Return value
  15621.  
  15622.    none
  15623.  
  15624. Restrictions
  15625.  
  15626.    If source_page and dest_page reference the same video page, the source and
  15627.    destination regions must not overlap. This routine has no effect in text
  15628.    video modes.
  15629.  
  15630.  
  15631.  
  15632.                                       258                                      
  15633. -------------------------------------------------------------------------------
  15634. fg_tcxfer (continued)
  15635. -------------------------------------------------------------------------------
  15636.  
  15637. Restrictions (continued)
  15638.  
  15639.    The fg_tcxfer routine always applies to video pages, even when a virtual
  15640.    buffer is active.
  15641.  
  15642. See also
  15643.  
  15644.    fg_tcdefine, fg_tcmask, fg_transfer, fg_vbtccopy, fg_vbtcxfer
  15645.  
  15646. Examples
  15647.  
  15648.    11-8
  15649.  
  15650.  
  15651.  
  15652.  
  15653.  
  15654.  
  15655.  
  15656.  
  15657.  
  15658.  
  15659.  
  15660.  
  15661.  
  15662.  
  15663.  
  15664.  
  15665.  
  15666.  
  15667.  
  15668.  
  15669.  
  15670.  
  15671.  
  15672.  
  15673.  
  15674.  
  15675.  
  15676.  
  15677.  
  15678.  
  15679.  
  15680.  
  15681.  
  15682.  
  15683.  
  15684.  
  15685.  
  15686.  
  15687.  
  15688.  
  15689.  
  15690.  
  15691.                                       259                                      
  15692. -------------------------------------------------------------------------------
  15693. fg_testmode
  15694. -------------------------------------------------------------------------------
  15695.  
  15696. Prototype
  15697.  
  15698.    int fg_testmode (int mode, int pages);
  15699.    function FGtestmode% (mode%, pages%)
  15700.    int function fg_testmode (int mode, int pages)
  15701.    function fg_testmode (mode, pages : integer) : integer;
  15702.  
  15703. Description
  15704.  
  15705.    The fg_testmode routine determines whether or not a specified video mode is
  15706.    available on the user's system. Additionally, fg_testmode can check if
  15707.    there is enough video memory (for physical pages) or random-access memory
  15708.    (for virtual pages) to support the number of video pages needed.
  15709.  
  15710. Parameters
  15711.  
  15712.    mode is the video mode number to test, between 0 and 29. Refer to the
  15713.    description of fg_setmode for a list of available video modes.
  15714.  
  15715.    pages is the number of video pages required (either physical pages, virtual
  15716.    pages, or both). If the pages parameter is zero or negative, fg_testmode
  15717.    checks for availability of the video mode but does not consider video
  15718.    memory requirements.
  15719.  
  15720. Return value
  15721.  
  15722.    If the requested video mode is available (with the requested number of
  15723.    video pages), fg_testmode returns 1. If not, it returns 0.
  15724.  
  15725. Restrictions
  15726.  
  15727.    SVGA graphics modes are available only after successfully initializing the
  15728.    SVGA kernel with fg_svgainit.
  15729.  
  15730.    The fg_testmode routine does not consider extended video pages when testing
  15731.    if the requested number of video pages is available.
  15732.  
  15733. See also
  15734.  
  15735.    fg_automode, fg_bestmode, fg_setmode, fg_svgainit
  15736.  
  15737. Examples
  15738.  
  15739.    3-3, 3-5, 3-8, 3-10, 5-16, 6-7, 6-8
  15740.  
  15741.  
  15742.  
  15743.  
  15744.  
  15745.  
  15746.  
  15747.  
  15748.  
  15749.  
  15750.                                       260                                      
  15751. -------------------------------------------------------------------------------
  15752. fg_text
  15753. -------------------------------------------------------------------------------
  15754.  
  15755. Prototype
  15756.  
  15757.    void fg_text (char *string, int n);
  15758.    sub FGtext (string$, n%)
  15759.    subroutine fg_text (char string, int n)
  15760.    procedure fg_text (string : string; n : integer);
  15761.  
  15762. Description
  15763.  
  15764.    The fg_text routine displays a string of hardware characters, starting at
  15765.    the text cursor position, using the current text attribute (for text modes)
  15766.    or color index (for graphics modes), without clipping. This routine leaves
  15767.    the text cursor one column to the right of the last character displayed (or
  15768.    the first column of the next row if the last character is at the end of a
  15769.    row).
  15770.  
  15771. Parameters
  15772.  
  15773.    string is the arbitrary-length sequence of characters to display.
  15774.  
  15775.    n is the number of characters to display from string.
  15776.  
  15777. Return value
  15778.  
  15779.    none
  15780.  
  15781. Restrictions
  15782.  
  15783.    none
  15784.  
  15785. See also
  15786.  
  15787.    fg_locate, fg_print, fg_setattr, fg_textc
  15788.  
  15789. Examples
  15790.  
  15791.    7-1, 7-2, 7-3, 7-4, 7-5, 7-7, 7-8, 7-9, 7-10
  15792.  
  15793.  
  15794.  
  15795.  
  15796.  
  15797.  
  15798.  
  15799.  
  15800.  
  15801.  
  15802.  
  15803.  
  15804.  
  15805.  
  15806.  
  15807.  
  15808.  
  15809.                                       261                                      
  15810. -------------------------------------------------------------------------------
  15811. fg_textc
  15812. -------------------------------------------------------------------------------
  15813.  
  15814. Prototype
  15815.  
  15816.    void fg_textc (char *string, int n);
  15817.    sub FGtextc (string$, n%)
  15818.    subroutine fg_textc (char string, int n)
  15819.    procedure fg_textc (string : string; n : integer);
  15820.  
  15821. Description
  15822.  
  15823.    The fg_textc routine displays a string of hardware characters, starting at
  15824.    the text cursor position, using the current text attribute (for text modes)
  15825.    or color index (for graphics modes). In graphics modes, only that part of
  15826.    the string that falls within the current clipping limits will be displayed.
  15827.    This routine leaves the text cursor one column to the right of the last
  15828.    character displayed (or the first column of the next row if the last
  15829.    character is at the end of a row).
  15830.  
  15831. Parameters
  15832.  
  15833.    string is the arbitrary-length sequence of characters to display.
  15834.  
  15835.    n The number of characters to display from string.
  15836.  
  15837. Return value
  15838.  
  15839.    none
  15840.  
  15841. Restrictions
  15842.  
  15843.    none
  15844.  
  15845. See also
  15846.  
  15847.    fg_locate, fg_printc, fg_setattr, fg_setclip, fg_text
  15848.  
  15849.  
  15850.  
  15851.  
  15852.  
  15853.  
  15854.  
  15855.  
  15856.  
  15857.  
  15858.  
  15859.  
  15860.  
  15861.  
  15862.  
  15863.  
  15864.  
  15865.  
  15866.  
  15867.  
  15868.                                       262                                      
  15869. -------------------------------------------------------------------------------
  15870. fg_transfer
  15871. -------------------------------------------------------------------------------
  15872.  
  15873. Prototype
  15874.  
  15875.    void fg_transfer (int minx, int maxx, int miny, int maxy, int newx,
  15876.      int newy, int source_page, int dest_page);
  15877.    sub FGtransfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  15878.      dest_page%)
  15879.    subroutine fg_transfer (int minx, int maxx, int miny, int maxy, int newx,
  15880.      int newy, int source_page, int dest_page)
  15881.    procedure fg_transfer (minx, maxx, miny, maxy, newx, newy, source_page,
  15882.      dest_page : integer);
  15883.  
  15884. Description
  15885.  
  15886.    The fg_transfer routine copies a rectangular region from one video page to
  15887.    another, or to a non-overlapping position on the same video page. In text
  15888.    modes, the region is defined in character space; in graphics modes, it is
  15889.    defined in screen space. As with Fastgraph's other block transfer routines,
  15890.    no clipping is performed.
  15891.  
  15892. Parameters
  15893.  
  15894.    minx is the x coordinate of the source region's left edge. In graphics
  15895.    modes, its value is reduced to a byte boundary if necessary.
  15896.  
  15897.    maxx is the x coordinate of the source region's right edge. It must be
  15898.    greater than or equal to the value of minx. In graphics modes, its value is
  15899.    extended to a byte boundary if necessary.
  15900.  
  15901.    miny is the y coordinate of the source region's top edge.
  15902.  
  15903.    maxy is the y coordinate of the source region's bottom edge. It must be
  15904.    greater than or equal to the value of miny.
  15905.  
  15906.    newx is the x coordinate of the destination region's left edge. Its value
  15907.    is reduced to a byte boundary if necessary.
  15908.  
  15909.    newy is the y coordinate of the destination region's bottom edge.
  15910.  
  15911.    source_page is the video page number containing the source region.
  15912.  
  15913.    dest_page is the video page number for the destination region.
  15914.  
  15915. Return value
  15916.  
  15917.    none
  15918.  
  15919. Restrictions
  15920.  
  15921.    If source_page and dest_page reference the same video page, the source and
  15922.    destination regions must not overlap.
  15923.  
  15924.    The fg_transfer routine always applies to video pages, even when a virtual
  15925.    buffer is active.
  15926.  
  15927.                                       263                                      
  15928. -------------------------------------------------------------------------------
  15929. fg_transfer (continued)
  15930. -------------------------------------------------------------------------------
  15931.  
  15932. See also
  15933.  
  15934.    fg_copypage, fg_restore, fg_save, fg_tcxfer, fg_vbcopy
  15935.  
  15936. Examples
  15937.  
  15938.    11-4, 11-5, 11-6, 12-4, 12-5, 12-6
  15939.  
  15940.  
  15941.  
  15942.  
  15943.  
  15944.  
  15945.  
  15946.  
  15947.  
  15948.  
  15949.  
  15950.  
  15951.  
  15952.  
  15953.  
  15954.  
  15955.  
  15956.  
  15957.  
  15958.  
  15959.  
  15960.  
  15961.  
  15962.  
  15963.  
  15964.  
  15965.  
  15966.  
  15967.  
  15968.  
  15969.  
  15970.  
  15971.  
  15972.  
  15973.  
  15974.  
  15975.  
  15976.  
  15977.  
  15978.  
  15979.  
  15980.  
  15981.  
  15982.  
  15983.  
  15984.  
  15985.  
  15986.                                       264                                      
  15987. -------------------------------------------------------------------------------
  15988. fg_unpack
  15989. -------------------------------------------------------------------------------
  15990.  
  15991. Prototype
  15992.  
  15993.    void fg_unpack (char *source, char *dest, int size);
  15994.    sub FGunpack (source$, dest$, size%)
  15995.    subroutine fg_unpack (int1 source, int1 dest, int size)
  15996.    procedure fg_unpack (var source, dest; size : integer);
  15997.  
  15998. Description
  15999.  
  16000.    The fg_unpack routine converts a mode-specific bitmapped image to the "one
  16001.    pixel per byte" format used in 256-color graphics modes and virtual
  16002.    buffers. Refer to the Fastgraph User's Guide for complete information about
  16003.    mode-specific bitmaps.
  16004.  
  16005.    In 256-color graphics modes, or when a virtual buffer is active, fg_unpack
  16006.    merely copies the source array to the dest array.
  16007.  
  16008. Parameters
  16009.  
  16010.    source is the name of the array containing the mode-specific bitmapped
  16011.    image to convert. It is assumed to be in the mode-specific format for the
  16012.    current video mode.
  16013.  
  16014.    dest is the name of the array that will receive the converted bitmapped
  16015.    image.
  16016.  
  16017.    size is the size of the source array in bytes.
  16018.  
  16019. Return value
  16020.  
  16021.    none
  16022.  
  16023. Restrictions
  16024.  
  16025.    In 16-bit modes, the size of the source array is limited to 64K bytes.
  16026.  
  16027.    This routine has no effect in text video modes.
  16028.  
  16029. See also
  16030.  
  16031.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_pack, fg_putimage,
  16032.    fg_revimage, fg_scale, fg_shear
  16033.  
  16034. Examples
  16035.  
  16036.    10-16
  16037.  
  16038.  
  16039.  
  16040.  
  16041.  
  16042.  
  16043.  
  16044.  
  16045.                                       265                                      
  16046. -------------------------------------------------------------------------------
  16047. fg_vbaddr
  16048. -------------------------------------------------------------------------------
  16049.  
  16050. Prototype
  16051.  
  16052.    long fg_vbaddr (int handle);
  16053.    function FGvbaddr& (handle%)
  16054.    int4 function fg_vbaddr (int handle)
  16055.    function fg_vbaddr (handle : integer) : pointer;
  16056.  
  16057. Description
  16058.  
  16059.    The fg_vbaddr routine returns the address of the specified virtual buffer.
  16060.  
  16061. Parameters
  16062.  
  16063.    handle is the handle that references the virtual buffer, between 0 and 31.
  16064.  
  16065. Return value
  16066.  
  16067.    The address of the specified virtual buffer. In 16-bit modes, the address
  16068.    will be a real mode segment:offset pair or protected mode selector:offset
  16069.    pair. In 32-bit modes, it will be an offset into the default data segment.
  16070.  
  16071. Restrictions
  16072.  
  16073.    If handle does not reference a valid virtual buffer handle, the return
  16074.    value will be undefined.
  16075.  
  16076. See also
  16077.  
  16078.    fg_vbopen
  16079.  
  16080.  
  16081.  
  16082.  
  16083.  
  16084.  
  16085.  
  16086.  
  16087.  
  16088.  
  16089.  
  16090.  
  16091.  
  16092.  
  16093.  
  16094.  
  16095.  
  16096.  
  16097.  
  16098.  
  16099.  
  16100.  
  16101.  
  16102.  
  16103.  
  16104.                                       266                                      
  16105. -------------------------------------------------------------------------------
  16106. fg_vballoc
  16107. -------------------------------------------------------------------------------
  16108.  
  16109. Prototype
  16110.  
  16111.    int fg_vballoc (int width, int height);
  16112.    function FGvballoc% (width%, height%)
  16113.    int function fg_vballoc (int width, int height)
  16114.    function fg_vballoc (width, height : integer) : integer;
  16115.  
  16116. Description
  16117.  
  16118.    The fg_vballoc routine creates a virtual buffer of the specified size. The
  16119.    memory for the virtual buffer is allocated automatically. This routine
  16120.    should be used instead of fg_vbdefine for real mode compilers that do not
  16121.    support huge memory blocks (that is, far blocks larger than 64K bytes).
  16122.  
  16123. Parameters
  16124.  
  16125.    width is the width of the virtual buffer in pixels.
  16126.  
  16127.    height is the height of the virtual buffer in pixels.
  16128.  
  16129. Return value
  16130.  
  16131.    If successful, fg_vballoc returns a handle by which the virtual buffer is
  16132.    referenced (between 0 and 31). If unsuccessful, the possible return codes
  16133.    are -1 (virtual buffer table full) or -2 (cannot allocate memory for the
  16134.    virtual buffer).
  16135.  
  16136. Restrictions
  16137.  
  16138.    This routine is present in the Fastgraph real mode libraries only. In
  16139.    protected mode, use fg_vbdefine to create virtual buffers.
  16140.  
  16141.    BASIC programmers must use the SETMEM function to reduce the far heap size
  16142.    by the virtual buffer size plus 16 bytes before creating a virtual buffer
  16143.    with fg_vballoc.
  16144.  
  16145.    Pascal programmers must use the $M directive to reduce the far heap size by
  16146.    the virtual buffer size before calling fg_vballoc.
  16147.  
  16148. See also
  16149.  
  16150.    fg_vbdefine, fg_vbfree, fg_vbinit, fg_vbopen
  16151.  
  16152.  
  16153.  
  16154.  
  16155.  
  16156.  
  16157.  
  16158.  
  16159.  
  16160.  
  16161.  
  16162.  
  16163.                                       267                                      
  16164. -------------------------------------------------------------------------------
  16165. fg_vbclose
  16166. -------------------------------------------------------------------------------
  16167.  
  16168. Prototype
  16169.  
  16170.    void fg_vbclose (void);
  16171.    sub FGvbclose ()
  16172.    subroutine fg_vbclose ()
  16173.    procedure fg_vbclose;
  16174.  
  16175. Description
  16176.  
  16177.    The fg_vbclose routine closes the active virtual buffer and directs
  16178.    graphics output back to the active video page.
  16179.  
  16180. Parameters
  16181.  
  16182.    none
  16183.  
  16184. Return value
  16185.  
  16186.    none
  16187.  
  16188. Restrictions
  16189.  
  16190.    none
  16191.  
  16192. See also
  16193.  
  16194.    fg_vbopen
  16195.  
  16196. Examples
  16197.  
  16198.    8-14, 8-15, 8-16, 8-17, 9-2, 10-16, 10-19, 11-7, 11-9, 13-8
  16199.  
  16200.  
  16201.  
  16202.  
  16203.  
  16204.  
  16205.  
  16206.  
  16207.  
  16208.  
  16209.  
  16210.  
  16211.  
  16212.  
  16213.  
  16214.  
  16215.  
  16216.  
  16217.  
  16218.  
  16219.  
  16220.  
  16221.  
  16222.                                       268                                      
  16223. -------------------------------------------------------------------------------
  16224. fg_vbcopy
  16225. -------------------------------------------------------------------------------
  16226.  
  16227. Prototype
  16228.  
  16229.    void fg_vbcopy (int minx, int maxx, int miny, int maxy, int newx, int newy,
  16230.      int source, int dest);
  16231.    sub FGvbcopy (minx%, maxx%, miny%, maxy%, newx%, newy%, source%, dest%)
  16232.    subroutine fg_vbcopy (int minx, int maxx, int miny, int maxy, int newx,
  16233.      int newy, int source, int dest)
  16234.    procedure fg_vbcopy (minx, maxx, miny, maxy, newx, newy, source, dest :
  16235.      integer);
  16236.  
  16237. Description
  16238.  
  16239.    The fg_vbcopy routine copies a rectangular region from one virtual buffer
  16240.    to another, or to a non-overlapping position within the same virtual
  16241.    buffer.
  16242.  
  16243. Parameters
  16244.  
  16245.    minx is the x coordinate of the source region's left edge.
  16246.  
  16247.    maxx is the x coordinate of the source region's right edge. It must be
  16248.    greater than or equal to the value of minx.
  16249.  
  16250.    miny is the y coordinate of the source region's top edge.
  16251.  
  16252.    maxy is the y coordinate of the source region's bottom edge. It must be
  16253.    greater than or equal to the value of miny.
  16254.  
  16255.    newx is the x coordinate of the destination region's left edge.
  16256.  
  16257.    newy is the y coordinate of the destination region's bottom edge.
  16258.  
  16259.    source is the handle for the virtual buffer containing the source region.
  16260.  
  16261.    dest is the handle for the virtual buffer containing the destination
  16262.    region.
  16263.  
  16264. Return value
  16265.  
  16266.    none
  16267.  
  16268. Restrictions
  16269.  
  16270.    If source and dest reference the same virtual buffer, the source and
  16271.    destination regions must not overlap.
  16272.  
  16273. See also
  16274.  
  16275.    fg_vbcut, fg_vbdefine, fg_vbpaste
  16276.  
  16277. Examples
  16278.  
  16279.    11-7
  16280.  
  16281.                                       269                                      
  16282. -------------------------------------------------------------------------------
  16283. fg_vbcut
  16284. -------------------------------------------------------------------------------
  16285.  
  16286. Prototype
  16287.  
  16288.    void fg_vbcut (int minx, int maxx, int miny, int maxy, int newx, int newy);
  16289.    sub FGvbcut (minx%, maxx%, miny%, maxy%, newx%, newy%)
  16290.    subroutine fg_vbcut (int minx, int maxx, int miny, int maxy, int newx,
  16291.      int newy)
  16292.    procedure fg_vbcut (minx, maxx, miny, maxy, newx, newy : integer);
  16293.  
  16294. Description
  16295.  
  16296.    The fg_vbcut routine copies a rectangular region from the active video page
  16297.    to the active virtual buffer.
  16298.  
  16299. Parameters
  16300.  
  16301.    minx is the x coordinate of the source region's left edge.
  16302.  
  16303.    maxx is the x coordinate of the source region's right edge. It must be
  16304.    greater than or equal to the value of minx.
  16305.  
  16306.    miny is the y coordinate of the source region's top edge.
  16307.  
  16308.    maxy is the y coordinate of the source region's bottom edge. It must be
  16309.    greater than or equal to the value of miny.
  16310.  
  16311.    newx is the x coordinate of the destination region's left edge.
  16312.  
  16313.    newy is the y coordinate of the destination region's bottom edge.
  16314.  
  16315. Return value
  16316.  
  16317.    none
  16318.  
  16319. Restrictions
  16320.  
  16321.    none
  16322.  
  16323. See also
  16324.  
  16325.    fg_vbcopy, fg_vbdefine, fg_vbpaste
  16326.  
  16327. Examples
  16328.  
  16329.    8-15, 8-17
  16330.  
  16331.  
  16332.  
  16333.  
  16334.  
  16335.  
  16336.  
  16337.  
  16338.  
  16339.  
  16340.                                       270                                      
  16341. -------------------------------------------------------------------------------
  16342. fg_vbdefine
  16343. -------------------------------------------------------------------------------
  16344.  
  16345. Prototype
  16346.  
  16347.    int fg_vbdefine (char [huge] *buffer, int width, int height);
  16348.    function FGvbdefine% (buffer$, width%, height%)
  16349.    int function fg_vbdefine (int1 [huge] buffer, int width, int height)
  16350.    function fg_vbdefine (buffer : pointer; width, height : integer) : integer;
  16351.  
  16352. Description
  16353.  
  16354.    The fg_vbdefine routine creates a virtual buffer of the specified size.
  16355.  
  16356. Parameters
  16357.  
  16358.    buffer is the address of the virtual buffer. It must reference a memory
  16359.    block of at least width*height bytes. Refer to Chapter 8 of the Fastgraph
  16360.    User's Guide for details about allocating blocks of memory suitable for
  16361.    virtual buffers. Note that buffer is passed by far reference in 16-bit
  16362.    modes except when using BASIC.
  16363.  
  16364.    width is the width of the virtual buffer in pixels.
  16365.  
  16366.    height is the height of the virtual buffer in pixels.
  16367.  
  16368. Return value
  16369.  
  16370.    If successful, fg_vbdefine returns a handle by which the virtual buffer is
  16371.    referenced (between 0 and 31). If unsuccessful, the routine returns -1.
  16372.  
  16373. Restrictions
  16374.  
  16375.    none
  16376.  
  16377. See also
  16378.  
  16379.    fg_vballoc, fg_vbinit, fg_vbopen, fg_vbundef
  16380.  
  16381. Examples
  16382.  
  16383.    8-14, 8-15, 8-16, 8-17, 9-2, 10-16, 10-19, 11-7, 11-9, 13-8
  16384.  
  16385.  
  16386.  
  16387.  
  16388.  
  16389.  
  16390.  
  16391.  
  16392.  
  16393.  
  16394.  
  16395.  
  16396.  
  16397.  
  16398.  
  16399.                                       271                                      
  16400. -------------------------------------------------------------------------------
  16401. fg_vbfree
  16402. -------------------------------------------------------------------------------
  16403.  
  16404. Prototype
  16405.  
  16406.    void fg_vbfree (int handle);
  16407.    sub FGvbfree (handle%)
  16408.    subroutine fg_vbfree (int handle)
  16409.    procedure fg_vbfree (handle : integer);
  16410.  
  16411. Description
  16412.  
  16413.    The fg_vbfree routine releases a virtual buffer's handle and frees the
  16414.    memory allocated to the virtual buffer.
  16415.  
  16416. Parameters
  16417.  
  16418.    handle is the handle that references the virtual buffer to free. Its value
  16419.    must be between 0 and 31 and must not reference the active virtual buffer.
  16420.  
  16421. Return value
  16422.  
  16423.    none
  16424.  
  16425. Restrictions
  16426.  
  16427.    This routine is present in the Fastgraph real mode libraries only.
  16428.  
  16429.    You should use fg_vbfree only with virtual buffers created with fg_vballoc.
  16430.  
  16431.    This routine has no effect if handle references the active virtual buffer.
  16432.  
  16433. See also
  16434.  
  16435.    fg_vballoc
  16436.  
  16437.  
  16438.  
  16439.  
  16440.  
  16441.  
  16442.  
  16443.  
  16444.  
  16445.  
  16446.  
  16447.  
  16448.  
  16449.  
  16450.  
  16451.  
  16452.  
  16453.  
  16454.  
  16455.  
  16456.  
  16457.  
  16458.                                       272                                      
  16459. -------------------------------------------------------------------------------
  16460. fg_vbhandle
  16461. -------------------------------------------------------------------------------
  16462.  
  16463. Prototype
  16464.  
  16465.    int fg_vbhandle (void);
  16466.    function FGvbhandle% ()
  16467.    int function fg_vbhandle ()
  16468.    function fg_vbhandle : integer;
  16469.  
  16470. Description
  16471.  
  16472.    The fg_vbhandle routine returns the handle of the active virtual buffer.
  16473.  
  16474. Parameters
  16475.  
  16476.    none
  16477.  
  16478. Return value
  16479.  
  16480.    The active virtual buffer handle, between 0 and 31. If no virtual buffer is
  16481.    active, the return value is -1.
  16482.  
  16483. Restrictions
  16484.  
  16485.    none
  16486.  
  16487. See also
  16488.  
  16489.    fg_vbopen
  16490.  
  16491.  
  16492.  
  16493.  
  16494.  
  16495.  
  16496.  
  16497.  
  16498.  
  16499.  
  16500.  
  16501.  
  16502.  
  16503.  
  16504.  
  16505.  
  16506.  
  16507.  
  16508.  
  16509.  
  16510.  
  16511.  
  16512.  
  16513.  
  16514.  
  16515.  
  16516.  
  16517.                                       273                                      
  16518. -------------------------------------------------------------------------------
  16519. fg_vbinit
  16520. -------------------------------------------------------------------------------
  16521.  
  16522. Prototype
  16523.  
  16524.    void fg_vbinit (void);
  16525.    sub FGvbinit ()
  16526.    subroutine fg_vbinit ()
  16527.    procedure fg_vbinit;
  16528.  
  16529. Description
  16530.  
  16531.    The fg_vbinit routine initializes Fastgraph's virtual buffer environment.
  16532.    This routine must be called once, before any other routines that reference
  16533.    virtual buffers.
  16534.  
  16535. Parameters
  16536.  
  16537.    none
  16538.  
  16539. Return value
  16540.  
  16541.    none
  16542.  
  16543. Restrictions
  16544.  
  16545.    none
  16546.  
  16547. See also
  16548.  
  16549.    fg_vballoc, fg_vbclose, fg_vbcopy, fg_vbcut, fg_vbdefine, fg_vbfree,
  16550.    fg_vbhandle, fg_vbopen, fg_vbpaste, fg_vbtcxfer, fg_vbundef
  16551.  
  16552. Examples
  16553.  
  16554.    8-14, 8-15, 8-16, 8-17, 9-2, 10-16, 10-19, 11-7, 11-9, 13-8
  16555.  
  16556.  
  16557.  
  16558.  
  16559.  
  16560.  
  16561.  
  16562.  
  16563.  
  16564.  
  16565.  
  16566.  
  16567.  
  16568.  
  16569.  
  16570.  
  16571.  
  16572.  
  16573.  
  16574.  
  16575.  
  16576.                                       274                                      
  16577. -------------------------------------------------------------------------------
  16578. fg_vbopen
  16579. -------------------------------------------------------------------------------
  16580.  
  16581. Prototype
  16582.  
  16583.    int fg_vbopen (int handle);
  16584.    function FGvbopen% (handle%)
  16585.    int function fg_vbopen (int handle)
  16586.    function fg_vbopen (handle : integer) : integer;
  16587.  
  16588. Description
  16589.  
  16590.    The fg_vbopen routine makes an existing virtual buffer the active virtual
  16591.    buffer.
  16592.  
  16593. Parameters
  16594.  
  16595.    handle is the handle of the desired virtual buffer, as returned by
  16596.    fg_vbdefine. Its value must be a valid virtual buffer handle between 0 and
  16597.    31.
  16598.  
  16599. Return value
  16600.  
  16601.     0 = Virtual buffer opened successfully
  16602.    -1 = Invalid virtual buffer handle
  16603.    -2 = No virtual buffer yet defined for specified handle
  16604.  
  16605. Restrictions
  16606.  
  16607.    none
  16608.  
  16609. See also
  16610.  
  16611.    fg_vbclose, fg_vbdefine, fg_vbinit
  16612.  
  16613. Examples
  16614.  
  16615.    8-14, 8-15, 8-16, 8-17, 9-2, 10-16, 10-19, 11-7, 11-9, 13-8
  16616.  
  16617.  
  16618.  
  16619.  
  16620.  
  16621.  
  16622.  
  16623.  
  16624.  
  16625.  
  16626.  
  16627.  
  16628.  
  16629.  
  16630.  
  16631.  
  16632.  
  16633.  
  16634.  
  16635.                                       275                                      
  16636. -------------------------------------------------------------------------------
  16637. fg_vbpaste
  16638. -------------------------------------------------------------------------------
  16639.  
  16640. Prototype
  16641.  
  16642.    void fg_vbpaste (int minx, int maxx, int miny, int maxy, int newx,
  16643.      int newy);
  16644.    sub FGvbcopy (minx%, maxx%, miny%, maxy%, newx%, newy%)
  16645.    subroutine fg_vbpaste (int minx, int maxx, int miny, int maxy, int newx,
  16646.      int newy)
  16647.    procedure fg_vbpaste (minx, maxx, miny, maxy, newx, newy : integer);
  16648.  
  16649. Description
  16650.  
  16651.    The fg_vbpaste routine copies a rectangular region from the active virtual
  16652.    buffer to the active video page.
  16653.  
  16654. Parameters
  16655.  
  16656.    minx is the x coordinate of the source region's left edge.
  16657.  
  16658.    maxx is the x coordinate of the source region's right edge. It must be
  16659.    greater than or equal to the value of minx.
  16660.  
  16661.    miny is the y coordinate of the source region's top edge.
  16662.  
  16663.    maxy is the y coordinate of the source region's bottom edge. It must be
  16664.    greater than or equal to the value of miny.
  16665.  
  16666.    newx is the x coordinate of the destination region's left edge.
  16667.  
  16668.    newy is the y coordinate of the destination region's bottom edge.
  16669.  
  16670. Return value
  16671.  
  16672.    none
  16673.  
  16674. Restrictions
  16675.  
  16676.    none
  16677.  
  16678. See also
  16679.  
  16680.    fg_vbcopy, fg_vbcut, fg_vbdefine, fg_vbtcxfer
  16681.  
  16682. Examples
  16683.  
  16684.    8-14, 8-15, 8-16, 8-17, 9-2, 10-16, 10-19, 11-7, 11-9, 13-8
  16685.  
  16686.  
  16687.  
  16688.  
  16689.  
  16690.  
  16691.  
  16692.  
  16693.  
  16694.                                       276                                      
  16695. -------------------------------------------------------------------------------
  16696. fg_vbtccopy
  16697. -------------------------------------------------------------------------------
  16698.  
  16699. Prototype
  16700.  
  16701.    void fg_vbtccopy (int minx, int maxx, int miny, int maxy, int newx,
  16702.      int newy, int source, int dest);
  16703.    sub FGvbtccopy (minx%, maxx%, miny%, maxy%, newx%, newy%, source%, dest%)
  16704.    subroutine fg_vbtccopy (int minx, int maxx, int miny, int maxy, int newx,
  16705.      int newy, int source, int dest)
  16706.    procedure fg_vbtccopy (minx, maxx, miny, maxy, newx, newy, source, dest :
  16707.      integer);
  16708.  
  16709. Description
  16710.  
  16711.    The fg_vbtccopy routine copies a rectangular region from one virtual buffer
  16712.    to another, or to a non-overlapping position within the same virtual
  16713.    buffer, with transparent colors. Use fg_tcdefine or fg_tcmask to define
  16714.    which colors are transparent.
  16715.  
  16716. Parameters
  16717.  
  16718.    minx is the x coordinate of the source region's left edge.
  16719.  
  16720.    maxx is the x coordinate of the source region's right edge. It must be
  16721.    greater than or equal to the value of minx.
  16722.  
  16723.    miny is the y coordinate of the source region's top edge.
  16724.  
  16725.    maxy is the y coordinate of the source region's bottom edge. It must be
  16726.    greater than or equal to the value of miny.
  16727.  
  16728.    newx is the x coordinate of the destination region's left edge.
  16729.  
  16730.    newy is the y coordinate of the destination region's bottom edge.
  16731.  
  16732.    source is the handle for the virtual buffer containing the source region.
  16733.  
  16734.    dest is the handle for the virtual buffer containing the destination
  16735.    region.
  16736.  
  16737. Return value
  16738.  
  16739.    none
  16740.  
  16741. Restrictions
  16742.  
  16743.    If source and dest reference the same virtual buffer, the source and
  16744.    destination regions must not overlap.
  16745.  
  16746. See also
  16747.  
  16748.    fg_tcdefine, fg_tcmask, fg_tcxfer, fg_vbcopy
  16749.  
  16750.  
  16751.  
  16752.  
  16753.                                       277                                      
  16754. -------------------------------------------------------------------------------
  16755. fg_vbtcxfer
  16756. -------------------------------------------------------------------------------
  16757.  
  16758. Prototype
  16759.  
  16760.    void fg_vbtcxfer (int minx, int maxx, int miny, int maxy, int newx,
  16761.      int newy);
  16762.    sub FGvbtcxfer (minx%, maxx%, miny%, maxy%, newx%, newy%)
  16763.    subroutine fg_vbtcxfer (int minx, int maxx, int miny, int maxy, int newx,
  16764.      int newy)
  16765.    procedure fg_vbtcxfer (minx, maxx, miny, maxy, newx, newy : integer);
  16766.  
  16767. Description
  16768.  
  16769.    The fg_vbtcxfer routine copies a rectangular region from the active virtual
  16770.    buffer to the active video page, excluding any transparent pixels. The
  16771.    fg_tcdefine and fg_tcmask routines define which colors are transparent.
  16772.  
  16773. Parameters
  16774.  
  16775.    minx is the x coordinate of the source region's left edge.
  16776.  
  16777.    maxx is the x coordinate of the source region's right edge. It must be
  16778.    greater than or equal to the value of minx.
  16779.  
  16780.    miny is the y coordinate of the source region's top edge.
  16781.  
  16782.    maxy is the y coordinate of the source region's bottom edge. It must be
  16783.    greater than or equal to the value of miny.
  16784.  
  16785.    newx is the x coordinate of the destination region's left edge.
  16786.  
  16787.    newy is the y coordinate of the destination region's bottom edge.
  16788.  
  16789. Return value
  16790.  
  16791.    none
  16792.  
  16793. Restrictions
  16794.  
  16795.    none
  16796.  
  16797. See also
  16798.  
  16799.    fg_tcdefine, fg_tcmask, fg_tcxfer, fg_vbdefine, fg_vbpaste, fg_vbtccopy
  16800.  
  16801. Examples
  16802.  
  16803.    11-9
  16804.  
  16805.  
  16806.  
  16807.  
  16808.  
  16809.  
  16810.  
  16811.  
  16812.                                       278                                      
  16813. -------------------------------------------------------------------------------
  16814. fg_vbundef
  16815. -------------------------------------------------------------------------------
  16816.  
  16817. Prototype
  16818.  
  16819.    void fg_vbundef (int handle);
  16820.    sub FGvbundef (handle%)
  16821.    subroutine fg_vbundef (int handle)
  16822.    procedure fg_vbundef (handle : integer);
  16823.  
  16824. Description
  16825.  
  16826.    The fg_vbundef routine releases the handle associated with a virtual
  16827.    buffer.
  16828.  
  16829. Parameters
  16830.  
  16831.    handle is the virtual buffer handle to release. Its value must be between 0
  16832.    and 31 and must not reference the active virtual buffer.
  16833.  
  16834. Return value
  16835.  
  16836.    none
  16837.  
  16838. Restrictions
  16839.  
  16840.    This routine has no effect if handle references the active virtual buffer.
  16841.  
  16842. See also
  16843.  
  16844.    fg_vbdefine
  16845.  
  16846.  
  16847.  
  16848.  
  16849.  
  16850.  
  16851.  
  16852.  
  16853.  
  16854.  
  16855.  
  16856.  
  16857.  
  16858.  
  16859.  
  16860.  
  16861.  
  16862.  
  16863.  
  16864.  
  16865.  
  16866.  
  16867.  
  16868.  
  16869.  
  16870.  
  16871.                                       279                                      
  16872. -------------------------------------------------------------------------------
  16873. fg_version
  16874. -------------------------------------------------------------------------------
  16875.  
  16876. Prototype
  16877.  
  16878.    void fg_version (int *major, int *minor);
  16879.    sub FGversion (major%, minor%)
  16880.    subroutine fg_version (int major, int minor)
  16881.    procedure fg_version (var major, minor : integer);
  16882.  
  16883. Description
  16884.  
  16885.    The fg_version routine returns the major and minor version numbers for your
  16886.    copy of Fastgraph or Fastgraph/Light. For example, if you are using
  16887.    Fastgraph version 2.10, the major version number is 2 and the minor version
  16888.    number is 10.
  16889.  
  16890. Parameters
  16891.  
  16892.    major receives the major version number.
  16893.  
  16894.    minor receives the minor version number, expressed in hundredths.
  16895.  
  16896. Return value
  16897.  
  16898.    none
  16899.  
  16900. Restrictions
  16901.  
  16902.    none
  16903.  
  16904. See also
  16905.  
  16906.    fg_svgaver
  16907.  
  16908. Examples
  16909.  
  16910.    1-1
  16911.  
  16912.  
  16913.  
  16914.  
  16915.  
  16916.  
  16917.  
  16918.  
  16919.  
  16920.  
  16921.  
  16922.  
  16923.  
  16924.  
  16925.  
  16926.  
  16927.  
  16928.  
  16929.  
  16930.                                       280                                      
  16931. -------------------------------------------------------------------------------
  16932. fg_vgastate
  16933. -------------------------------------------------------------------------------
  16934.  
  16935. Prototype
  16936.  
  16937.    void fg_vgastate (int option);
  16938.    sub FGvgastate (option%)
  16939.    subroutine fg_vgastate (int option)
  16940.    procedure fg_vgastate (option : integer);
  16941.  
  16942. Description
  16943.  
  16944.    The fg_vgastate routine saves or restores the state of the VGA Graphics
  16945.    Controller and Sequence Controller registers used by Fastgraph. The
  16946.    following items are saved or restored:
  16947.  
  16948.      * Graphics Controller index
  16949.      * Graphics Controller registers 0-8
  16950.      * Sequence Controller index
  16951.      * Sequence Controller register 2
  16952.  
  16953.    If you request a restore operation before performing a save operation,
  16954.    fg_vgastate does nothing.
  16955.  
  16956. Parameters
  16957.  
  16958.    option specifies whether fg_vgastate performs a save or restore operation.
  16959.    If option is zero, the current register values are saved. If it is any
  16960.    other value, the previously saved register values are restored.
  16961.  
  16962. Return value
  16963.  
  16964.    none
  16965.  
  16966. Restrictions
  16967.  
  16968.    This routine is meaningful only in video modes numbered 13 and above when
  16969.    running on a VGA or SVGA system.
  16970.  
  16971.  
  16972.  
  16973.  
  16974.  
  16975.  
  16976.  
  16977.  
  16978.  
  16979.  
  16980.  
  16981.  
  16982.  
  16983.  
  16984.  
  16985.  
  16986.  
  16987.  
  16988.  
  16989.                                       281                                      
  16990. -------------------------------------------------------------------------------
  16991. fg_voice
  16992. -------------------------------------------------------------------------------
  16993.  
  16994. Prototype
  16995.  
  16996.    void fg_voice (int channel, int frequency, int volume, int duration);
  16997.    sub FGvoice (channel%, frequency%, volume%, duration%)
  16998.    subroutine fg_voice (int channel, int frequency, int volume, int duration)
  16999.    procedure fg_voice (channel, frequency, volume, duration : integer);
  17000.  
  17001. Description
  17002.  
  17003.    The fg_voice routine produces a tone of a specified frequency, duration,
  17004.    and volume using one of the TI sound chip's four independent voice
  17005.    channels.
  17006.  
  17007. Parameters
  17008.  
  17009.    channel defines the voice channel or type of noise, as shown here:
  17010.  
  17011.                              value meaning
  17012.  
  17013.                                1   voice channel #1
  17014.                                2   voice channel #2
  17015.                                3   voice channel #3
  17016.                                4   voice channel #4, periodic noise
  17017.                                5   voice channel #4, white noise
  17018.  
  17019.    frequency defines the tone's frequency in Hertz. If channel is 1, 2, or 3,
  17020.    then frequency represents the actual frequency, between 18 and 32,767. If
  17021.    channel is 4 or 5, frequency is instead a value that represents a specific
  17022.    frequency, as shown here:
  17023.  
  17024.                              value frequency
  17025.  
  17026.                                0   512 Hertz
  17027.                                1   1024 Hertz
  17028.                                2   2048 Hertz
  17029.  
  17030.    volume is the tone's volume, between 0 (silent) and 15 (loudest).
  17031.  
  17032.    duration is the tone's length in clock ticks (there are approximately 18.2
  17033.    clock ticks per second). If duration is zero or negative, the tone is said
  17034.    to be continuous and will play until you stop it with fg_quiet.
  17035.  
  17036. Return value
  17037.  
  17038.    none
  17039.  
  17040. Restrictions
  17041.  
  17042.    This routine should only be used on systems equipped with the TI sound chip
  17043.    (namely, the PCjr and Tandy 1000 systems). It has no effect if there is
  17044.    asynchronous sound already in progress.
  17045.  
  17046.  
  17047.  
  17048.                                       282                                      
  17049. -------------------------------------------------------------------------------
  17050. fg_voice (continued)
  17051. -------------------------------------------------------------------------------
  17052.  
  17053. See also
  17054.  
  17055.    fg_music, fg_quiet, fg_sound, fg_voices
  17056.  
  17057. Examples
  17058.  
  17059.    15-2
  17060.  
  17061.  
  17062.  
  17063.  
  17064.  
  17065.  
  17066.  
  17067.  
  17068.  
  17069.  
  17070.  
  17071.  
  17072.  
  17073.  
  17074.  
  17075.  
  17076.  
  17077.  
  17078.  
  17079.  
  17080.  
  17081.  
  17082.  
  17083.  
  17084.  
  17085.  
  17086.  
  17087.  
  17088.  
  17089.  
  17090.  
  17091.  
  17092.  
  17093.  
  17094.  
  17095.  
  17096.  
  17097.  
  17098.  
  17099.  
  17100.  
  17101.  
  17102.  
  17103.  
  17104.  
  17105.  
  17106.  
  17107.                                       283                                      
  17108. -------------------------------------------------------------------------------
  17109. fg_voices
  17110. -------------------------------------------------------------------------------
  17111.  
  17112. Prototype
  17113.  
  17114.    void fg_voices (int *sound_array, int ntimes);
  17115.    sub FGvoices (sound_array%(), ntimes%)
  17116.    subroutine fg_voices (int sound_array, int ntimes)
  17117.    procedure fg_voices (var sound_array : integer; ntimes : integer);
  17118.  
  17119. Description
  17120.  
  17121.    The fg_voices routine uses the TI sound chip to play a series of tones of
  17122.    specified frequencies, durations, and volumes, concurrent with other
  17123.    activity. It is the asynchronous version of fg_voice.
  17124.  
  17125. Parameters
  17126.  
  17127.    sound_array is the name of the array containing a series of (channel,
  17128.    frequency, volume, duration) sound definitions. The format of this array
  17129.    is:
  17130.  
  17131.                           [0]    channel # of sound 1
  17132.  
  17133.                           [1]    frequency of sound 1
  17134.  
  17135.                           [2]    volume    of sound 1
  17136.  
  17137.                           [3]    duration  of sound 1
  17138.  
  17139.                                           .
  17140.                                           .
  17141.                                           .
  17142.  
  17143.                        [4n-4]    channel # of sound n
  17144.  
  17145.                        [4n-3]    frequency of sound n
  17146.  
  17147.                        [4n-2]    volume    of sound n
  17148.  
  17149.                        [4n-1]    duration  of sound n
  17150.  
  17151.                          [4n]       terminator (0)
  17152.  
  17153.    The channel numbers, frequencies, volumes, and durations must be in the
  17154.    same ranges as discussed in the description of fg_voice, except the
  17155.    durations are quadrupled because of the accelerated clock tick interrupt
  17156.    rate (there are 72.8 instead of 18.2 clock ticks per second). A null
  17157.    character (that is, a zero byte) terminates the array.
  17158.  
  17159.    ntimes specifies the number of times to cycle through the sounds defined in
  17160.    sound_array. If ntimes is negative, the sounds will play repetitively until
  17161.    stopped with fg_hush or fg_hushnext.
  17162.  
  17163.  
  17164.  
  17165.  
  17166.                                       284                                      
  17167. -------------------------------------------------------------------------------
  17168. fg_voices (continued)
  17169. -------------------------------------------------------------------------------
  17170.  
  17171. Return value
  17172.  
  17173.    none
  17174.  
  17175. Restrictions
  17176.  
  17177.    This routine should only be used on systems equipped with the TI sound chip
  17178.    (namely, the PCjr and Tandy 1000 systems). It has no effect if there is
  17179.    asynchronous sound already in progress.
  17180.  
  17181.    To expand the range of sound effects, Fastgraph temporarily quadruples the
  17182.    clock tick interrupt rate from 18.2 to 72.8 ticks per second while
  17183.    producing asynchronous sound. Because many disk controllers rely on the
  17184.    18.2 tick per second clock rate to synchronize disk accesses, your programs
  17185.    should not perform any disk operations when asynchronous sound is in
  17186.    progress.
  17187.  
  17188.    In 16-bit modes, the size of sound_array is limited to 64K bytes.
  17189.  
  17190. See also
  17191.  
  17192.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sounds, fg_voice
  17193.  
  17194. Examples
  17195.  
  17196.    15-5
  17197.  
  17198.  
  17199.  
  17200.  
  17201.  
  17202.  
  17203.  
  17204.  
  17205.  
  17206.  
  17207.  
  17208.  
  17209.  
  17210.  
  17211.  
  17212.  
  17213.  
  17214.  
  17215.  
  17216.  
  17217.  
  17218.  
  17219.  
  17220.  
  17221.  
  17222.  
  17223.  
  17224.  
  17225.                                       285                                      
  17226. -------------------------------------------------------------------------------
  17227. fg_waitfor
  17228. -------------------------------------------------------------------------------
  17229.  
  17230. Prototype
  17231.  
  17232.    void fg_waitfor (int ticks);
  17233.    sub FGwaitfor (ticks%)
  17234.    subroutine fg_waitfor (int ticks)
  17235.    procedure fg_waitfor (ticks : integer);
  17236.  
  17237. Description
  17238.  
  17239.    The fg_waitfor routine delays a program's execution for a given number of
  17240.    clock ticks. There are 18.2 clock ticks per second, regardless of the
  17241.    system's processor speed.
  17242.  
  17243. Parameters
  17244.  
  17245.    ticks is the number of clock ticks to wait.
  17246.  
  17247. Return value
  17248.  
  17249.    none
  17250.  
  17251. Restrictions
  17252.  
  17253.    none
  17254.  
  17255. See also
  17256.  
  17257.    fg_stall
  17258.  
  17259. Examples
  17260.  
  17261.    5-11, 5-12, 12-1 to 12-6, 13-5, 13-6, 14-2, 14-5, 14-7, 14-8, 14-12, 14-13,
  17262.    15-1, 15-2, 15-3, 15-6, 15-7, 16-1
  17263.  
  17264.  
  17265.  
  17266.  
  17267.  
  17268.  
  17269.  
  17270.  
  17271.  
  17272.  
  17273.  
  17274.  
  17275.  
  17276.  
  17277.  
  17278.  
  17279.  
  17280.  
  17281.  
  17282.  
  17283.  
  17284.                                       286                                      
  17285. -------------------------------------------------------------------------------
  17286. fg_waitkey
  17287. -------------------------------------------------------------------------------
  17288.  
  17289. Prototype
  17290.  
  17291.    void fg_waitkey (void);
  17292.    sub FGwaitkey ()
  17293.    subroutine fg_waitkey ()
  17294.    procedure fg_waitkey;
  17295.  
  17296. Description
  17297.  
  17298.    The fg_waitkey routine flushes the BIOS keyboard buffer (that is, removes
  17299.    any type-ahead characters) and then waits for another keystroke. It is most
  17300.    useful in "press any key to continue" situations.
  17301.  
  17302. Parameters
  17303.  
  17304.    none
  17305.  
  17306. Return value
  17307.  
  17308.    none
  17309.  
  17310. Restrictions
  17311.  
  17312.    none
  17313.  
  17314. See also
  17315.  
  17316.    fg_getkey, fg_intkey
  17317.  
  17318. Examples
  17319.  
  17320.    3-2 to 3-8, 3-10
  17321.  
  17322.  
  17323.  
  17324.  
  17325.  
  17326.  
  17327.  
  17328.  
  17329.  
  17330.  
  17331.  
  17332.  
  17333.  
  17334.  
  17335.  
  17336.  
  17337.  
  17338.  
  17339.  
  17340.  
  17341.  
  17342.  
  17343.                                       287                                      
  17344. -------------------------------------------------------------------------------
  17345. fg_waitvr
  17346. -------------------------------------------------------------------------------
  17347.  
  17348. Prototype
  17349.  
  17350.    void fg_waitvr (int state);
  17351.    sub FGwaitvr (state%)
  17352.    subroutine fg_waitvr (int state)
  17353.    procedure fg_waitvr (state : integer);
  17354.  
  17355. Description
  17356.  
  17357.    The fg_waitvr routine disables or enables Fastgraph's internal vertical
  17358.    retrace waiting (it is enabled by default). When it is disabled, Fastgraph
  17359.    assumes your application will control the retrace synchronization as
  17360.    needed. Vertical retrace waiting applies to the Fastgraph routines listed
  17361.    in the "see also" section below.
  17362.  
  17363. Parameters
  17364.  
  17365.    state defines whether vertical retrace waiting is enabled or disabled. If
  17366.    state is 0, vertical retrace waiting is disabled. If it is 1, vertical
  17367.    retrace waiting is enabled.
  17368.  
  17369. Return value
  17370.  
  17371.    none
  17372.  
  17373. Restrictions
  17374.  
  17375.    none
  17376.  
  17377. See also
  17378.  
  17379.    fg_getdacs, fg_makegif, fg_makepcx, fg_palettes, fg_pan, fg_setdacs,
  17380.    fg_setvpage, fg_showgif, fg_showpcx
  17381.  
  17382.  
  17383.  
  17384.  
  17385.  
  17386.  
  17387.  
  17388.  
  17389.  
  17390.  
  17391.  
  17392.  
  17393.  
  17394.  
  17395.  
  17396.  
  17397.  
  17398.  
  17399.  
  17400.  
  17401.  
  17402.                                       288                                      
  17403. -------------------------------------------------------------------------------
  17404. fg_where
  17405. -------------------------------------------------------------------------------
  17406.  
  17407. Prototype
  17408.  
  17409.    void fg_where (int *row, int *column);
  17410.    sub FGwhere (row%, column%)
  17411.    subroutine fg_where (int row, int column)
  17412.    procedure fg_where (row, column : integer);
  17413.  
  17414. Description
  17415.  
  17416.    The fg_where routine retrieves the text cursor position for the active
  17417.    display page.
  17418.  
  17419. Parameters
  17420.  
  17421.    row receives the text cursor's current row number, between 0 and one less
  17422.    than the number of character rows available.
  17423.  
  17424.    column receives text cursor's current column number, between 0 and one less
  17425.    than the number of character columns available.
  17426.  
  17427. Return value
  17428.  
  17429.    none
  17430.  
  17431. Restrictions
  17432.  
  17433.    none
  17434.  
  17435. See also
  17436.  
  17437.    fg_locate
  17438.  
  17439. Examples
  17440.  
  17441.    7-2
  17442.  
  17443.  
  17444.  
  17445.  
  17446.  
  17447.  
  17448.  
  17449.  
  17450.  
  17451.  
  17452.  
  17453.  
  17454.  
  17455.  
  17456.  
  17457.  
  17458.  
  17459.  
  17460.  
  17461.                                       289                                      
  17462. -------------------------------------------------------------------------------
  17463. fg_xalpha
  17464. -------------------------------------------------------------------------------
  17465.  
  17466. Prototype
  17467.  
  17468.    int fg_xalpha (int ix);
  17469.    function FGxalpha% (ix%)
  17470.    int function fg_xalpha (int ix)
  17471.    function fg_xalpha (ix : integer) : integer;
  17472.  
  17473. Description
  17474.  
  17475.    The fg_xalpha routine translates a screen space x coordinate to the
  17476.    character space column containing that coordinate.
  17477.  
  17478. Parameters
  17479.  
  17480.    ix is the screen space coordinate to translate.
  17481.  
  17482. Return value
  17483.  
  17484.    The character space column containing the screen space coordinate ix. In
  17485.    text modes, the return value is equal to the value of ix.
  17486.  
  17487. Restrictions
  17488.  
  17489.    none
  17490.  
  17491. See also
  17492.  
  17493.    fg_xconvert, fg_yalpha, fg_yconvert
  17494.  
  17495. Examples
  17496.  
  17497.    14-10
  17498.  
  17499.  
  17500.  
  17501.  
  17502.  
  17503.  
  17504.  
  17505.  
  17506.  
  17507.  
  17508.  
  17509.  
  17510.  
  17511.  
  17512.  
  17513.  
  17514.  
  17515.  
  17516.  
  17517.  
  17518.  
  17519.  
  17520.                                       290                                      
  17521. -------------------------------------------------------------------------------
  17522. fg_xconvert
  17523. -------------------------------------------------------------------------------
  17524.  
  17525. Prototype
  17526.  
  17527.    int fg_xconvert (int column);
  17528.    function FGxconvert% (column%)
  17529.    int function fg_xconvert (int column)
  17530.    function fg_xconvert (column : integer) : integer;
  17531.  
  17532. Description
  17533.  
  17534.    The fg_xconvert routine translates a character space column to the screen
  17535.    space coordinate of its leftmost pixel. In graphics video modes,
  17536.    fg_xconvert(1) is an easy way to determine the width in pixels of a
  17537.    character cell.
  17538.  
  17539. Parameters
  17540.  
  17541.    column is the character space column to translate.
  17542.  
  17543. Return value
  17544.  
  17545.    The screen space x coordinate of the leftmost pixel in the character space
  17546.    column column. In text modes, the return value is equal to the value of
  17547.    column.
  17548.  
  17549. Restrictions
  17550.  
  17551.    none
  17552.  
  17553. See also
  17554.  
  17555.    fg_xalpha, fg_yalpha, fg_yconvert
  17556.  
  17557. Examples
  17558.  
  17559.    7-9, 14-8
  17560.  
  17561.  
  17562.  
  17563.  
  17564.  
  17565.  
  17566.  
  17567.  
  17568.  
  17569.  
  17570.  
  17571.  
  17572.  
  17573.  
  17574.  
  17575.  
  17576.  
  17577.  
  17578.  
  17579.                                       291                                      
  17580. -------------------------------------------------------------------------------
  17581. fg_xscreen
  17582. -------------------------------------------------------------------------------
  17583.  
  17584. Prototype
  17585.  
  17586.    int fg_xscreen (double x);
  17587.    function FGxscreen% (x#)
  17588.    int function fg_xscreen (dbl x)
  17589.    function fg_xscreen (x : real) : integer;
  17590.  
  17591. Description
  17592.  
  17593.    The fg_xscreen routine translates a world space x coordinate to its screen
  17594.    space equivalent.
  17595.  
  17596. Parameters
  17597.  
  17598.    x is the world space coordinate to translate.
  17599.  
  17600. Return value
  17601.  
  17602.    The screen space x coordinate equivalent to the world space coordinate x.
  17603.  
  17604. Restrictions
  17605.  
  17606.    This routine is not available in Fastgraph/Light.
  17607.  
  17608. See also
  17609.  
  17610.    fg_xworld, fg_yscreen, fg_yworld
  17611.  
  17612.  
  17613.  
  17614.  
  17615.  
  17616.  
  17617.  
  17618.  
  17619.  
  17620.  
  17621.  
  17622.  
  17623.  
  17624.  
  17625.  
  17626.  
  17627.  
  17628.  
  17629.  
  17630.  
  17631.  
  17632.  
  17633.  
  17634.  
  17635.  
  17636.  
  17637.  
  17638.                                       292                                      
  17639. -------------------------------------------------------------------------------
  17640. fg_xview
  17641. -------------------------------------------------------------------------------
  17642.  
  17643. Prototype
  17644.  
  17645.    int fg_xview (int vx);
  17646.    function FGxview% (vx%)
  17647.    int function fg_xview (int vx)
  17648.    function fg_xview (vx : integer) : integer;
  17649.  
  17650. Description
  17651.  
  17652.    The fg_xview routine translates a horizontal viewport coordinate to the
  17653.    corresponding screen space x coordinate.
  17654.  
  17655. Parameters
  17656.  
  17657.    vx is the horizontal viewport coordinate to translate.
  17658.  
  17659. Return value
  17660.  
  17661.    The screen space x coordinate corresponding to the specified viewport
  17662.    coordinate. If no viewport has been defined, the return value will be equal
  17663.    to vx.
  17664.  
  17665. Restrictions
  17666.  
  17667.    none
  17668.  
  17669. See also
  17670.  
  17671.    fg_getview, fg_setview, fg_yview
  17672.  
  17673. Examples
  17674.  
  17675.    4-3
  17676.  
  17677.  
  17678.  
  17679.  
  17680.  
  17681.  
  17682.  
  17683.  
  17684.  
  17685.  
  17686.  
  17687.  
  17688.  
  17689.  
  17690.  
  17691.  
  17692.  
  17693.  
  17694.  
  17695.  
  17696.  
  17697.                                       293                                      
  17698. -------------------------------------------------------------------------------
  17699. fg_xworld
  17700. -------------------------------------------------------------------------------
  17701.  
  17702. Prototype
  17703.  
  17704.    double fg_xworld (int ix);
  17705.    function FGxworld# (ix%)
  17706.    dbl function fg_xworld (int ix)
  17707.    function fg_xworld (ix : integer) : real;
  17708.  
  17709. Description
  17710.  
  17711.    The fg_xworld routine translates a screen space x coordinate to its world
  17712.    space equivalent.
  17713.  
  17714. Parameters
  17715.  
  17716.    ix is the screen space coordinate to translate.
  17717.  
  17718. Return value
  17719.  
  17720.    The world space x coordinate equivalent to the screen space coordinate ix.
  17721.  
  17722. Restrictions
  17723.  
  17724.    This routine is not available in Fastgraph/Light.
  17725.  
  17726. See also
  17727.  
  17728.    fg_xscreen, fg_yscreen, fg_yworld
  17729.  
  17730.  
  17731.  
  17732.  
  17733.  
  17734.  
  17735.  
  17736.  
  17737.  
  17738.  
  17739.  
  17740.  
  17741.  
  17742.  
  17743.  
  17744.  
  17745.  
  17746.  
  17747.  
  17748.  
  17749.  
  17750.  
  17751.  
  17752.  
  17753.  
  17754.  
  17755.  
  17756.                                       294                                      
  17757. -------------------------------------------------------------------------------
  17758. fg_yalpha
  17759. -------------------------------------------------------------------------------
  17760.  
  17761. Prototype
  17762.  
  17763.    int fg_yalpha (int iy);
  17764.    function FGyalpha% (iy%)
  17765.    int function fg_yalpha (int iy)
  17766.    function fg_yalpha (iy : integer) : integer;
  17767.  
  17768. Description
  17769.  
  17770.    The fg_yalpha routine translates a screen space y coordinate to the
  17771.    character space row containing that coordinate.
  17772.  
  17773. Parameters
  17774.  
  17775.    iy is the screen space coordinate to translate.
  17776.  
  17777. Return value
  17778.  
  17779.    The character space row containing the screen space coordinate iy. In text
  17780.    modes, the return value is equal to the value of iy.
  17781.  
  17782. Restrictions
  17783.  
  17784.    none
  17785.  
  17786. See also
  17787.  
  17788.    fg_xalpha, fg_xconvert, fg_yconvert
  17789.  
  17790. Examples
  17791.  
  17792.    14-10
  17793.  
  17794.  
  17795.  
  17796.  
  17797.  
  17798.  
  17799.  
  17800.  
  17801.  
  17802.  
  17803.  
  17804.  
  17805.  
  17806.  
  17807.  
  17808.  
  17809.  
  17810.  
  17811.  
  17812.  
  17813.  
  17814.  
  17815.                                       295                                      
  17816. -------------------------------------------------------------------------------
  17817. fg_yconvert
  17818. -------------------------------------------------------------------------------
  17819.  
  17820. Prototype
  17821.  
  17822.    int fg_yconvert (int row);
  17823.    function FGyconvert% (row%)
  17824.    int function fg_yconvert (int row)
  17825.    function fg_yconvert (row : integer) : integer;
  17826.  
  17827. Description
  17828.  
  17829.    The fg_yconvert routine translates a character space row to the screen
  17830.    space coordinate of its top (lowest-numbered) pixel. In graphics video
  17831.    modes, fg_yconvert(1) is an easy way to determine the height in pixels of a
  17832.    character cell.
  17833.  
  17834. Parameters
  17835.  
  17836.    row is the character space row to translate.
  17837.  
  17838. Return value
  17839.  
  17840.    The screen space y coordinate of the top pixel in the character space row
  17841.    row. In text modes, the return value is equal to the value of row.
  17842.  
  17843. Restrictions
  17844.  
  17845.    none
  17846.  
  17847. See also
  17848.  
  17849.    fg_xalpha, fg_xconvert, fg_yalpha
  17850.  
  17851. Examples
  17852.  
  17853.    7-9, 14-8
  17854.  
  17855.  
  17856.  
  17857.  
  17858.  
  17859.  
  17860.  
  17861.  
  17862.  
  17863.  
  17864.  
  17865.  
  17866.  
  17867.  
  17868.  
  17869.  
  17870.  
  17871.  
  17872.  
  17873.  
  17874.                                       296                                      
  17875. -------------------------------------------------------------------------------
  17876. fg_yscreen
  17877. -------------------------------------------------------------------------------
  17878.  
  17879. Prototype
  17880.  
  17881.    int fg_yscreen (double y);
  17882.    function FGyscreen% (y#)
  17883.    int function fg_yscreen (dbl y)
  17884.    function fg_yscreen (y : real) : integer;
  17885.  
  17886. Description
  17887.  
  17888.    The fg_yscreen routine translates a world space y coordinate to its screen
  17889.    space equivalent.
  17890.  
  17891. Parameters
  17892.  
  17893.    y is the world space coordinate to translate.
  17894.  
  17895. Return value
  17896.  
  17897.    The screen space y coordinate equivalent to the world space coordinate y.
  17898.  
  17899. Restrictions
  17900.  
  17901.    This routine is not available in Fastgraph/Light.
  17902.  
  17903. See also
  17904.  
  17905.    fg_xscreen, fg_xworld, fg_yworld
  17906.  
  17907.  
  17908.  
  17909.  
  17910.  
  17911.  
  17912.  
  17913.  
  17914.  
  17915.  
  17916.  
  17917.  
  17918.  
  17919.  
  17920.  
  17921.  
  17922.  
  17923.  
  17924.  
  17925.  
  17926.  
  17927.  
  17928.  
  17929.  
  17930.  
  17931.  
  17932.  
  17933.                                       297                                      
  17934. -------------------------------------------------------------------------------
  17935. fg_yview
  17936. -------------------------------------------------------------------------------
  17937.  
  17938. Prototype
  17939.  
  17940.    int fg_yview (int vy);
  17941.    function FGyview% (vy%)
  17942.    int function fg_yview (int vy)
  17943.    function fg_yview (vy : integer) : integer;
  17944.  
  17945. Description
  17946.  
  17947.    The fg_yview routine translates a vertical viewport coordinate to the
  17948.    corresponding screen space y coordinate.
  17949.  
  17950. Parameters
  17951.  
  17952.    vy is the vertical viewport coordinate to translate.
  17953.  
  17954. Return value
  17955.  
  17956.    The screen space y coordinate corresponding to the specified viewport
  17957.    coordinate. If no viewport has been defined, the return value will be equal
  17958.    to vy.
  17959.  
  17960. Restrictions
  17961.  
  17962.    none
  17963.  
  17964. See also
  17965.  
  17966.    fg_getview, fg_setview, fg_xview
  17967.  
  17968. Examples
  17969.  
  17970.    4-3
  17971.  
  17972.  
  17973.  
  17974.  
  17975.  
  17976.  
  17977.  
  17978.  
  17979.  
  17980.  
  17981.  
  17982.  
  17983.  
  17984.  
  17985.  
  17986.  
  17987.  
  17988.  
  17989.  
  17990.  
  17991.  
  17992.                                       298                                      
  17993. -------------------------------------------------------------------------------
  17994. fg_yworld
  17995. -------------------------------------------------------------------------------
  17996.  
  17997. Prototype
  17998.  
  17999.    double fg_yworld (int iy);
  18000.    function FGyworld# (iy%)
  18001.    dbl function fg_yworld (int iy)
  18002.    function fg_yworld (iy : integer) : real;
  18003.  
  18004. Description
  18005.  
  18006.    The fg_yworld routine translates a screen space y coordinate to its world
  18007.    space equivalent.
  18008.  
  18009. Parameters
  18010.  
  18011.    iy is the screen space coordinate to translate.
  18012.  
  18013. Return value
  18014.  
  18015.    The world space y coordinate equivalent to the screen space coordinate iy.
  18016.  
  18017. Restrictions
  18018.  
  18019.    This routine is not available in Fastgraph/Light.
  18020.  
  18021. See also
  18022.  
  18023.    fg_xscreen, fg_xworld, fg_yscreen
  18024.  
  18025.  
  18026.  
  18027.  
  18028.  
  18029.  
  18030.  
  18031.  
  18032.  
  18033.  
  18034.  
  18035.  
  18036.  
  18037.  
  18038.  
  18039.  
  18040.  
  18041.  
  18042.  
  18043.  
  18044.  
  18045.  
  18046.  
  18047.  
  18048.  
  18049.  
  18050.  
  18051.                                       299
  18052.