home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / msdos / animutil / fastgfx / fg303b / manuals.arj / REF.DOC next >
Text File  |  1993-10-02  |  271KB  |  14,335 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-1993 by Ted Gruber Software.
  25.  
  26. All rights reserved.  No part of this publication may be reproduced, stored
  27. in a retrieval system, or transmitted by any means, electronic, mechanical,
  28. photocopying, recording, or otherwise, without express written permission
  29. from Ted Gruber Software.  The software described in this publication is
  30. furnished under a license agreement and may be used or copied only in
  31. accordance with 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
  36. is subject to change without notice and does not represent a commitment on
  37. the part of Ted Gruber Software.  In no event shall Ted Gruber Software be
  38. liable for any loss of profit or any other commercial damage, including but
  39. not limited to special, incidental, consequential, or other damages resulting
  40. from the use of or the inability to use this product, even if Ted Gruber
  41. Software has been notified of the possibility of such damages.
  42.  
  43.  
  44. First Printing, April 1993
  45.  
  46. Fastgraph version 3.00
  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.                       T a b l e   o f   C o n t e n t s
  58.  
  59. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  60.  
  61. Fastgraph Routines by Category  . . . . . . . . . . . . . . . . . . . . .    1
  62.  
  63. Alphabetical List of Fastgraph Routines . . . . . . . . . . . . . . . . .    2
  64.      fg_allocate  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  65.      fg_alloccms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  66.      fg_allocems  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  67.      fg_allocxms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  68.      fg_automode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  69.      fg_bestmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    9
  70.      fg_box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  71.      fg_boxdepth  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  72.      fg_boxw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
  73.      fg_boxx  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  74.      fg_boxxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
  75.      fg_button  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15
  76.      fg_capslock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   16
  77.      fg_chgattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   17
  78.      fg_chgtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   18
  79.      fg_circle  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  80.      fg_circlef . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   20
  81.      fg_circlefw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   21
  82.      fg_circlew . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   22
  83.      fg_clipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   23
  84.      fg_clpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   24
  85.      fg_clprect . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   25
  86.      fg_clprectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   26
  87.      fg_copypage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   27
  88.      fg_cursor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   28
  89.      fg_dash  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  90.      fg_dashrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   30
  91.      fg_dashrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
  92.      fg_dashw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
  93.      fg_defcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   33
  94.      fg_defpages  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   34
  95.      fg_dispfile  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   35
  96.      fg_display . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
  97.      fg_displayp  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   38
  98.      fg_draw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  99.      fg_drawmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   41
  100.      fg_drawmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
  101.      fg_drawrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   44
  102.      fg_drawrelx  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   45
  103.      fg_drawrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   46
  104.      fg_drawrxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
  105.      fg_draww . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   48
  106.      fg_drawx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   49
  107.      fg_drawxw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   50
  108.      fg_drect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
  109.      fg_drectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   52
  110.      fg_drwimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   53
  111.      fg_egacheck  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   54
  112.      fg_ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   55
  113.      fg_ellipsef  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   56
  114.  
  115.                                      iii
  116.      fg_ellipsew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   57
  117.      fg_ellipsfw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   58
  118.      fg_erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   59
  119.      fg_fadein  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   60
  120.      fg_fadeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   61
  121.      fg_fillpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   62
  122.      fg_flipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   63
  123.      fg_flood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   64
  124.      fg_floodw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   65
  125.      fg_flpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   66
  126.      fg_fontsize  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   67
  127.      fg_freepage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   68
  128.      fg_getaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   69
  129.      fg_getattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   70
  130.      fg_getblock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   71
  131.      fg_getchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   72
  132.      fg_getclock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   73
  133.      fg_getcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   74
  134.      fg_getdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   75
  135.      fg_getentry  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   76
  136.      fg_gethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   77
  137.      fg_getimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   78
  138.      fg_getindex  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   79
  139.      fg_getkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   80
  140.      fg_getlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   81
  141.      fg_getmap  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   82
  142.      fg_getmaxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   83
  143.      fg_getmaxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   84
  144.      fg_getmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   85
  145.      fg_getpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   86
  146.      fg_getpixel  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   87
  147.      fg_getrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   88
  148.      fg_getvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   89
  149.      fg_getworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   90
  150.      fg_getxjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   91
  151.      fg_getxpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   92
  152.      fg_getyjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   93
  153.      fg_getypos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   94
  154.      fg_hush  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  155.      fg_hushnext  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   96
  156.      fg_imagebuf  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   97
  157.      fg_imagesiz  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   98
  158.      fg_initems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   99
  159.      fg_initjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  100
  160.      fg_initw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  101
  161.      fg_initxms . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  102
  162.      fg_inside  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  103
  163.      fg_intjoy  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  104
  164.      fg_intkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  106
  165.      fg_justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  107
  166.      fg_kbinit  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  108
  167.      fg_kbtest  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  109
  168.      fg_locate  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  110
  169.      fg_makegif . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  111
  170.      fg_makepcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  112
  171.      fg_makeppr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  114
  172.      fg_makespr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  115
  173.  
  174.                                       iv
  175.      fg_maprgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  116
  176.      fg_measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  117
  177.      fg_memavail  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  118
  178.      fg_memory  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  119
  179.      fg_mousebut  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  120
  180.      fg_mousecur  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  121
  181.      fg_mousefin  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  122
  182.      fg_mouseini  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  123
  183.      fg_mouselim  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  124
  184.      fg_mousemov  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  125
  185.      fg_mousepos  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  126
  186.      fg_mouseptr  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  127
  187.      fg_mousespd  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  128
  188.      fg_mousevis  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  129
  189.      fg_move  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  130
  190.      fg_moverel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  131
  191.      fg_moverw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  132
  192.      fg_movew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  133
  193.      fg_music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  134
  194.      fg_musicb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  136
  195.      fg_numlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  137
  196.      fg_pagesize  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  138
  197.      fg_paint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  139
  198.      fg_paintw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  140
  199.      fg_palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  141
  200.      fg_palettes  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  143
  201.      fg_pan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  144
  202.      fg_panw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  145
  203.      fg_pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  146
  204.      fg_pcxhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  147
  205.      fg_pcxmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  148
  206.      fg_playing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  149
  207.      fg_point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  150
  208.      fg_pointw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  151
  209.      fg_pointx  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  152
  210.      fg_pointxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  153
  211.      fg_polyfill  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  154
  212.      fg_polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  155
  213.      fg_polygonw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  156
  214.      fg_polyline  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  157
  215.      fg_polyoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  158
  216.      fg_print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  159
  217.      fg_putblock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  160
  218.      fg_putimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  161
  219.      fg_quiet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  162
  220.      fg_rect  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  163
  221.      fg_rectw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  164
  222.      fg_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  165
  223.      fg_resize  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  166
  224.      fg_resize  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  167
  225.      fg_restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  168
  226.      fg_restorew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  169
  227.      fg_resume  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  170
  228.      fg_revimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  171
  229.      fg_revmask . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  172
  230.      fg_save  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  173
  231.      fg_savew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  174
  232.  
  233.                                       v
  234.      fg_scrlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  175
  235.      fg_scroll  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  176
  236.      fg_setangle  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  177
  237.      fg_setattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  178
  238.      fg_setcaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  179
  239.      fg_setclip . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  180
  240.      fg_setclipw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  181
  241.      fg_setcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  182
  242.      fg_setdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  183
  243.      fg_setentry  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  184
  244.      fg_setfunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  185
  245.      fg_sethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  186
  246.      fg_setlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  187
  247.      fg_setmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  188
  248.      fg_setnum  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  190
  249.      fg_setpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  191
  250.      fg_setratio  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  192
  251.      fg_setrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  193
  252.      fg_setsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  194
  253.      fg_setsizew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  195
  254.      fg_setvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  196
  255.      fg_setworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  197
  256.      fg_showgif . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  198
  257.      fg_showpcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  199
  258.      fg_showppr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  201
  259.      fg_showspr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  202
  260.      fg_sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  203
  261.      fg_sounds  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  204
  262.      fg_stall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  206
  263.      fg_suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  207
  264.      fg_svgainit  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  208
  265.      fg_svgastat  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  209
  266.      fg_svgaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  210
  267.      fg_swchar  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  211
  268.      fg_swlength  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  212
  269.      fg_swtext  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  213
  270.      fg_tcdefine  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  214
  271.      fg_tcmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  215
  272.      fg_tcxfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  216
  273.      fg_testmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  218
  274.      fg_text  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  219
  275.      fg_transfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  220
  276.      fg_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  222
  277.      fg_voice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  223
  278.      fg_voices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  225
  279.      fg_waitfor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  227
  280.      fg_waitkey . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  228
  281.      fg_waitvr  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  229
  282.      fg_where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  230
  283.      fg_xalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  231
  284.      fg_xconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  232
  285.      fg_xscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  233
  286.      fg_xworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  234
  287.      fg_yalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  235
  288.      fg_yconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  236
  289.      fg_yscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  237
  290.      fg_yworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  238
  291.  
  292.                                       vi
  293. Introduction
  294.  
  295.      The Fastgraph Reference Manual is a companion publication to the
  296. Fastgraph User's Guide.  Whereas the latter publication is essentially a
  297. detailed tutorial about Fastgraph, the Fastgraph Reference Manual is intended
  298. as a reference for programmers familiar with the product.
  299.  
  300.      This manual has two major parts.  The first part lists the Fastgraph
  301. routines by category; each category corresponds to a chapter in the Fastgraph
  302. User's Guide.  The second part, which occupies the larger portion of this
  303. manual, gives descriptions of each Fastgraph routine in alphabetical order.
  304.  
  305.  
  306. Fastgraph Routines by Category
  307.  
  308.      This section lists the Fastgraph routines by category.  These categories
  309. parallel the chapters in the Fastgraph User's Guide.  The lists in this
  310. section are provided as a general overview of Fastgraph's capabilities.  You
  311. can find detailed information about each Fastgraph routine in the next
  312. section of this manual, and of course in the Fastgraph User's Guide.
  313.  
  314. Video Initialization Routines:  fg_automode, fg_bestmode, fg_cursor,
  315. fg_egacheck, fg_getlines, fg_getmode, fg_memory, fg_reset, fg_setlines,
  316. fg_setmode, fg_svgainit, fg_svgastat, fg_testmode.
  317.  
  318. Coordinate Routines:  fg_getmaxx, fg_getmaxy, fg_getworld, fg_initw,
  319. fg_setworld, fg_xalpha, fg_xconvert, fg_xscreen, fg_xworld, fg_yalpha,
  320. fg_yconvert, fg_yscreen, fg_yworld.
  321.  
  322. Color-Related Routines:  fg_defcolor, fg_getcolor, fg_getdacs, fg_getindex,
  323. fg_getrgb, fg_maprgb, fg_palette, fg_palettes, fg_setattr, fg_setcolor,
  324. fg_setdacs, fg_setrgb.
  325.  
  326. Fundamental Graphics Routines:  fg_box, fg_boxdepth, fg_boxw, fg_boxx,
  327. fg_boxxw, fg_circle, fg_circlef, fg_circlefw, fg_circlew, fg_clprect,
  328. fg_clprectw, fg_dash, fg_dashrel, fg_dashrw, fg_dashw, fg_draw, fg_drawrel,
  329. fg_drawrelx, fg_drawrw, fg_drawrxw, fg_draww, fg_drawx, fg_drawxw, fg_drect,
  330. fg_drectw, fg_ellipse, fg_ellipsef, fg_ellipsew, fg_ellipsfw, fg_erase,
  331. fg_fillpage, fg_flood, fg_floodw, fg_getpixel, fg_getxpos, fg_getypos,
  332. fg_inside, fg_move, fg_moverel, fg_moverw, fg_movew, fg_paint, fg_paintw,
  333. fg_point, fg_pointw, fg_pointx, fg_pointxw, fg_polyfill, fg_polygon,
  334. fg_polygonw, fg_polyline, fg_polyoff, fg_rect, fg_rectw, fg_setclip,
  335. fg_setclipw.
  336.  
  337. Character Display Routines:  fg_chgattr, fg_chgtext, fg_fontsize, fg_getattr,
  338. fg_getchar, fg_justify, fg_locate, fg_print, fg_setangle, fg_setattr,
  339. fg_setcolor, fg_setratio, fg_setsize, fg_setsizew, fg_swchar, fg_swlength,
  340. fg_swtext, fg_text, fg_where, fg_xalpha, fg_xconvert, fg_yalpha, fg_yconvert.
  341.  
  342. Video Page Management Routines:  fg_allocate, fg_alloccms, fg_allocems,
  343. fg_allocxms, fg_copypage, fg_defpages, fg_freepage, fg_getaddr, fg_getentry,
  344. fg_gethpage, fg_getpage, fg_getvpage, fg_initems, fg_initxms, fg_pagesize,
  345. fg_resize, fg_setentry, fg_sethpage, fg_setpage, fg_setvpage.
  346.  
  347. Image File Routines:  fg_dispfile, fg_imagebuf, fg_makegif, fg_makepcx,
  348. fg_makeppr, fg_makespr, fg_pattern, fg_pcxhead, fg_pcxmode, fg_showgif,
  349. fg_showpcx, fg_showppr, fg_showspr.
  350.  
  351.                                       1
  352.  
  353. Bit-Mapped Image Routines:  fg_clipmask, fg_clpimage, fg_display,
  354. fg_displayp, fg_drawmap, fg_drawmask, fg_drwimage, fg_flipmask, fg_flpimage,
  355. fg_getimage, fg_getmap, fg_imagesiz, fg_putimage, fg_revimage, fg_revmask.
  356.  
  357. Block Transfer Routines:  fg_copypage, fg_getblock, fg_putblock, fg_restore,
  358. fg_restorew, fg_save, fg_savew, fg_tcdefine, fg_tcmask, fg_tcxfer,
  359. fg_transfer.
  360.  
  361. Special Effects Routines:  fg_fadein, fg_fadeout, fg_pan, fg_panw, fg_resize,
  362. fg_scroll.
  363.  
  364. Input Routines:  fg_button, fg_capslock, fg_getkey, fg_getxjoy, fg_getyjoy,
  365. fg_initjoy, fg_intjoy, fg_intkey, fg_kbinit, fg_kbtest, fg_mousebut,
  366. fg_mousecur, fg_mousefin, fg_mouseini, fg_mouselim, fg_mousemov, fg_mousepos,
  367. fg_mouseptr, fg_mousespd, fg_mousevis, fg_numlock, fg_scrlock, fg_setcaps,
  368. fg_setnum, fg_waitkey.
  369.  
  370. Sound Routines:  fg_hush, fg_hushnext, fg_music, fg_musicb, fg_playing,
  371. fg_quiet, fg_resume, fg_sound, fg_sounds, fg_suspend, fg_voice, fg_voices.
  372.  
  373. Timing Routines:  fg_getclock, fg_measure, fg_stall, fg_waitfor.
  374.  
  375. Miscellaneous Routines:  fg_memavail, fg_setfunc, fg_svgaver, fg_version,
  376. fg_waitvr.
  377.  
  378.  
  379. Alphabetical List of Fastgraph Routines
  380.  
  381.      This section presents a detailed description of each Fastgraph routine.
  382. Once you're familiar with Fastgraph, you'll probably refer to these
  383. descriptions more often than any other section of the two Fastgraph
  384. publications.
  385.  
  386.      The information presented for each routine includes the following:
  387.  
  388.      - function prototypes or declarations for each supported language
  389.      - a description of the routine itself
  390.      - the number of parameters, their purpose, and their data types
  391.      - the meaning and data type of the routine's return value (if
  392.        any)
  393.      - information about important restrictions pertaining to the
  394.        routine
  395.      - references to similar routines, or other routines that affect
  396.        the routine
  397.      - example programs in the Fastgraph User's Guide that use the
  398.        routine
  399.  
  400.      A prototype specifies the data types of a routine's parameters and
  401. return value.  The description of each Fastgraph routine includes prototypes
  402. for C/C++, BASIC, FORTRAN, and Pascal (in that order).  For example, the
  403. prototypes for the fg_allocate routine are:
  404.  
  405.            int fg_allocate (int page_number);
  406.            function FGallocate% (page_number%)
  407.            i*2 function fg_allocate (i*2 page_number)
  408.            function fg_allocate (page_number : integer) : integer;
  409.  
  410.                                       2
  411.  
  412. The C/C++, BASIC, and Pascal prototypes use the declaration syntax for those
  413. languages.  FORTRAN does not use function prototypes, so we've created our
  414. own prototype syntax for FORTRAN.  In the FORTRAN prototypes, each parameter
  415. is preceded by one of the data type indicators listed in the following table.
  416.  
  417.                      indicator  FORTRAN data type
  418.  
  419.                        C*(*)      CHARACTER*(*)
  420.                         I*1         INTEGER*1
  421.                         I*2         INTEGER*2
  422.                         I*4         INTEGER*4
  423.                         R*8          REAL*8
  424.  
  425. Furthermore, if the routine has a return value, the prototype begins with the
  426. return value's data type indicator followed by the word function.  If the
  427. routine has no return value, the prototype begins with the word subroutine.
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                                       3
  470. fg_allocate
  471.  
  472. Prototype
  473.  
  474.    int fg_allocate (int page_number);
  475.    function FGallocate% (page_number%)
  476.    i*2 function fg_allocate (i*2 page_number)
  477.    function fg_allocate (page_number : integer) : integer;
  478.  
  479. Description
  480.  
  481.    The fg_allocate routine creates a virtual video page.  The amount of memory
  482.    required depends on the current video mode.
  483.  
  484. Parameters
  485.  
  486.    page_number is the number by which the virtual page will be referenced.  It
  487.    must be between 0 and 63.
  488.  
  489. Return value
  490.  
  491.    A status code indicating the success or failure of the virtual page
  492.    creation, as shown below.
  493.  
  494.      0 = virtual page created
  495.      1 = specified page is a physical or logical page
  496.      7 = virtual page created, but memory control blocks were destroyed
  497.      8 = insufficient memory to create the virtual page
  498.  
  499. Restrictions
  500.  
  501.    This routine has no effect if page_number references a physical video page,
  502.    a logical video page, or if used in a video mode that does not support
  503.    virtual video pages.
  504.  
  505. See also
  506.  
  507.    fg_freepage, fg_pagesize
  508.  
  509. Examples
  510.  
  511.    8-3, 8-4, 8-5, 8-6, 8-8, 11-1, 11-2, 11-3, 11-4, 12-4, 12-5, 13-2, 13-5,
  512.    17-1
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.                                       4
  529. fg_alloccms
  530.  
  531. Prototype
  532.  
  533.    int fg_alloccms (int page_number);
  534.    function FGalloccms% (page_number%)
  535.    i*2 function fg_alloccms (i*2 page_number)
  536.    function fg_alloccms (page_number : integer) : integer;
  537.  
  538. Description
  539.  
  540.    The fg_alloccms routine creates a logical page in conventional memory.  The
  541.    amount of memory required depends on the current video mode and video
  542.    buffer dimensions.
  543.  
  544. Parameters
  545.  
  546.    page_number is the number by which the logical page will be referenced.  It
  547.    must be between 1 and 63.
  548.  
  549. Return value
  550.  
  551.     0 = logical page created in conventional memory
  552.    -2 = invalid page number
  553.    -3 = page already created, or page exists as a physical or virtual page
  554.    -4 = insufficient conventional memory to create the page
  555.  
  556. Restrictions
  557.  
  558.    This routine has no effect if page_number references a physical or virtual
  559.    video page.
  560.  
  561.    The only function you can perform with logical pages is copying one entire
  562.    page to another (with fg_copypage).
  563.  
  564. See also
  565.  
  566.    fg_allocems, fg_allocxms, fg_copypage, fg_freepage, fg_pagesize
  567.  
  568. Examples
  569.  
  570.    8-9, 8-11
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.                                       5
  588. fg_allocems
  589.  
  590. Prototype
  591.  
  592.    int fg_allocems (int page_number);
  593.    function FGallocems% (page_number%)
  594.    i*2 function fg_allocems (i*2 page_number)
  595.    function fg_allocems (page_number : integer) : integer;
  596.  
  597. Description
  598.  
  599.    The fg_allocems routine creates a logical page in expanded memory (EMS).
  600.    The amount of memory required depends on the current video mode and video
  601.    buffer dimensions.
  602.  
  603. Parameters
  604.  
  605.    page_number is the number by which the logical page will be referenced.  It
  606.    must be between 1 and 63.
  607.  
  608. Return value
  609.  
  610.     0 = logical page created in expanded memory
  611.    -1 = Expanded Memory Manager not initialized
  612.    -2 = invalid page number
  613.    -3 = page already created, or page exists as a physical or virtual page
  614.    -4 = insufficient expanded memory to create the page
  615.  
  616. Restrictions
  617.  
  618.    This routine has no effect if page_number references a physical or virtual
  619.    video page.
  620.  
  621.    Before using this routine, you must use the fg_initems routine to
  622.    initialize the Expanded Memory Manager.
  623.  
  624.    The only function you can perform with EMS logical pages is copying one
  625.    entire page to another (with fg_copypage).
  626.  
  627. See also
  628.  
  629.    fg_alloccms, fg_allocxms, fg_copypage, fg_freepage, fg_initems, fg_pagesize
  630.  
  631. Examples
  632.  
  633.    8-9
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.                                       6
  647. fg_allocxms
  648.  
  649. Prototype
  650.  
  651.    int fg_allocxms (int page_number);
  652.    function FGallocxms% (page_number%)
  653.    i*2 function fg_allocxms (i*2 page_number)
  654.    function fg_allocxms (page_number : integer) : integer;
  655.  
  656. Description
  657.  
  658.    The fg_allocxms routine creates a logical page in extended memory (XMS).
  659.    The amount of memory required depends on the current video mode and video
  660.    buffer dimensions.
  661.  
  662. Parameters
  663.  
  664.    page_number is the number by which the logical page will be referenced.  It
  665.    must be between 1 and 63.
  666.  
  667. Return value
  668.  
  669.     0 = logical page created in extended memory
  670.    -1 = XMS driver not present
  671.    -2 = invalid page number
  672.    -3 = page already created, or page exists as a physical or virtual page
  673.    -4 = insufficient extended memory to create the page
  674.  
  675. Restrictions
  676.  
  677.    This routine has no effect if page_number references a physical or virtual
  678.    video page.
  679.  
  680.    Before using this routine, you must use the fg_initxms routine to
  681.    initialize the XMS driver.
  682.  
  683.    The only function you can perform with XMS logical pages is copying one
  684.    entire page to another (with fg_copypage).
  685.  
  686. See also
  687.  
  688.    fg_alloccms, fg_allocems, fg_copypage, fg_freepage, fg_initxms, fg_pagesize
  689.  
  690. Examples
  691.  
  692.    8-9
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.                                       7
  706. fg_automode
  707.  
  708. Prototype
  709.  
  710.    int fg_automode (void);
  711.    function FGautomode% ()
  712.    i*2 function fg_automode ()
  713.    function fg_automode : integer;
  714.  
  715. Description
  716.  
  717.    The fg_automode routine determines the graphics video mode that offers the
  718.    most features for the user's display and adapter configuration.
  719.  
  720. Parameters
  721.  
  722.    none
  723.  
  724. Return value
  725.  
  726.    The return value is the proposed video mode number.  The current display
  727.    and adapter configuration determine the mode number, as illustrated in the
  728.    following table.
  729.  
  730.  
  731.                                  ------- display ------
  732.                        adapter   mono   RGB   ECD   VGA
  733.  
  734.                           MDA       7     0     7     7
  735.                           HGC      11     0     0    11
  736.                           CGA       0     4     0     0
  737.                           EGA      15    13    16     0
  738.                           VGA      17    17    17    18
  739.                          MCGA      17    17    17    19
  740.                         Tandy       7     9     0     0
  741.                          PCjr       7     9     0     0
  742.  
  743.  
  744.    The return value can either be passed directly to the fg_setmode routine,
  745.    or it can help determine suitable video modes for your program.
  746.  
  747. Restrictions
  748.  
  749.    For compatibility with previous versions of Fastgraph, this function does
  750.    not consider XVGA or SVGA graphics modes when proposing a video mode.
  751.  
  752. See also
  753.  
  754.    fg_bestmode, fg_setmode, fg_testmode
  755.  
  756. Examples
  757.  
  758.    3-6, 4-3
  759.  
  760.  
  761.  
  762.  
  763.  
  764.                                       8
  765. fg_bestmode
  766.  
  767. Prototype
  768.  
  769.    int fg_bestmode (int horizontal, int vertical, int pages);
  770.    function FGbestmode% (horizontal%, vertical%, pages%)
  771.    i*2 function fg_bestmode (i*2 horizontal, i*2 vertical, i*2 pages)
  772.    function fg_bestmode (horizontal, vertical, pages : integer) : integer;
  773.  
  774. Description
  775.  
  776.    The fg_bestmode routine determines the video mode having the requested
  777.    resolution and the most features for the user's display and adapter
  778.    configuration.  It is similar to fg_automode, but it excludes video modes
  779.    that do not offer the specified resolution and video page requirements.
  780.    The video pages can include physical pages, virtual pages, or both.  In
  781.    modes that support virtual pages, fg_bestmode does not check if the virtual
  782.    pages have been created, only that there is enough conventional memory
  783.    available to do so.
  784.  
  785. Parameters
  786.  
  787.    horizontal specifies the required horizontal resolution in pixels.
  788.  
  789.    vertical specifies the required vertical resolution in pixels.
  790.  
  791.    pages specifies the required number of physical or virtual video pages.
  792.  
  793. Return value
  794.  
  795.    If fg_bestmode finds a video mode that offers the specified resolution and
  796.    video page requirements, it returns the corresponding video mode number.
  797.    If not, it returns -1.
  798.  
  799. Restrictions
  800.  
  801.    SVGA graphics modes (24 to 29) are available only after successfully
  802.    initializing the SVGA kernel with fg_svgainit.
  803.  
  804. See also
  805.  
  806.    fg_automode, fg_setmode, fg_svgainit, fg_testmode
  807.  
  808. Examples
  809.  
  810.    3-4, 3-7
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.                                       9
  824. fg_box
  825.  
  826. Prototype
  827.  
  828.    void fg_box (int minx, int maxx, int miny, int maxy);
  829.    sub FGbox (minx%, maxx%, miny%, maxy%)
  830.    subroutine fg_box (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  831.    procedure fg_box (minx, maxx, miny, maxy : integer);
  832.  
  833. Description
  834.  
  835.    The fg_box routine draws an unfilled rectangle in screen space, with
  836.    respect to the clipping region.  The width of the rectangle's edges is one
  837.    pixel unless changed with the fg_boxdepth routine.
  838.  
  839. Parameters
  840.  
  841.    minx is the x coordinate of the rectangle's left edge.
  842.  
  843.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  844.    than or equal to the value of minx.
  845.  
  846.    miny is the y coordinate of the rectangle's top edge.
  847.  
  848.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  849.    greater than or equal to the value of miny.
  850.  
  851. Return value
  852.  
  853.    none
  854.  
  855. Restrictions
  856.  
  857.    This routine has no effect in text video modes.
  858.  
  859. See also
  860.  
  861.    fg_boxdepth, fg_boxw, fg_boxx, fg_rect
  862.  
  863. Examples
  864.  
  865.    6-12, 8-11, 13-7
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.                                       10
  883. fg_boxdepth
  884.  
  885. Prototype
  886.  
  887.    void fg_boxdepth (int xdepth, int ydepth);
  888.    sub FGboxdepth (xdepth%, ydepth%)
  889.    subroutine fg_boxdepth (i*2 xdepth, i*2 ydepth)
  890.    procedure fg_boxdepth (xdepth, ydepth : integer);
  891.  
  892. Description
  893.  
  894.    The fg_boxdepth routine defines the depth of rectangles drawn with the box
  895.    display routines.  The fg_setmode routine initializes the box depth to one
  896.    pixel in each direction.
  897.  
  898. Parameters
  899.  
  900.    xdepth is the width in pixels of the rectangle's left and right sides.  It
  901.    must be greater than zero.
  902.  
  903.    ydepth is the height in pixels of the rectangle's top and bottom sides.  It
  904.    must be greater than zero.
  905.  
  906. Return value
  907.  
  908.    none
  909.  
  910. Restrictions
  911.  
  912.    none
  913.  
  914. See also
  915.  
  916.    fg_box, fg_boxw, fg_boxx, fg_boxxw
  917.  
  918. Examples
  919.  
  920.    6-11
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.                                       11
  942. fg_boxw
  943.  
  944. Prototype
  945.  
  946.    void fg_boxw (double xmin, double xmax, double ymin, double ymax);
  947.    sub FGboxw (xmin#, xmax#, ymin#, ymax#)
  948.    subroutine fg_boxw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  949.    procedure fg_boxw (xmin, xmax, ymin, ymax : real);
  950.  
  951. Description
  952.  
  953.    The fg_boxw routine draws an unfilled rectangle in world space, with
  954.    respect to the clipping region.  The width of the rectangle's edges is one
  955.    pixel unless changed with the fg_boxdepth routine.
  956.  
  957. Parameters
  958.  
  959.    xmin is the world space x coordinate of the rectangle's left edge.
  960.  
  961.    xmax is the world space x coordinate of the rectangle's right edge.  It
  962.    must be greater than or equal to the value of xmin.
  963.  
  964.    ymin is the world space y coordinate of the rectangle's bottom edge.
  965.  
  966.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  967.    be greater than or equal to the value of ymin.
  968.  
  969. Return value
  970.  
  971.    none
  972.  
  973. Restrictions
  974.  
  975.    This routine has no effect in text video modes and is not available in
  976.    Fastgraph/Light.
  977.  
  978. See also
  979.  
  980.    fg_box, fg_boxdepth, fg_boxxw
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.                                       12
  1001. fg_boxx
  1002.  
  1003. Prototype
  1004.  
  1005.    void fg_boxx (int minx, int maxx, int miny, int maxy);
  1006.    sub FGboxx (minx%, maxx%, miny%, maxy%)
  1007.    subroutine fg_boxx (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  1008.    procedure fg_boxx (minx, maxx, miny, maxy : integer);
  1009.  
  1010. Description
  1011.  
  1012.    The fg_boxx routine draws a hollow rectangle in "exclusive or" mode in
  1013.    screen space or character space, with respect to the clipping region.  The
  1014.    width of the rectangle's edges is one pixel unless changed with the
  1015.    fg_boxdepth routine.
  1016.  
  1017. Parameters
  1018.  
  1019.    minx is the x coordinate of the rectangle's left edge.
  1020.  
  1021.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  1022.    than or equal to the value of minx.
  1023.  
  1024.    miny is the y coordinate of the rectangle's top edge.
  1025.  
  1026.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  1027.    greater than or equal to the value of miny.
  1028.  
  1029. Return value
  1030.  
  1031.    none
  1032.  
  1033. Restrictions
  1034.  
  1035.    This routine has no effect in text video modes.
  1036.  
  1037.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  1038.    is reset to its default replacement mode on return.
  1039.  
  1040. See also
  1041.  
  1042.    fg_box, fg_boxdepth, fg_boxxw
  1043.  
  1044. Examples
  1045.  
  1046.    6-13
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.                                       13
  1060. fg_boxxw
  1061.  
  1062. Prototype
  1063.  
  1064.    void fg_boxxw (double xmin, double xmax, double ymin, double ymax);
  1065.    sub FGboxxw (xmin#, xmax#, ymin#, ymax#)
  1066.    subroutine fg_boxxw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  1067.    procedure fg_boxxw (xmin, xmax, ymin, ymax : real);
  1068.  
  1069. Description
  1070.  
  1071.    The fg_boxxw routine draws an unfilled rectangle in "exclusive or" mode in
  1072.    world space, with respect to the clipping region.  The width of the
  1073.    rectangle's edges is one pixel unless changed with the fg_boxdepth routine.
  1074.  
  1075. Parameters
  1076.  
  1077.    xmin is the world space x coordinate of the rectangle's left edge.
  1078.  
  1079.    xmax is the world space x coordinate of the rectangle's right edge.  It
  1080.    must be greater than or equal to the value of xmin.
  1081.  
  1082.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1083.  
  1084.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  1085.    be greater than or equal to the value of ymin.
  1086.  
  1087. Return value
  1088.  
  1089.    none
  1090.  
  1091. Restrictions
  1092.  
  1093.    This routine has no effect in text video modes and is not available in
  1094.    Fastgraph/Light.
  1095.  
  1096.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  1097.    is reset to its default replacement mode on return.
  1098.  
  1099. See also
  1100.  
  1101.    fg_boxdepth, fg_boxw, fg_boxx
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.                                       14
  1119. fg_button
  1120.  
  1121. Prototype
  1122.  
  1123.    int fg_button (int n);
  1124.    function FGbutton% (n%)
  1125.    i*2 function fg_button (i*2 n)
  1126.    function fg_button (n : integer) : integer;
  1127.  
  1128. Description
  1129.  
  1130.    The fg_button routine returns information about the state of either
  1131.    joystick's button status.
  1132.  
  1133. Parameters
  1134.  
  1135.    n specifies the joystick number, either 1 or 2.
  1136.  
  1137. Return value
  1138.  
  1139.    A status code indicating the current button status for the requested
  1140.    joystick, as shown below.
  1141.  
  1142.      0 = neither button pressed
  1143.      1 = top button pressed
  1144.      2 = bottom button pressed
  1145.      3 = top and bottom buttons pressed
  1146.  
  1147. Restrictions
  1148.  
  1149.    none
  1150.  
  1151. See also
  1152.  
  1153.    fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intjoy
  1154.  
  1155. Examples
  1156.  
  1157.    14-12
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.                                       15
  1178. fg_capslock
  1179.  
  1180. Prototype
  1181.  
  1182.    int fg_capslock (void);
  1183.    function FGcapslock% ()
  1184.    i*2 function fg_capslock ()
  1185.    function fg_capslock : integer;
  1186.  
  1187. Description
  1188.  
  1189.    The fg_capslock routine determines the state of the CapsLock key.
  1190.  
  1191. Parameters
  1192.  
  1193.    none
  1194.  
  1195. Return value
  1196.  
  1197.    If the return value is 0, it means the CapsLock key is off.  If it is 1, it
  1198.    means the CapsLock key is on.
  1199.  
  1200. Restrictions
  1201.  
  1202.    none
  1203.  
  1204. See also
  1205.  
  1206.    fg_numlock, fg_scrlock, fg_setcaps, fg_setnum
  1207.  
  1208. Examples
  1209.  
  1210.    14-3
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.                                       16
  1237. fg_chgattr
  1238.  
  1239. Prototype
  1240.  
  1241.    void fg_chgattr (int n);
  1242.    sub FGchgattr (n%)
  1243.    subroutine fg_chgattr (i*2 n)
  1244.    procedure fg_chgattr (n : integer);
  1245.  
  1246. Description
  1247.  
  1248.    The fg_chgattr routine applies the current text attribute to a given number
  1249.    of characters, starting at the text cursor position.  This routine leaves
  1250.    the text cursor one column to the right of the last character changed (or
  1251.    the first column of the next row if the last character is at the end of a
  1252.    row).
  1253.  
  1254. Parameters
  1255.  
  1256.    n is the number of characters for which to change the text attribute.
  1257.  
  1258. Return value
  1259.  
  1260.    none
  1261.  
  1262. Restrictions
  1263.  
  1264.    This routine has no effect in graphics video modes.
  1265.  
  1266. See also
  1267.  
  1268.    fg_chgtext, fg_locate, fg_text
  1269.  
  1270. Examples
  1271.  
  1272.    7-3
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.                                       17
  1296. fg_chgtext
  1297.  
  1298. Prototype
  1299.  
  1300.    void fg_chgtext (char *string, int n);
  1301.    sub FGchgtext (string$, n%)
  1302.    subroutine fg_chgtext (c*(*) string, i*2 n)
  1303.    procedure fg_chgtext (string : string; n : integer);
  1304.  
  1305. Description
  1306.  
  1307.    The fg_chgtext routine displays a string of hardware characters, starting
  1308.    at the text cursor position, using the existing text attributes.  This
  1309.    routine leaves the text cursor one column to the right of the last
  1310.    character changed (or the first column of the next row if the last
  1311.    character is at the end of a row).
  1312.  
  1313. Parameters
  1314.  
  1315.    string is the arbitrary-length sequence of characters to display.
  1316.  
  1317.    n is the number of characters in string.
  1318.  
  1319. Return value
  1320.  
  1321.    none
  1322.  
  1323. Restrictions
  1324.  
  1325.    This routine has no effect in graphics video modes.
  1326.  
  1327. See also
  1328.  
  1329.    fg_chgattr, fg_locate, fg_text
  1330.  
  1331. Examples
  1332.  
  1333.    7-3
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.                                       18
  1355. fg_circle
  1356.  
  1357. Prototype
  1358.  
  1359.    void fg_circle (int radius);
  1360.    sub FGcircle (radius%)
  1361.    subroutine fg_circle (i*2 radius)
  1362.    procedure fg_circle (radius : integer);
  1363.  
  1364. Description
  1365.  
  1366.    The fg_circle routine draws an unfilled circle in screen space.  The circle
  1367.    is centered at the current graphics cursor position.
  1368.  
  1369. Parameters
  1370.  
  1371.    radius defines the circle's radius in horizontal screen space units.  Its
  1372.    value must be greater than zero.
  1373.  
  1374. Return value
  1375.  
  1376.    none
  1377.  
  1378. Restrictions
  1379.  
  1380.    This routine has no effect in text video modes.
  1381.  
  1382. See also
  1383.  
  1384.    fg_circlef, fg_circlew, fg_ellipse
  1385.  
  1386. Examples
  1387.  
  1388.    6-10
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.                                       19
  1414. fg_circlef
  1415.  
  1416. Prototype
  1417.  
  1418.    void fg_circlef (int radius);
  1419.    sub FGcirclef (radius%)
  1420.    subroutine fg_circlef (i*2 radius)
  1421.    procedure fg_circlef (radius : integer);
  1422.  
  1423. Description
  1424.  
  1425.    The fg_circlef routine draws a filled circle in screen space.  The circle
  1426.    is centered at the current graphics cursor position and is filled with
  1427.    pixels of the current color.
  1428.  
  1429. Parameters
  1430.  
  1431.    radius defines the circle's radius in horizontal screen space units.  Its
  1432.    value must be greater than zero.
  1433.  
  1434. Return value
  1435.  
  1436.    none
  1437.  
  1438. Restrictions
  1439.  
  1440.    This routine has no effect in text video modes.
  1441.  
  1442. See also
  1443.  
  1444.    fg_circle, fg_circlefw, fg_ellipsef
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.                                       20
  1473. fg_circlefw
  1474.  
  1475. Prototype
  1476.  
  1477.    void fg_circlefw (double radius);
  1478.    sub FGcirclefw (radius#)
  1479.    subroutine fg_circlefw (r*8 radius)
  1480.    procedure fg_circlefw (radius : real);
  1481.  
  1482. Description
  1483.  
  1484.    The fg_circlefw routine draws a filled circle in world space.  The circle
  1485.    is centered at the current graphics cursor position and is filled with
  1486.    pixels of the current color.
  1487.  
  1488. Parameters
  1489.  
  1490.    radius defines the circle's radius in horizontal world space units.  Its
  1491.    value must be greater than zero.
  1492.  
  1493. Return value
  1494.  
  1495.    none
  1496.  
  1497. Restrictions
  1498.  
  1499.    This routine is not available in Fastgraph/Light and has no effect in text
  1500.    video modes.
  1501.  
  1502. See also
  1503.  
  1504.    fg_circlef, fg_circlew, fg_ellipsfw
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.                                       21
  1532. fg_circlew
  1533.  
  1534. Prototype
  1535.  
  1536.    void fg_circlew (double radius);
  1537.    sub FGcirclew (radius#)
  1538.    subroutine fg_circlew (r*8 radius)
  1539.    procedure fg_circlew (radius : real);
  1540.  
  1541. Description
  1542.  
  1543.    The fg_circlew routine draws an unfilled circle in world space.  The circle
  1544.    is centered at the current graphics cursor position.
  1545.  
  1546. Parameters
  1547.  
  1548.    radius defines the circle's radius in horizontal world space units.  Its
  1549.    value must be greater than zero.
  1550.  
  1551. Return value
  1552.  
  1553.    none
  1554.  
  1555. Restrictions
  1556.  
  1557.    This routine is not available in Fastgraph/Light and has no effect in text
  1558.    video modes.
  1559.  
  1560. See also
  1561.  
  1562.    fg_circle, fg_circlefw, fg_ellipsew
  1563.  
  1564. Examples
  1565.  
  1566.    6-9
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.                                       22
  1591. fg_clipmask
  1592.  
  1593. Prototype
  1594.  
  1595.    void fg_clipmask (char *map_array, int runs, int width);
  1596.    sub FGclipmask (map_array$, runs%, width%)
  1597.    subroutine fg_clipmask (i*1 map_array, i*2 runs, i*2 width)
  1598.    procedure fg_clipmask (var map_array : byte; runs, width : integer);
  1599.  
  1600. Description
  1601.  
  1602.    The fg_clipmask routine displays a clipped image stored as a masking map.
  1603.    The image will be positioned so that its lower left corner is at the
  1604.    graphics cursor position.  Refer to the description of the fg_drawmask
  1605.    routine for more information about masking maps.
  1606.  
  1607. Parameters
  1608.  
  1609.    map_array is the arbitrary-length array containing the masking map.
  1610.  
  1611.    runs is the number of pixel runs in the masking map.
  1612.  
  1613.    width is the width in pixels of the masking map.
  1614.  
  1615. Return value
  1616.  
  1617.    none
  1618.  
  1619. Restrictions
  1620.  
  1621.    This routine has no effect in text video modes.
  1622.  
  1623. See also
  1624.  
  1625.    fg_drawmask, fg_flipmask, fg_revmask, fg_setclip
  1626.  
  1627. Examples
  1628.  
  1629.    10-17
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.                                       23
  1650. fg_clpimage
  1651.  
  1652. Prototype
  1653.  
  1654.    void fg_clpimage (char *map_array, int width, int height);
  1655.    sub FGclpimage (map_array$, width%, height%)
  1656.    subroutine fg_clpimage (i*1 map_array, i*2 width, i*2 height)
  1657.    procedure fg_clpimage (var map_array : byte; width, height : integer);
  1658.  
  1659. Description
  1660.  
  1661.    The fg_clpimage routine displays a clipped image stored as a mode-specific
  1662.    bit map.  The image will be positioned so that its lower left corner is at
  1663.    the graphics cursor position.  Only that part of the image that falls
  1664.    within the current clipping limits will be displayed.  Refer to the
  1665.    Fastgraph User's Guide for complete information about mode-specific bit
  1666.    maps.
  1667.  
  1668. Parameters
  1669.  
  1670.    map_array is the arbitrary-length array containing the bit map.
  1671.  
  1672.    width is the width in bytes of the bit map.
  1673.  
  1674.    height is the height in bytes (pixel rows) of the bit map.
  1675.  
  1676. Return value
  1677.  
  1678.    none
  1679.  
  1680. Restrictions
  1681.  
  1682.    This routine has no effect in text video modes.
  1683.  
  1684. See also
  1685.  
  1686.    fg_drwimage, fg_flpimage, fg_getimage, fg_putimage, fg_revimage, fg_setclip
  1687.  
  1688. Examples
  1689.  
  1690.    10-8, 10-9
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.                                       24
  1709. fg_clprect
  1710.  
  1711. Prototype
  1712.  
  1713.    void fg_clprect (int minx, int maxx, int miny, int maxy);
  1714.    sub FGclprect (minx%, maxx%, miny%, maxy%)
  1715.    subroutine fg_clprect (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  1716.    procedure fg_clprect (minx, maxx, miny, maxy : integer);
  1717.  
  1718. Description
  1719.  
  1720.    The fg_clprect routine draws a solid (filled) rectangle in screen space,
  1721.    with respect to the clipping region.
  1722.  
  1723. Parameters
  1724.  
  1725.    minx is the screen space x coordinate of the rectangle's left edge.
  1726.  
  1727.    maxx is the screen space x coordinate of the rectangle's right edge.  It
  1728.    must be greater than or equal to the value of minx.
  1729.  
  1730.    miny is the screen space y coordinate of the rectangle's top edge.
  1731.  
  1732.    maxy is the screen space y coordinate of the rectangle's bottom edge.  It
  1733.    must be greater than or equal to the value of miny.
  1734.  
  1735. Return value
  1736.  
  1737.    none
  1738.  
  1739. Restrictions
  1740.  
  1741.    This routine has no effect in text video modes.
  1742.  
  1743. See also
  1744.  
  1745.    fg_clprectw, fg_rect, fg_rectw, fg_setclip
  1746.  
  1747. Examples
  1748.  
  1749.    12-1, 12-2, 12-3, 12-4, 12-6
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.                                       25
  1768. fg_clprectw
  1769.  
  1770. Prototype
  1771.  
  1772.    void fg_clprectw (double xmin, double xmax, double ymin, double ymax);
  1773.    sub FGclprectw (xmin#, xmax#, ymin#, ymax#)
  1774.    subroutine fg_clprectw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  1775.    procedure fg_clprectw (xmin, xmax, ymin, ymax : real);
  1776.  
  1777. Description
  1778.  
  1779.    The fg_clprectw routine draws a solid (filled) rectangle in world space,
  1780.    with respect to the clipping region.
  1781.  
  1782. Parameters
  1783.  
  1784.    xmin is the world space x coordinate of the rectangle's left edge.
  1785.  
  1786.    xmax is the world space x coordinate of the rectangle's right edge.  It
  1787.    must be greater than or equal to the value of xmin.
  1788.  
  1789.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1790.  
  1791.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  1792.    be greater than or equal to the value of ymin.
  1793.  
  1794. Return value
  1795.  
  1796.    none
  1797.  
  1798. Restrictions
  1799.  
  1800.    This routine is not available in Fastgraph/Light and has no effect in text
  1801.    video modes.
  1802.  
  1803. See also
  1804.  
  1805.    fg_clprect, fg_rect, fg_rectw, fg_setclipw
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.                                       26
  1827. fg_copypage
  1828.  
  1829. Prototype
  1830.  
  1831.    void fg_copypage (int source_page, int dest_page);
  1832.    sub FGcopypage (source_page%, dest_page%)
  1833.    subroutine fg_copypage (i*2 source_page, i*2 dest_page)
  1834.    procedure fg_copypage (source_page, dest_page : integer);
  1835.  
  1836. Description
  1837.  
  1838.    The fg_copypage routine transfers the contents of one video page to
  1839.    another.  The pages may be physical, virtual, or logical video pages.
  1840.    Assuming maxx and maxy represent the maximum x and y coordinates of a video
  1841.    page, the call
  1842.  
  1843.      fg_copypage(source,dest);
  1844.  
  1845.    is equivalent to
  1846.  
  1847.      fg_transfer(0,maxx,0,maxy,0,maxy,source,dest);
  1848.  
  1849. Parameters
  1850.  
  1851.    source_page is the source video page number.  It must be between 0 and 63.
  1852.  
  1853.    dest_page is the destination video page number.  It must be between 0 and
  1854.    63.
  1855.  
  1856. Return value
  1857.  
  1858.    none
  1859.  
  1860. Restrictions
  1861.  
  1862.    If source_page and dest_page both reference logical pages, the pages must
  1863.    exist in the same type of memory.  For example, you cannot copy a logical
  1864.    page in extended memory to a logical page in conventional memory.
  1865.  
  1866. See also
  1867.  
  1868.    fg_alloccms, fg_allocems, fg_allocxms, fg_initems, fg_initxms, fg_transfer
  1869.  
  1870. Examples
  1871.  
  1872.    8-9, 8-11, 8-12, 11-1
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.                                       27
  1886. fg_cursor
  1887.  
  1888. Prototype
  1889.  
  1890.    void fg_cursor (int state);
  1891.    sub FGcursor (state%)
  1892.    subroutine fg_cursor (i*2 state)
  1893.    procedure fg_cursor (state : integer);
  1894.  
  1895. Description
  1896.  
  1897.    The fg_cursor routine determines the ROM BIOS cursor visibility in text
  1898.    video modes.  After calling fg_setmode, the cursor is made visible by
  1899.    default.
  1900.  
  1901. Parameters
  1902.  
  1903.    The state parameter defines the cursor visibility.  If it is 0, the cursor
  1904.    becomes invisible; if it is 1, the cursor becomes visible.
  1905.  
  1906. Return value
  1907.  
  1908.    none
  1909.  
  1910. Restrictions
  1911.  
  1912.    This routine has no effect in graphics video modes.
  1913.  
  1914. Examples
  1915.  
  1916.    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-11,
  1917.    10-7, 10-13, 11-2, 11-4, 13-4
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.                                       28
  1945. fg_dash
  1946.  
  1947. Prototype
  1948.  
  1949.    void fg_dash (int ix, int iy, int pattern);
  1950.    sub FGdash (ix%, iy%, pattern%)
  1951.    subroutine fg_dash (i*2 ix, i*2 iy, i*2 pattern)
  1952.    procedure fg_dash (ix, iy, pattern : integer);
  1953.  
  1954. Description
  1955.  
  1956.    The fg_dash routine draws a dashed line from the graphics cursor position
  1957.    to an absolute screen space position.  It also makes the destination
  1958.    position the new graphics cursor position.
  1959.  
  1960. Parameters
  1961.  
  1962.    ix is the screen space x coordinate of the destination position.
  1963.  
  1964.    iy is the screen space y coordinate of the destination position.
  1965.  
  1966.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  1967.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  1968.    pixel being skipped.
  1969.  
  1970. Return value
  1971.  
  1972.    none
  1973.  
  1974. Restrictions
  1975.  
  1976.    This routine has no effect in text video modes.
  1977.  
  1978. See also
  1979.  
  1980.    fg_dashrel, fg_dashrw, fg_dashw, fg_move
  1981.  
  1982. Examples
  1983.  
  1984.    6-6
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.                                       29
  2004. fg_dashrel
  2005.  
  2006. Prototype
  2007.  
  2008.    void fg_dashrel (int ix, int iy, int pattern);
  2009.    sub FGdashrel (ix%, iy%, pattern%)
  2010.    subroutine fg_dashrel (i*2 ix, i*2 iy, i*2 pattern)
  2011.    procedure fg_dashrel (ix, iy, pattern : integer);
  2012.  
  2013. Description
  2014.  
  2015.    The fg_dash routine draws a dashed line from the graphics cursor position
  2016.    to a screen space position relative to it.  It also makes the destination
  2017.    position the new graphics cursor position.
  2018.  
  2019. Parameters
  2020.  
  2021.    ix is the screen space x offset of the destination position.
  2022.  
  2023.    iy is the screen space y offset of the destination position.
  2024.  
  2025.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  2026.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  2027.    pixel being skipped.
  2028.  
  2029. Return value
  2030.  
  2031.    none
  2032.  
  2033. Restrictions
  2034.  
  2035.    This routine has no effect in text video modes.
  2036.  
  2037. See also
  2038.  
  2039.    fg_dash, fg_dashrw, fg_dashw, fg_moverel
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.                                       30
  2063. fg_dashrw
  2064.  
  2065. Prototype
  2066.  
  2067.    void fg_dashrw (double x, double y, int pattern);
  2068.    sub FGdashrw (x#, y#, pattern%)
  2069.    subroutine fg_dashrw (r*8 x, r*8 y, i*2 pattern)
  2070.    procedure fg_dashrw (x, y : real; pattern : integer);
  2071.  
  2072. Description
  2073.  
  2074.    The fg_dashrw routine draws a dashed line from the graphics cursor position
  2075.    to a world space position relative to it.  It also makes the destination
  2076.    position the new graphics cursor position.
  2077.  
  2078. Parameters
  2079.  
  2080.    x is the world space x offset of the destination position.
  2081.  
  2082.    y is the world space y offset of the destination position.
  2083.  
  2084.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  2085.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  2086.    pixel being skipped.
  2087.  
  2088. Return value
  2089.  
  2090.    none
  2091.  
  2092. Restrictions
  2093.  
  2094.    This routine is not available in Fastgraph/Light and has no effect in text
  2095.    video modes.
  2096.  
  2097. See also
  2098.  
  2099.    fg_dash, fg_dashrel, fg_dashw, fg_moverw
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.                                       31
  2122. fg_dashw
  2123.  
  2124. Prototype
  2125.  
  2126.    void fg_dashw (double x, double y, int pattern);
  2127.    sub FGdashw (x#, y#, pattern%)
  2128.    subroutine fg_dashw (r*8 x, r*8 y, i*2 pattern)
  2129.    procedure fg_dashw (x, y : real; pattern : integer);
  2130.  
  2131. Description
  2132.  
  2133.    The fg_dashw routine draws a dashed line from the graphics cursor position
  2134.    to an absolute world space position.  It also makes the destination
  2135.    position the new graphics cursor position.
  2136.  
  2137. Parameters
  2138.  
  2139.    x is the world space x coordinate of the destination position.
  2140.  
  2141.    y is the world space y coordinate of the destination position.
  2142.  
  2143.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  2144.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  2145.    pixel being skipped.
  2146.  
  2147. Return value
  2148.  
  2149.    none
  2150.  
  2151. Restrictions
  2152.  
  2153.    This routine is not available in Fastgraph/Light and has no effect in text
  2154.    video modes.
  2155.  
  2156. See also
  2157.  
  2158.    fg_dash, fg_dashrel, fg_dashrw, fg_movew
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.                                       32
  2181. fg_defcolor
  2182.  
  2183. Prototype
  2184.  
  2185.    void fg_defcolor (int index, int value);
  2186.    sub FGdefcolor (index%, value%)
  2187.    subroutine fg_defcolor (i*2 index, i*2 value)
  2188.    procedure fg_defcolor (index, value : integer);
  2189.  
  2190. Description
  2191.  
  2192.    The fg_defcolor routine assigns a color value to a virtual color index.
  2193.  
  2194. Parameters
  2195.  
  2196.    index is the virtual color index to define, between 0 and 255.
  2197.  
  2198.    value is the color value to assign to the specified color index.  It must
  2199.    be between 0 and the maximum color value for the current video mode.
  2200.  
  2201. Return value
  2202.  
  2203.    none
  2204.  
  2205. Restrictions
  2206.  
  2207.    This routine has no effect in text video modes or in 256-color graphics
  2208.    video modes.
  2209.  
  2210. See also
  2211.  
  2212.    fg_getindex, fg_palette, fg_setcolor
  2213.  
  2214. Examples
  2215.  
  2216.    5-15, 5-16
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.                                       33
  2240. fg_defpages
  2241.  
  2242. Prototype
  2243.  
  2244.    void fg_defpages (int source_page, int dest_page);
  2245.    sub FGdefpages (source_page%, dest_page%)
  2246.    subroutine fg_defpages (i*2 source_page, i*2 dest_page)
  2247.    procedure fg_defpages (source_page, dest_page : integer);
  2248.  
  2249. Description
  2250.  
  2251.    The fg_defpages routine defines the SVGA banks for the source and
  2252.    destination page numbers when using Fastgraph's block transfer routines
  2253.    with extended video pages.
  2254.  
  2255. Parameters
  2256.  
  2257.    source_page defines the video page from which to retrieve the block.
  2258.  
  2259.    dest_page defines the video page to which the block will be copied.
  2260.  
  2261. Return value
  2262.  
  2263.    none
  2264.  
  2265. Restrictions
  2266.  
  2267.    This routine is meaningful only in standard EGA, VGA, MCGA, and XVGA
  2268.    graphics modes (modes 13 to 23) for SVGA chipsets that support extended
  2269.    video pages.
  2270.  
  2271. See also
  2272.  
  2273.    fg_copypage, fg_restore, fg_save, fg_svgainit, fg_svgastat, fg_tcxfer,
  2274.    fg_transfer
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.                                       34
  2299. fg_dispfile
  2300.  
  2301. Prototype
  2302.  
  2303.    void fg_dispfile (char *filename, int width, int format);
  2304.    sub FGdispfile (filename$, width%, format%)
  2305.    subroutine fg_dispfile (c*(*) filename, i*2 width, i*2 format)
  2306.    procedure fg_dispfile (filename : string; width, format : integer);
  2307.  
  2308. Description
  2309.  
  2310.    The fg_dispfile routine displays an image stored in a standard or packed
  2311.    pixel run file.  The image will be positioned so that its lower left corner
  2312.    is at the graphics cursor position on the active video page.  Refer to the
  2313.    descriptions of the fg_display and fg_displayp routines for more
  2314.    information about the two pixel run formats.
  2315.  
  2316. Parameters
  2317.  
  2318.    filename is the name of the PPR or SPR file.  A device and path name may be
  2319.    included as part of the file name.  The file name must be terminated by a
  2320.    null character (that is, a zero byte).
  2321.  
  2322.    width is the width of the image in pixels.  It must be greater than zero.
  2323.  
  2324.    format specifies the image format.  The value of format must be 0 if the
  2325.    image is in standard pixel run format, and 1 if the image is in packed
  2326.    pixel run format.
  2327.  
  2328. Return value
  2329.  
  2330.    none
  2331.  
  2332. Restrictions
  2333.  
  2334.    This routine has no effect in text video modes.
  2335.  
  2336. See also
  2337.  
  2338.    fg_display, fg_displayp, fg_imagebuf, fg_pattern, fg_showppr, fg_showspr
  2339.  
  2340. Examples
  2341.  
  2342.    9-5
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.                                       35
  2358. fg_display
  2359.  
  2360. Prototype
  2361.  
  2362.    void fg_display (char *map_array, int runs, int width);
  2363.    sub FGdisplay (map_array$, runs%, width%)
  2364.    subroutine fg_display (i*1 map_array, i*2 runs, i*2 width)
  2365.    procedure fg_display (var map_array : byte; runs, width : integer);
  2366.  
  2367. Description
  2368.  
  2369.    The fg_display routine displays an image stored in Fastgraph's standard
  2370.    pixel run format, where the image resides in an array.  The image will be
  2371.    positioned so that its lower left corner is at the graphics cursor
  2372.    position.
  2373.  
  2374. Parameters
  2375.  
  2376.    map_array is the arbitrary-length array containing the pixel run map.  The
  2377.    pixel runs are represented by (color,count) pairs, as shown below.
  2378.  
  2379.  
  2380.                              [0]   color for run 1
  2381.  
  2382.                              [1]   count for run 1
  2383.  
  2384.                              [2]   color for run 2
  2385.  
  2386.                              [3]   count for run 2
  2387.                                           .
  2388.                                           .
  2389.                                           .
  2390.                                           .
  2391.                                           .
  2392.                           [2n-2]   color for run n
  2393.  
  2394.                           [2n-1]   count for run n
  2395.  
  2396.  
  2397.    Each "color" element is a value between 0 and 255 specifying the color
  2398.    index for that pixel run.  Each "count" element is a value between 0 and
  2399.    255 specifying the length in pixels of that pixel run.
  2400.  
  2401.    runs is the number of pixel runs to display from the pixel run map.  It is
  2402.    normally one-half the size of the map_array array.
  2403.  
  2404.    width is the width of the image in pixels.  It must be greater than zero.
  2405.  
  2406. Return value
  2407.  
  2408.    none
  2409.  
  2410. Restrictions
  2411.  
  2412.    This routine has no effect in text video modes.
  2413.  
  2414.  
  2415.  
  2416.                                       36
  2417. fg_display (continued)
  2418.  
  2419. See also
  2420.  
  2421.    fg_dispfile, fg_displayp, fg_pattern, fg_showspr
  2422.  
  2423. Examples
  2424.  
  2425.    10-14, 10-16
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.                                       37
  2476. fg_displayp
  2477.  
  2478. Prototype
  2479.  
  2480.    void fg_displayp (char *map_array, int runs, int width);
  2481.    sub FGdisplayp (map_array$, runs%, width%)
  2482.    subroutine fg_displayp (i*1 map_array, i*2 runs, i*2 width)
  2483.    procedure fg_displayp (var map_array : byte; runs, width : integer);
  2484.  
  2485. Description
  2486.  
  2487.    The fg_displayp routine displays an image stored in Fastgraph's packed
  2488.    pixel run format, where the image resides in an array.  The image will be
  2489.    positioned so that its lower left corner is at the graphics cursor
  2490.    position.
  2491.  
  2492. Parameters
  2493.  
  2494.    map_array is the arbitrary-length array containing the pixel run map.  The
  2495.    pixel runs are represented by (color,count) pairs, as shown below.
  2496.  
  2497.                         7                4   3                0
  2498.  
  2499.                    [0]    color for run 1     color for run 2
  2500.  
  2501.                    [1]              count for run 1
  2502.  
  2503.                    [2]              count for run 2
  2504.  
  2505.                    [3]    color for run 3     color for run 4
  2506.  
  2507.                    [4]              count for run 3
  2508.  
  2509.                    [5]              count for run 4
  2510.                                            .
  2511.                                            .
  2512.                                            .
  2513.                                            .
  2514.                                            .
  2515.               [3n/2-3]   color for run n-1    color for run n
  2516.  
  2517.               [3n/2-2]             count for run n-1
  2518.  
  2519.               [3n/2-1]              count for run n
  2520.  
  2521.  
  2522.    Each "color" element is a value between 0 and 15 specifying the color index
  2523.    for that pixel run.  Each "count" element is a value between 0 and 255
  2524.    specifying the length in pixels of that pixel run.
  2525.  
  2526.    runs is the number of pixel runs to display from the pixel run map.  It is
  2527.    normally two-thirds the size of the map_array array.
  2528.  
  2529.    width is the width of the image in pixels.  It must be greater than zero.
  2530.  
  2531.  
  2532.  
  2533.  
  2534.                                       38
  2535. fg_displayp (continued)
  2536.  
  2537. Return value
  2538.  
  2539.    none
  2540.  
  2541. Restrictions
  2542.  
  2543.    This routine has no effect in text video modes.
  2544.  
  2545. See also
  2546.  
  2547.    fg_dispfile, fg_display, fg_pattern, fg_showppr
  2548.  
  2549. Examples
  2550.  
  2551.    10-15, 10-16
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.                                       39
  2594. fg_draw
  2595.  
  2596. Prototype
  2597.  
  2598.    void fg_draw (int ix, int iy);
  2599.    sub FGdraw (ix%, iy%)
  2600.    subroutine fg_draw (i*2 ix, i*2 iy)
  2601.    procedure fg_draw (ix, iy : integer);
  2602.  
  2603. Description
  2604.  
  2605.    The fg_draw routine draws a solid line from the graphics cursor position to
  2606.    an absolute screen space position.  It also makes the destination position
  2607.    the new graphics cursor position.
  2608.  
  2609. Parameters
  2610.  
  2611.    ix is the screen space x coordinate of the destination position.
  2612.  
  2613.    iy is the screen space y coordinate of the destination position.
  2614.  
  2615. Return value
  2616.  
  2617.    none
  2618.  
  2619. Restrictions
  2620.  
  2621.    This routine has no effect in text video modes.
  2622.  
  2623. See also
  2624.  
  2625.    fg_drawrel, fg_draww, fg_drawx, fg_move
  2626.  
  2627. Examples
  2628.  
  2629.    6-2, 6-5, 13-5, 13-6
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.                                       40
  2653. fg_drawmap
  2654.  
  2655. Prototype
  2656.  
  2657.    void fg_drawmap (char *map_array, int width, int height);
  2658.    sub FGdrawmap (map_array$, width%, height%)
  2659.    subroutine fg_drawmap (i*1 map_array, i*2 width, i*2 height)
  2660.    procedure fg_drawmap (var map_array : byte; width, height : integer);
  2661.  
  2662. Description
  2663.  
  2664.    The fg_drawmap routine displays an image stored as a mode-independent bit
  2665.    map.  The image will be positioned so that its lower left corner is at the
  2666.    graphics cursor position.  Refer to the Fastgraph User's Guide for complete
  2667.    information about mode-independent bit maps.
  2668.  
  2669. Parameters
  2670.  
  2671.    map_array is the arbitrary-length array containing the bit map.  Each byte
  2672.    of map_array represents eight pixels.  Bits that are set (1) result in the
  2673.    corresponding pixel being displayed in the current color.  Bits that are
  2674.    reset (0) leave the corresponding pixel unchanged.
  2675.  
  2676.    width is the width in bytes of the bit map.
  2677.  
  2678.    height is the height in bytes (pixel rows) of the bit map.
  2679.  
  2680. Return value
  2681.  
  2682.    none
  2683.  
  2684. Restrictions
  2685.  
  2686.    none
  2687.  
  2688. See also
  2689.  
  2690.    fg_drwimage, fg_getmap
  2691.  
  2692. Examples
  2693.  
  2694.    10-1, 10-2, 10-10, 10-11
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.                                       41
  2712. fg_drawmask
  2713.  
  2714. Prototype
  2715.  
  2716.    void fg_drawmask (char *map_array, int runs, int width);
  2717.    sub FGdrawmask (map_array$, runs%, width%)
  2718.    subroutine fg_drawmask (i*1 map_array, i*2 runs, i*2 width)
  2719.    procedure fg_drawmask (var map_array : byte; runs, width : integer);
  2720.  
  2721. Description
  2722.  
  2723.    The fg_drawmask routine displays an image stored as a masking map.  The
  2724.    image will be positioned so that its lower left corner is at the graphics
  2725.    cursor position.  Refer to the Fastgraph User's Guide for a complete
  2726.    discussion of masking maps.
  2727.  
  2728. Parameters
  2729.  
  2730.    map_array is the arbitrary-length array containing the masking map.  The
  2731.    masking map is a series of alternating "protect" and "zero" pixel runs, as
  2732.    shown below.
  2733.  
  2734.  
  2735.                       [1]   length of 1st protect run
  2736.  
  2737.                       [2]   length of 1st  zero   run
  2738.  
  2739.                       [3]   length of 2nd protect run
  2740.  
  2741.                       [4]   length of 2nd  zero   run
  2742.                                          .
  2743.                                          .
  2744.                                          .
  2745.                                          .
  2746.                                          .
  2747.                     [n-2]   length of final protect run
  2748.  
  2749.                     [n-1]   length of final  zero   run
  2750.  
  2751.  
  2752.    The "protect" runs protect video memory, while the "zero" runs zero video
  2753.    memory (that is, set the pixels to the background color).  The length of
  2754.    each run must be between 0 and 255.
  2755.  
  2756.    runs is the number of pixel runs in the masking map.
  2757.  
  2758.    width is the width in pixels of the masking map.
  2759.  
  2760. Return value
  2761.  
  2762.    none
  2763.  
  2764. Restrictions
  2765.  
  2766.    This routine has no effect in text video modes.
  2767.  
  2768.  
  2769.  
  2770.                                       42
  2771. fg_drawmask (continued)
  2772.  
  2773. See also
  2774.  
  2775.    fg_clipmask, fg_flipmask, fg_revmask
  2776.  
  2777. Examples
  2778.  
  2779.    10-17, 10-18
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  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.                                       43
  2830. fg_drawrel
  2831.  
  2832. Prototype
  2833.  
  2834.    void fg_drawrel (int ix, int iy);
  2835.    sub FGdrawrel (ix%, iy%)
  2836.    subroutine fg_drawrel (i*2 ix, i*2 iy)
  2837.    procedure fg_drawrel (ix, iy : integer);
  2838.  
  2839. Description
  2840.  
  2841.    The fg_drawrel routine draws a solid line from the graphics cursor position
  2842.    to a screen space position relative to it.  It also makes the destination
  2843.    position the new graphics cursor position.
  2844.  
  2845. Parameters
  2846.  
  2847.    ix is the screen space x offset of the destination position.
  2848.  
  2849.    iy is the screen space y offset of the destination position.
  2850.  
  2851. Return value
  2852.  
  2853.    none
  2854.  
  2855. Restrictions
  2856.  
  2857.    This routine has no effect in text video modes.
  2858.  
  2859. See also
  2860.  
  2861.    fg_draw, fg_drawrelx, fg_drawrw, fg_moverel
  2862.  
  2863. Examples
  2864.  
  2865.    6-3, 6-17
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.                                       44
  2889. fg_drawrelx
  2890.  
  2891. Prototype
  2892.  
  2893.    void fg_drawrelx (int ix, int iy);
  2894.    sub FGdrawrelx (ix%, iy%)
  2895.    subroutine fg_drawrelx (i*2 ix, i*2 iy)
  2896.    procedure fg_drawrelx (ix, iy : integer);
  2897.  
  2898. Description
  2899.  
  2900.    The fg_drawrelx routine draws a solid line in "exclusive or" mode from the
  2901.    graphics cursor position to a screen space position relative to it.  The
  2902.    destination position becomes the new graphics cursor position.
  2903.  
  2904. Parameters
  2905.  
  2906.    ix is the screen space x offset of the destination position.
  2907.  
  2908.    iy is the screen space y offset of the destination position.
  2909.  
  2910. Return value
  2911.  
  2912.    none
  2913.  
  2914. Restrictions
  2915.  
  2916.    This routine has no effect in text video modes.
  2917.  
  2918.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  2919.    is reset to its default replacement mode on return.
  2920.  
  2921. See also
  2922.  
  2923.    fg_drawrel, fg_drawrxw, fg_drawx, fg_moverel
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.                                       45
  2948. fg_drawrw
  2949.  
  2950. Prototype
  2951.  
  2952.    void fg_drawrw (double x, double y);
  2953.    sub FGdrawrw (x#, y#)
  2954.    subroutine fg_drawrw (r*8 x, r*8 y)
  2955.    procedure fg_drawrw (x, y : real);
  2956.  
  2957. Description
  2958.  
  2959.    The fg_drawrw routine draws a solid line from the graphics cursor position
  2960.    to a world space position relative to it.  It also makes the destination
  2961.    position the new graphics cursor position.
  2962.  
  2963. Parameters
  2964.  
  2965.    x is the world space x offset of the destination position.
  2966.  
  2967.    y is the world space y offset of the destination position.
  2968.  
  2969. Return value
  2970.  
  2971.    none
  2972.  
  2973. Restrictions
  2974.  
  2975.    This routine is not available in Fastgraph/Light and has no effect in text
  2976.    video modes.
  2977.  
  2978. See also
  2979.  
  2980.    fg_drawrel, fg_drawrxw, fg_draww, fg_moverw
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.                                       46
  3007. fg_drawrxw
  3008.  
  3009. Prototype
  3010.  
  3011.    void fg_drawrxw (double x, double y);
  3012.    sub FGdrawrxw (x#, y#)
  3013.    subroutine fg_drawrxw (r*8 x, r*8 y)
  3014.    procedure fg_drawrxw (x, y : real);
  3015.  
  3016. Description
  3017.  
  3018.    The fg_drawrxw routine draws a solid line in "exclusive or" mode from the
  3019.    graphics cursor position to a world space position relative to it.  It also
  3020.    makes the destination position the new graphics cursor position.
  3021.  
  3022. Parameters
  3023.  
  3024.    x is the world space x offset of the destination position.
  3025.  
  3026.    y is the world space y offset of the destination position.
  3027.  
  3028. Return value
  3029.  
  3030.    none
  3031.  
  3032. Restrictions
  3033.  
  3034.    This routine is not available in Fastgraph/Light and has no effect in text
  3035.    video modes.
  3036.  
  3037.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3038.    is reset to its default replacement mode on return.
  3039.  
  3040. See also
  3041.  
  3042.    fg_drawrelx, fg_drawrw, fg_drawxw, fg_moverw
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.                                       47
  3066. fg_draww
  3067.  
  3068. Prototype
  3069.  
  3070.    void fg_draww (double x, double y);
  3071.    sub FGdraww (x#, y#)
  3072.    subroutine fg_draww (r*8 x, r*8 y)
  3073.    procedure fg_draww (x, y : real);
  3074.  
  3075. Description
  3076.  
  3077.    The fg_draww routine draws a solid line from the graphics cursor position
  3078.    to an absolute world space position.  It also makes the destination
  3079.    position the new graphics cursor position.
  3080.  
  3081. Parameters
  3082.  
  3083.    x is the world space x coordinate of the destination position.
  3084.  
  3085.    y is the world space y coordinate of the destination position.
  3086.  
  3087. Return value
  3088.  
  3089.    none
  3090.  
  3091. Restrictions
  3092.  
  3093.    This routine is not available in Fastgraph/Light and has no effect in text
  3094.    video modes.
  3095.  
  3096. See also
  3097.  
  3098.    fg_draw, fg_drawrw, fg_drawxw, fg_movew
  3099.  
  3100. Examples
  3101.  
  3102.    4-3, 6-4
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.                                       48
  3125. fg_drawx
  3126.  
  3127. Prototype
  3128.  
  3129.    void fg_drawx (int ix, int iy);
  3130.    sub FGdrawx (ix%, iy%)
  3131.    subroutine fg_drawx (i*2 ix, i*2 iy)
  3132.    procedure fg_drawx (ix, iy : integer);
  3133.  
  3134. Description
  3135.  
  3136.    The fg_drawx routine draws a solid line in "exclusive or" mode from the
  3137.    graphics cursor position to an absolute screen space position.  It also
  3138.    makes the destination position the new graphics cursor position.
  3139.  
  3140. Parameters
  3141.  
  3142.    ix is the screen space x coordinate of the destination position.
  3143.  
  3144.    iy is the screen space y coordinate of the destination position.
  3145.  
  3146. Return value
  3147.  
  3148.    none
  3149.  
  3150. Restrictions
  3151.  
  3152.    This routine has no effect in text video modes.
  3153.  
  3154.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3155.    is reset to its default replacement mode on return.
  3156.  
  3157. See also
  3158.  
  3159.    fg_draw, fg_drawrelx, fg_drawxw, fg_move
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.                                       49
  3184. fg_drawxw
  3185.  
  3186. Prototype
  3187.  
  3188.    void fg_drawxw (double x, double y);
  3189.    sub FGdrawxw (x#, y#)
  3190.    subroutine fg_drawxw (r*8 x, r*8 y)
  3191.    procedure fg_drawxw (x, y : real);
  3192.  
  3193. Description
  3194.  
  3195.    The fg_drawxw routine draws a solid line in "exclusive or" mode from the
  3196.    graphics cursor position to an absolute world space position.  It also
  3197.    makes the destination position the new graphics cursor position.
  3198.  
  3199. Parameters
  3200.  
  3201.    x is the world space x coordinate of the destination position.
  3202.  
  3203.    y is the world space y coordinate of the destination position.
  3204.  
  3205. Return value
  3206.  
  3207.    none
  3208.  
  3209. Restrictions
  3210.  
  3211.    This routine is not available in Fastgraph/Light and has no effect in text
  3212.    video modes.
  3213.  
  3214.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3215.    is reset to its default replacement mode on return.
  3216.  
  3217. See also
  3218.  
  3219.    fg_drawrxw, fg_draww, fg_drawx, fg_movew
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.                                       50
  3243. fg_drect
  3244.  
  3245. Prototype
  3246.  
  3247.    void fg_drect (int minx, int maxx, int miny, int maxy, char *matrix);
  3248.    sub FGdrect (minx%, maxx%, miny%, maxy%, matrix$)
  3249.    subroutine fg_drect (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*1 matrix)
  3250.    procedure FGdrect (minx, maxx, miny, maxy : integer; var matrix : byte);
  3251.  
  3252. Description
  3253.  
  3254.    The fg_drect routine draws a dithered rectangle in screen space, without
  3255.    regard to the clipping region.
  3256.  
  3257. Parameters
  3258.  
  3259.    minx is the screen space x coordinate of the rectangle's left edge.
  3260.  
  3261.    maxx is the screen space x coordinate of the rectangle's right edge.  It
  3262.    must be greater than or equal to the value of minx.
  3263.  
  3264.    miny is the screen space y coordinate of the rectangle's top edge.
  3265.  
  3266.    maxy is the screen space y coordinate of the rectangle's bottom edge.  It
  3267.    must be greater than or equal to the value of miny.
  3268.  
  3269.    matrix is a four-element array (an eight-element array in 256-color
  3270.    graphics modes) that defines the dithering matrix.  The format of the
  3271.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  3272.    User's Guide for more information.
  3273.  
  3274. Return value
  3275.  
  3276.    none
  3277.  
  3278. Restrictions
  3279.  
  3280.    This routine has no effect in text video modes.
  3281.  
  3282. See also
  3283.  
  3284.    fg_drectw, fg_rect
  3285.  
  3286. Examples
  3287.  
  3288.    6-14, 6-15, 6-16
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.                                       51
  3302. fg_drectw
  3303.  
  3304. Prototype
  3305.  
  3306.    void fg_drectw (double xmin, double xmax, double ymin, double ymax,
  3307.      char *matrix);
  3308.    sub FGdrectw (xmin#, xmax#, ymin#, ymax#, matrix$)
  3309.    subroutine fg_drectw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax, i*1 matrix)
  3310.    procedure fg_drectw (xmin, xmax, ymin, ymax : real; var matrix : byte);
  3311.  
  3312. Description
  3313.  
  3314.    The fg_drectw routine draws a dithered rectangle in world space, without
  3315.    regard to the clipping region.
  3316.  
  3317. Parameters
  3318.  
  3319.    xmin is the world space x coordinate of the rectangle's left edge.
  3320.  
  3321.    xmax is the world space x coordinate of the rectangle's right edge.  It
  3322.    must be greater than or equal to the value of xmin.
  3323.  
  3324.    ymin is the world space y coordinate of the rectangle's bottom edge.
  3325.  
  3326.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  3327.    be greater than or equal to the value of ymin.
  3328.  
  3329.    matrix is a four-element array (an eight-element array in 256-color
  3330.    graphics modes) that defines the dithering matrix.  The format of the
  3331.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  3332.    User's Guide for more information.
  3333.  
  3334. Return value
  3335.  
  3336.    none
  3337.  
  3338. Restrictions
  3339.  
  3340.    This routine is not available in Fastgraph/Light and has no effect in text
  3341.    video modes.
  3342.  
  3343. See also
  3344.  
  3345.    fg_drect, fg_rectw
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.                                       52
  3361. fg_drwimage
  3362.  
  3363. Prototype
  3364.  
  3365.    void fg_drwimage (char *map_array, int width, int height);
  3366.    sub FGdrwimage (map_array$, width%, height%)
  3367.    subroutine fg_drwimage (i*1 map_array, i*2 width, i*2 height)
  3368.    procedure fg_drwimage (var map_array : byte; width, height : integer);
  3369.  
  3370. Description
  3371.  
  3372.    The fg_drwimage routine displays an image stored as a mode-specific bit
  3373.    map.  The image will be positioned so that its lower left corner is at the
  3374.    graphics cursor position (or the text cursor position in text video modes).
  3375.    Refer to the Fastgraph User's Guide for complete information about mode-
  3376.    specific bit maps.
  3377.  
  3378. Parameters
  3379.  
  3380.    map_array is the arbitrary-length array containing the bit map.
  3381.  
  3382.    width is the width in bytes of the bit map.
  3383.  
  3384.    height is the height in bytes (pixel rows) of the bit map.
  3385.  
  3386. Return value
  3387.  
  3388.    none
  3389.  
  3390. Restrictions
  3391.  
  3392.    none
  3393.  
  3394. See also
  3395.  
  3396.    fg_clpimage, fg_flpimage, fg_getimage, fg_putimage, fg_revimage
  3397.  
  3398. Examples
  3399.  
  3400.    10-3, 10-4, 10-5, 10-6, 10-7, 10-8, 10-9, 10-12, 10-13, 10-18
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.                                       53
  3420. fg_egacheck
  3421.  
  3422. Prototype
  3423.  
  3424.    int fg_egacheck (void);
  3425.    function FGegacheck% ()
  3426.    i*2 function fg_egacheck ()
  3427.    function fg_egacheck : integer;
  3428.  
  3429. Description
  3430.  
  3431.    The fg_egacheck routine returns information about the active EGA adapter
  3432.    and display (or the EGA emulation capabilities of a VGA).  It is useful in
  3433.    checking if the adapter has enough memory to run a program.  This function
  3434.    remains in Fastgraph for compatibility purposes; it has been replaced by
  3435.    fg_testmode.
  3436.  
  3437. Parameters
  3438.  
  3439.    none
  3440.  
  3441. Return value
  3442.  
  3443.    The fg_egacheck routine returns a value of 0 if an EGA is not found, or if
  3444.    an EGA without an Enhanced Color Display (ECD) is detected.  Otherwise,
  3445.    fg_egacheck returns a positive integer indicating the number of 64K-byte
  3446.    increments of video memory on the EGA, as summarized below.
  3447.  
  3448.      1 = EGA with 64K video memory
  3449.      2 = EGA with 128K video memory
  3450.      3 = EGA with 192K video memory
  3451.      4 = EGA with 256K video memory
  3452.  
  3453. Restrictions
  3454.  
  3455.    none
  3456.  
  3457. See also
  3458.  
  3459.    fg_testmode
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.                                       54
  3479. fg_ellipse
  3480.  
  3481. Prototype
  3482.  
  3483.    void fg_ellipse (int horiz, int vert);
  3484.    sub FGellipse (horiz%, vert%)
  3485.    subroutine fg_ellipse (i*2 horiz, i*2 vert)
  3486.    procedure fg_ellipse (horiz, vert : integer);
  3487.  
  3488. Description
  3489.  
  3490.    The fg_ellipse routine draws an unfilled ellipse in screen space.  The
  3491.    ellipse is centered at the current graphics cursor position, and its size
  3492.    is determined by the specified lengths of its semi-axes.
  3493.  
  3494. Parameters
  3495.  
  3496.    horiz is the length of the ellipse's horizontal semi-axis (the absolute
  3497.    screen space distance from the center of the ellipse to its horizontal
  3498.    extremity).
  3499.  
  3500.    vert is the length of the ellipse's vertical semi-axis (the absolute screen
  3501.    space distance from the center of the ellipse to its vertical extremity).
  3502.  
  3503. Return value
  3504.  
  3505.    none
  3506.  
  3507. Restrictions
  3508.  
  3509.    This routine has no effect in text video modes.
  3510.  
  3511. See also
  3512.  
  3513.    fg_circle, fg_ellipsef, fg_ellipsew
  3514.  
  3515. Examples
  3516.  
  3517.    6-10, 12-4, 12-5, 12-6
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.                                       55
  3538. fg_ellipsef
  3539.  
  3540. Prototype
  3541.  
  3542.    void fg_ellipsef (int horiz, int vert);
  3543.    sub FGellipsef (horiz%, vert%)
  3544.    subroutine fg_ellipsef (i*2 horiz, i*2 vert)
  3545.    procedure fg_ellipsef (horiz, vert : integer);
  3546.  
  3547. Description
  3548.  
  3549.    The fg_ellipsef routine draws a filled ellipse in screen space.  The
  3550.    ellipse is centered at the current graphics cursor position, and its size
  3551.    is determined by the specified lengths of its semi-axes.  The ellipse is
  3552.    filled with pixels of the current color.
  3553.  
  3554. Parameters
  3555.  
  3556.    horiz is the length of the ellipse's horizontal semi-axis (the absolute
  3557.    screen space distance from the center of the ellipse to its horizontal
  3558.    extremity).
  3559.  
  3560.    vert is the length of the ellipse's vertical semi-axis (the absolute screen
  3561.    space distance from the center of the ellipse to its vertical extremity).
  3562.  
  3563. Return value
  3564.  
  3565.    none
  3566.  
  3567. Restrictions
  3568.  
  3569.    This routine has no effect in text video modes.
  3570.  
  3571. See also
  3572.  
  3573.    fg_circlef, fg_ellipse, fg_ellipsfw
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.                                       56
  3597. fg_ellipsew
  3598.  
  3599. Prototype
  3600.  
  3601.    void fg_ellipsew (double horiz, double vert);
  3602.    sub FGellipsew (horiz#, vert#)
  3603.    subroutine fg_ellipsew (r*8 horiz, r*8 vert)
  3604.    procedure fg_ellipsew (horiz, vert : real);
  3605.  
  3606. Description
  3607.  
  3608.    The fg_ellipsew routine draws an unfilled ellipse in world space.  The
  3609.    ellipse is centered at the current graphics cursor position, and its size
  3610.    is determined by the specified lengths of its semi-axes.
  3611.  
  3612. Parameters
  3613.  
  3614.    horiz defines the horizontal semi-axis of the ellipse (the absolute world
  3615.    space distance from the center of the ellipse to its horizontal extremity).
  3616.  
  3617.    vert defines the vertical semi-axis of the ellipse (the absolute world
  3618.    space distance from the center of the ellipse to its vertical extremity).
  3619.  
  3620. Return value
  3621.  
  3622.    none
  3623.  
  3624. Restrictions
  3625.  
  3626.    This routine is not available in Fastgraph/Light and has no effect in text
  3627.    video modes.
  3628.  
  3629. See also
  3630.  
  3631.    fg_circlew, fg_ellipse, fg_ellipsfw
  3632.  
  3633. Examples
  3634.  
  3635.    6-9
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.                                       57
  3656. fg_ellipsfw
  3657.  
  3658. Prototype
  3659.  
  3660.    void fg_ellipsfw (double horiz, double vert);
  3661.    sub FGellipsfw (horiz#, vert#)
  3662.    subroutine fg_ellipsfw (r*8 horiz, r*8 vert)
  3663.    procedure fg_ellipsfw (horiz, vert : real);
  3664.  
  3665. Description
  3666.  
  3667.    The fg_ellipsfw routine draws a filled ellipse in world space.  The
  3668.    ellipse is centered at the current graphics cursor position, and its size
  3669.    is determined by the specified lengths of its semi-axes.  The ellipse is
  3670.    filled with pixels of the current color.
  3671.  
  3672. Parameters
  3673.  
  3674.    horiz defines the horizontal semi-axis of the ellipse (the absolute world
  3675.    space distance from the center of the ellipse to its horizontal extremity).
  3676.  
  3677.    vert defines the vertical semi-axis of the ellipse (the absolute world
  3678.    space distance from the center of the ellipse to its vertical extremity).
  3679.  
  3680. Return value
  3681.  
  3682.    none
  3683.  
  3684. Restrictions
  3685.  
  3686.    This routine is not available in Fastgraph/Light and has no effect in text
  3687.    video modes.
  3688.  
  3689. See also
  3690.  
  3691.    fg_circlefw, fg_ellipsew
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.                                       58
  3715. fg_erase
  3716.  
  3717. Prototype
  3718.  
  3719.    void fg_erase (void);
  3720.    sub FGerase ()
  3721.    subroutine fg_erase ()
  3722.    procedure fg_erase;
  3723.  
  3724. Description
  3725.  
  3726.    The fg_erase routine clears the active video page.  In text modes, fg_erase
  3727.    stores a space character (ASCII 32) with a gray foreground attribute in
  3728.    each character cell.  In graphics modes, fg_erase sets each pixel to zero.
  3729.  
  3730. Parameters
  3731.  
  3732.    none
  3733.  
  3734. Return value
  3735.  
  3736.    none
  3737.  
  3738. Restrictions
  3739.  
  3740.    none
  3741.  
  3742. See also
  3743.  
  3744.    fg_fillpage, fg_reset
  3745.  
  3746. Examples
  3747.  
  3748.    4-3, 8-9, 8-10, 8-12, 9-5, 10-16, 11-1
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.                                       59
  3774. fg_fadein
  3775.  
  3776. Prototype
  3777.  
  3778.    void fg_fadein (int delay);
  3779.    sub FGfadein (delay%)
  3780.    subroutine fg_fadein (i*2 delay)
  3781.    procedure fg_fadein (delay : integer);
  3782.  
  3783. Description
  3784.  
  3785.    The fg_fadein routine replaces the visual page contents with the hidden
  3786.    page contents.  The replacement is done randomly in small sections, thus
  3787.    giving a "fade in" effect.
  3788.  
  3789. Parameters
  3790.  
  3791.    delay controls the speed at which the replacement takes place.  A value of
  3792.    zero means to perform the replacement as quickly as possible, while 1 is
  3793.    slightly slower, 2 is slower yet, and so forth.
  3794.  
  3795. Return value
  3796.  
  3797.    none
  3798.  
  3799. Restrictions
  3800.  
  3801.    This routine has no effect in text video modes.
  3802.  
  3803. See also
  3804.  
  3805.    fg_fadeout, fg_sethpage
  3806.  
  3807. Examples
  3808.  
  3809.    13-2
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.                                       60
  3833. fg_fadeout
  3834.  
  3835. Prototype
  3836.  
  3837.    void fg_fadeout (int delay);
  3838.    sub FGfadeout (delay%)
  3839.    subroutine fg_fadeout (i*2 delay)
  3840.    procedure fg_fadeout (delay : integer);
  3841.  
  3842. Description
  3843.  
  3844.    The fg_fadeout routine replaces the visual page contents with pixels of the
  3845.    current color.  The replacement is done randomly in small sections, thus
  3846.    giving a "fade out" effect.
  3847.  
  3848. Parameters
  3849.  
  3850.    delay controls the speed at which the replacement takes place.  A value of
  3851.    zero means to perform the replacement as quickly as possible, while 1 is
  3852.    slightly slower, 2 is slower yet, and so forth.
  3853.  
  3854. Return value
  3855.  
  3856.    none
  3857.  
  3858. Restrictions
  3859.  
  3860.    This routine has no effect in text video modes.
  3861.  
  3862. See also
  3863.  
  3864.    fg_fadein, fg_setcolor
  3865.  
  3866. Examples
  3867.  
  3868.    13-1
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.                                       61
  3892. fg_fillpage
  3893.  
  3894. Prototype
  3895.  
  3896.    void fg_fillpage (void);
  3897.    sub FGfillpage ()
  3898.    subroutine fg_fillpage ()
  3899.    procedure fg_fillpage;
  3900.  
  3901. Description
  3902.  
  3903.    The fg_fillpage routine fills the active video page.  In text modes, it
  3904.    stores a solid block character (ASCII 219) with the current display
  3905.    attribute in each character cell.  In graphics modes, fg_fillpage fills the
  3906.    active video page with pixels of the current color.
  3907.  
  3908. Parameters
  3909.  
  3910.    none
  3911.  
  3912. Return value
  3913.  
  3914.    none
  3915.  
  3916. Restrictions
  3917.  
  3918.    none
  3919.  
  3920. See also
  3921.  
  3922.    fg_erase, fg_setcolor, fg_setattr
  3923.  
  3924. Examples
  3925.  
  3926.    7-6, 7-8, 8-11, 10-8, 10-9
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.                                       62
  3951. fg_flipmask
  3952.  
  3953. Prototype
  3954.  
  3955.    void fg_flipmask (char *map_array, int runs, int width);
  3956.    sub FGflipmask (map_array$, runs%, width%)
  3957.    subroutine fg_flipmask (i*1 map_array, i*2 runs, i*2 width)
  3958.    procedure fg_flipmask (var map_array : byte; runs, width : integer);
  3959.  
  3960. Description
  3961.  
  3962.    The fg_flipmask routine displays a reversed clipped image stored as a
  3963.    masking map.  The image will be positioned so that its lower left corner is
  3964.    at the graphics cursor position.  Refer to the description of the
  3965.    fg_drawmask routine for more information about masking maps.
  3966.  
  3967. Parameters
  3968.  
  3969.    map_array is the arbitrary-length array containing the masking map.
  3970.  
  3971.    runs is the number of pixel runs in the masking map.
  3972.  
  3973.    width is the width in pixels of the masking map.
  3974.  
  3975. Return value
  3976.  
  3977.    none
  3978.  
  3979. Restrictions
  3980.  
  3981.    This routine has no effect in text video modes.
  3982.  
  3983. See also
  3984.  
  3985.    fg_clipmask, fg_drawmask, fg_revmask, fg_setclip
  3986.  
  3987. Examples
  3988.  
  3989.    10-17
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.                                       63
  4010. fg_flood
  4011.  
  4012. Prototype
  4013.  
  4014.    void fg_flood (int ix, int iy);
  4015.    sub FGflood (ix%, iy%)
  4016.    subroutine fg_flood (i*2 ix, i*2 iy)
  4017.    procedure fg_flood (ix, iy : integer);
  4018.  
  4019. Description
  4020.  
  4021.    The fg_flood routine fills an arbitrary closed region with the current
  4022.    color value, with respect to the current clipping limits.  The region is
  4023.    defined by specifying a screen space point within its interior.
  4024.  
  4025. Parameters
  4026.  
  4027.    ix is the screen space x coordinate of the interior point.
  4028.  
  4029.    iy is the screen space y coordinate of the interior point.
  4030.  
  4031. Return value
  4032.  
  4033.    none
  4034.  
  4035. Restrictions
  4036.  
  4037.    This routine has no effect in text video modes.
  4038.  
  4039. See also
  4040.  
  4041.    fg_floodw, fg_paint
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.                                       64
  4069. fg_floodw
  4070.  
  4071. Prototype
  4072.  
  4073.    void fg_floodw (double x, double y);
  4074.    sub FGfloodw (x#, y#)
  4075.    subroutine fg_floodw (r*8 x, r*8 y)
  4076.    procedure fg_floodw (x, y : real);
  4077.  
  4078. Description
  4079.  
  4080.    The fg_floodw routine fills an arbitrary closed region with the current
  4081.    color value, with respect to the current clipping limits.  The region is
  4082.    defined by specifying a world space point within its interior.
  4083.  
  4084. Parameters
  4085.  
  4086.    x is the world space x coordinate of the interior point.
  4087.  
  4088.    y is the world space y coordinate of the interior point.
  4089.  
  4090. Return value
  4091.  
  4092.    none
  4093.  
  4094. Restrictions
  4095.  
  4096.    This routine is not available in Fastgraph/Light and has no effect in text
  4097.    video modes.
  4098.  
  4099. See also
  4100.  
  4101.    fg_flood, fg_paintw
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.                                       65
  4128. fg_flpimage
  4129.  
  4130. Prototype
  4131.  
  4132.    void fg_flpimage (char *map_array, int width, int height);
  4133.    sub FGflpimage (map_array$, width%, height%)
  4134.    subroutine fg_flpimage (i*1 map_array, i*2 width, i*2 height)
  4135.    procedure fg_flpimage (var map_array : byte; width, height : integer);
  4136.  
  4137. Description
  4138.  
  4139.    The fg_flpimage routine displays a reversed clipped image stored as a mode-
  4140.    specific bit map.  The image will be positioned so that its lower left
  4141.    corner is at the graphics cursor position.  Only that part of the image
  4142.    that falls within the current clipping limits will be displayed.  Refer to
  4143.    the Fastgraph User's Guide for complete information about mode-specific bit
  4144.    maps.
  4145.  
  4146. Parameters
  4147.  
  4148.    map_array is the arbitrary-length array containing the bit map.
  4149.  
  4150.    width is the width in bytes of the bit map.
  4151.  
  4152.    height is the height in bytes (pixel rows) of the bit map.
  4153.  
  4154. Return value
  4155.  
  4156.    none
  4157.  
  4158. Restrictions
  4159.  
  4160.    This routine has no effect in text video modes.
  4161.  
  4162. See also
  4163.  
  4164.    fg_clpimage, fg_drwimage, fg_getimage, fg_putimage, fg_revimage, fg_setclip
  4165.  
  4166. Examples
  4167.  
  4168.    10-8, 10-9
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.                                       66
  4187. fg_fontsize
  4188.  
  4189. Prototype
  4190.  
  4191.    void fg_fontsize (int char_height);
  4192.    sub FGfontsize (char_height%)
  4193.    subroutine fg_fontsize (i*2 char_height)
  4194.    procedure fg_fontsize (char_height : integer);
  4195.  
  4196. Description
  4197.  
  4198.    The fg_fontsize routine enables the 8x8, 8x14, or 8x16 ROM BIOS character
  4199.    font for strings displayed with fg_print and fg_text.  Refer to Chapter 7
  4200.    of the Fastgraph User's Guide for information about the default character
  4201.    sizes and number of text rows available in each video mode.
  4202.  
  4203. Parameters
  4204.  
  4205.    char_height is the desired character height in pixels.  Its value must be
  4206.    8, 14, or 16.
  4207.  
  4208. Return value
  4209.  
  4210.    none
  4211.  
  4212. Restrictions
  4213.  
  4214.    If char_height is not a valid value, fg_fontsize does nothing.
  4215.  
  4216.    This routine is meaningful only in VGA and SVGA graphics video modes.
  4217.  
  4218. See also
  4219.  
  4220.    fg_print, fg_text
  4221.  
  4222. Examples
  4223.  
  4224.    7-8
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.                                       67
  4246. fg_freepage
  4247.  
  4248. Prototype
  4249.  
  4250.    int fg_freepage (int page_number);
  4251.    function FGfreepage% (page_number%)
  4252.    i*2 function fg_freepage (i*2 page_number)
  4253.    function fg_freepage (page_number : integer) : integer;
  4254.  
  4255. Description
  4256.  
  4257.    The fg_freepage routine releases a virtual or logical video page created
  4258.    with the fg_allocate, fg_alloccms, fg_allocems, or fg_allocxms routines.
  4259.  
  4260. Parameters
  4261.  
  4262.    page_number is the number of the virtual or logical page to release.  It
  4263.    must be between 0 and 63.
  4264.  
  4265. Return value
  4266.  
  4267.    A status code indicating the success or failure of the virtual page
  4268.    release, as shown below.
  4269.  
  4270.      0 = virtual page released
  4271.      1 = specified page is a physical page
  4272.      7 = virtual page released, but memory control blocks destroyed
  4273.      9 = attempt to release a virtual or logical page that was never created
  4274.  
  4275. Restrictions
  4276.  
  4277.    This routine has no effect if page_number references a physical video page,
  4278.    or a virtual page that was never created.
  4279.  
  4280. See also
  4281.  
  4282.    fg_allocate, fg_alloccms, fg_allocems, fg_allocxms
  4283.  
  4284. Examples
  4285.  
  4286.    8-3, 8-4, 8-5, 8-6, 8-8, 8-9, 8-11, 11-1, 11-2, 11-3, 11-4, 12-4, 12-5,
  4287.    13-2, 13-5, 17-1
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.                                       68
  4305. fg_getaddr
  4306.  
  4307. Prototype
  4308.  
  4309.    int fg_getaddr (void);
  4310.    function FGgetaddr% ()
  4311.    i*2 function fg_getaddr ()
  4312.    function fg_getaddr : integer;
  4313.  
  4314. Description
  4315.  
  4316.    The fg_getaddr routine returns the segment address of the active video
  4317.    page.
  4318.  
  4319. Parameters
  4320.  
  4321.    none
  4322.  
  4323. Return value
  4324.  
  4325.    The segment address of the active video page.
  4326.  
  4327. Restrictions
  4328.  
  4329.    none
  4330.  
  4331. See also
  4332.  
  4333.    fg_setpage
  4334.  
  4335. Examples
  4336.  
  4337.    8-8
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.                                       69
  4364. fg_getattr
  4365.  
  4366. Prototype
  4367.  
  4368.    int fg_getattr (int row, int column);
  4369.    function FGgetattr% (row%, column%)
  4370.    i*2 function fg_getattr (i*2 row, i*2 column)
  4371.    function fg_getattr (row, column : integer) : integer;
  4372.  
  4373. Description
  4374.  
  4375.    The fg_getattr routine returns the character attribute stored at the
  4376.    specified position on the active video page.
  4377.  
  4378. Parameters
  4379.  
  4380.    row is the row number of the character cell to examine, between 0 and 24
  4381.    (unless you've called fg_setlines to increase the number of lines per
  4382.    page).
  4383.  
  4384.    column is the column number of the character cell to examine, between 0 and
  4385.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  4386.  
  4387. Return value
  4388.  
  4389.    The character attribute stored at the specified position.
  4390.  
  4391. Restrictions
  4392.  
  4393.    This routine has no effect in graphics video modes.
  4394.  
  4395. See also
  4396.  
  4397.    fg_getchar, fg_getimage
  4398.  
  4399. Examples
  4400.  
  4401.    7-4
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.                                       70
  4423. fg_getblock
  4424.  
  4425. Prototype
  4426.  
  4427.    void fg_getblock (char far *buffer, int minx, int maxx, int miny,
  4428.      int maxy);
  4429.    sub FGgetblock (buffer$, minx%, maxx%, miny%, maxy%)
  4430.    subroutine fg_getblock (i*1 far buffer, i*2 minx, i*2 maxx, i*2 miny,
  4431.      i*2 maxy)
  4432.    procedure fg_getblock (buffer : pointer; minx, maxx, miny, maxy : integer);
  4433.  
  4434. Description
  4435.  
  4436.    The fg_getblock routine retrieves a block (for later display with
  4437.    fg_putblock) from the specified position on the active video page.  In text
  4438.    modes, the block extremes are defined in character space; in graphics
  4439.    modes, they are defined in screen space.  Use the fg_imagesiz routine to
  4440.    determine the array size required to store the block.
  4441.  
  4442. Parameters
  4443.  
  4444.    buffer is the address of the array to receive the block.  Note that this is
  4445.    passed by FAR reference, except in QuickBASIC.
  4446.  
  4447.    minx is the screen space x coordinate of the block's left edge.  In
  4448.    graphics modes, its value is reduced to a byte boundary if necessary.
  4449.  
  4450.    maxx is the x coordinate of the block's right edge.  It must be greater
  4451.    than or equal to the value of minx.  In graphics modes, its value is
  4452.    extended to a byte boundary if necessary.
  4453.  
  4454.    miny is the y coordinate of the block's top edge.
  4455.  
  4456.    maxy is the y coordinate of the block's bottom edge.  It must be greater
  4457.    than or equal to the value of miny.
  4458.  
  4459. Return value
  4460.  
  4461.    none
  4462.  
  4463. Restrictions
  4464.  
  4465.    The maximum size of a block is 64K bytes.
  4466.  
  4467.    In Pascal programs, buffer must be allocated dynamically with the GetMem
  4468.    procedure.  This is the only way to pass something by far reference in
  4469.    Pascal.
  4470.  
  4471. See also
  4472.  
  4473.    fg_imagesiz, fg_putblock
  4474.  
  4475. Examples
  4476.  
  4477.    11-8
  4478.  
  4479.  
  4480.  
  4481.                                       71
  4482. fg_getchar
  4483.  
  4484. Prototype
  4485.  
  4486.    int fg_getchar (int row, int column);
  4487.    function FGgetchar% (row%, column%)
  4488.    i*2 function fg_getchar (i*2 row, i*2 column)
  4489.    function fg_getchar (row, column : integer) : integer;
  4490.  
  4491. Description
  4492.  
  4493.    The fg_getchar routine returns the character value stored at the specified
  4494.    position on the active video page.
  4495.  
  4496. Parameters
  4497.  
  4498.    row is the row number of the character cell to examine, between 0 and 24
  4499.    (unless you've called fg_setlines to increase the number of lines per
  4500.    page).
  4501.  
  4502.    column is the column number of the character cell to examine, between 0 and
  4503.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  4504.  
  4505. Return value
  4506.  
  4507.    The character value stored at the specified position.
  4508.  
  4509. Restrictions
  4510.  
  4511.    This routine has no effect in graphics video modes.
  4512.  
  4513. See also
  4514.  
  4515.    fg_getattr, fg_getimage
  4516.  
  4517. Examples
  4518.  
  4519.    7-4
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.                                       72
  4541. fg_getclock
  4542.  
  4543. Prototype
  4544.  
  4545.    long fg_getclock (void);
  4546.    function FGgetclock& ()
  4547.    i*4 function fg_getclock ()
  4548.    function fg_getclock : longint;
  4549.  
  4550. Description
  4551.  
  4552.    The fg_getclock routine returns the number of clock ticks since midnight.
  4553.  
  4554. Parameters
  4555.  
  4556.    none
  4557.  
  4558. Return value
  4559.  
  4560.    The number of clock ticks since midnight.  There are approximately 18.2
  4561.    clock ticks per second.
  4562.  
  4563. Restrictions
  4564.  
  4565.    none
  4566.  
  4567. Examples
  4568.  
  4569.    16-2
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.                                       73
  4600. fg_getcolor
  4601.  
  4602. Prototype
  4603.  
  4604.    int fg_getcolor (void);
  4605.    function FGgetcolor% ()
  4606.    i*2 function fg_getcolor ()
  4607.    function fg_getcolor : integer;
  4608.  
  4609. Description
  4610.  
  4611.    The fg_getcolor routine returns the current text attribute (in text modes)
  4612.    or color index (in graphics modes), as defined by the most recent call to
  4613.    fg_setattr or fg_setcolor.
  4614.  
  4615. Parameters
  4616.  
  4617.    none
  4618.  
  4619. Return value
  4620.  
  4621.    In graphics video modes, the return value is the current color index.  In
  4622.    text modes, it is the current text attribute.
  4623.  
  4624. Restrictions
  4625.  
  4626.    none
  4627.  
  4628. See also
  4629.  
  4630.    fg_setattr, fg_setcolor
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.                                       74
  4659. fg_getdacs
  4660.  
  4661. Prototype
  4662.  
  4663.    void fg_getdacs (int start, int count, char *values);
  4664.    sub FGgetdacs (start%, count%, values$)
  4665.    subroutine fg_getdacs (i*2 start, i*2 count, i*1 values)
  4666.    procedure fg_getdacs (start, count : integer; var values : shortint);
  4667.  
  4668. Description
  4669.  
  4670.    The fg_getdacs routine retrieves the red, green, and blue color components
  4671.    of a contiguous block of video DAC registers.  Each color component is a
  4672.    value between 0 and 63; increasing values produce more intense colors.
  4673.    Reading many DAC registers with fg_getdacs is considerably faster than
  4674.    doing so individually with fg_getrgb.
  4675.  
  4676. Parameters
  4677.  
  4678.    start is the starting video DAC register number, between 0 and 255.
  4679.  
  4680.    count is the number of contiguous DAC registers to retrieve, between 1 and
  4681.    256.  If the sum of start and count exceeds 255, the register numbers wrap
  4682.    around and resume with register number 0.
  4683.  
  4684.    values is the array that will receive the color components.  The first
  4685.    three bytes of this array receive the red, green, and blue components for
  4686.    DAC register start, the next three bytes receive the components for
  4687.    register start+1, and so forth.  The size of the values array must be at
  4688.    least 3*count bytes.
  4689.  
  4690. Return value
  4691.  
  4692.    none
  4693.  
  4694. Restrictions
  4695.  
  4696.    This routine has no effect in text modes, or in CGA, Tandy, and Hercules
  4697.    graphics modes.  In modes 13 to 16, it is meaningful only when run on a VGA
  4698.    or SVGA system; its results are unpredictable in these modes when run on an
  4699.    EGA.  You can use fg_testmode(18,0) to check for a VGA or SVGA system.
  4700.  
  4701. See also
  4702.  
  4703.    fg_getrgb, fg_setdacs, fg_setrgb
  4704.  
  4705. Examples
  4706.  
  4707.    5-12
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.                                       75
  4718. fg_getentry
  4719.  
  4720. Prototype
  4721.  
  4722.    void fg_getentry (int page_number, int *page_addr, int *page_type);
  4723.    sub FGgetentry (page_number%, page_addr%, page_type%)
  4724.    subroutine fg_getentry (i*2 page_number, i*2 page_addr, i*2 page_type)
  4725.    procedure fg_getentry (page_number : integer; var page_addr,
  4726.      page_type : integer);
  4727.  
  4728. Description
  4729.  
  4730.    The fg_getentry routine retrieves the type and address of a physical,
  4731.    virtual, or logical video page.  This routine is useful for saving virtual
  4732.    or logical page contents across video mode changes.
  4733.  
  4734. Parameters
  4735.  
  4736.    page_number is the number of the desired video page.  It must be between 0
  4737.    and 63.
  4738.  
  4739.    page_addr is the address of the specified page.  For physical pages,
  4740.    virtual pages, and logical pages in conventional memory, the address is an
  4741.    ordinary segment address.  For logical pages in EMS or XMS memory, the page
  4742.    address is an EMS or XMS handle.
  4743.  
  4744.    page_type is a return value indicating the page type, as shown below:
  4745.      0 = unallocated page
  4746.      1 = physical page
  4747.      2 = virtual page
  4748.      3 = logical page in expanded memory (EMS)
  4749.      4 = logical page in extended memory (XMS)
  4750.      5 = logical page in conventional memory
  4751.  
  4752. Return value
  4753.  
  4754.    none
  4755.  
  4756. Restrictions
  4757.  
  4758.    none
  4759.  
  4760. See also
  4761.  
  4762.    fg_setentry
  4763.  
  4764. Examples
  4765.  
  4766.    8-11
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.                                       76
  4777. fg_gethpage
  4778.  
  4779. Prototype
  4780.  
  4781.    int fg_gethpage (void);
  4782.    function FGgethpage% ()
  4783.    i*2 function fg_gethpage ()
  4784.    function fg_gethpage : integer;
  4785.  
  4786. Description
  4787.  
  4788.    The fg_gethpage routine returns the hidden video page number (as set in the
  4789.    most recent call to fg_sethpage).
  4790.  
  4791. Parameters
  4792.  
  4793.    none
  4794.  
  4795. Return value
  4796.  
  4797.    The number of the hidden video page, between 0 and 63.
  4798.  
  4799. Restrictions
  4800.  
  4801.    none
  4802.  
  4803. See also
  4804.  
  4805.    fg_sethpage
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.                                       77
  4836. fg_getimage
  4837.  
  4838. Prototype
  4839.  
  4840.    void fg_getimage (char *map_array, int width, int height);
  4841.    sub FGgetimage (map_array$, width%, height%)
  4842.    subroutine fg_getimage (i*1 map_array, i*2 width, i*2 height)
  4843.    procedure fg_getimage (var map_array : byte; width, height : integer);
  4844.  
  4845. Description
  4846.  
  4847.    The fg_getimage routine retrieves an image as a mode-specific bit map.  The
  4848.    graphics cursor position (the text cursor position in text video modes)
  4849.    defines the lower left corner of the image to retrieve. Refer to the
  4850.    Fastgraph User's Guide for complete information about mode-specific bit
  4851.    maps.
  4852.  
  4853. Parameters
  4854.  
  4855.    map_array is the arbitrary-length array in which to retrieve the bit map.
  4856.    In BASIC, you must explicitly declare map_array as a fixed-length string
  4857.    variable of length width*height.
  4858.  
  4859.    width is the width in bytes of the bit map.
  4860.  
  4861.    height is the height in bytes (pixel rows) of the bit map.
  4862.  
  4863. Return value
  4864.  
  4865.    none
  4866.  
  4867. Restrictions
  4868.  
  4869.    none
  4870.  
  4871. See also
  4872.  
  4873.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getmap, fg_putimage, fg_revimage
  4874.  
  4875. Examples
  4876.  
  4877.    10-12, 10-13
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.                                       78
  4895. fg_getindex
  4896.  
  4897. Prototype
  4898.  
  4899.    int fg_getindex (int index);
  4900.    function FGgetindex% (index%)
  4901.    i*2 function fg_getindex (i*2 index)
  4902.    function fg_getindex (index : integer) : integer;
  4903.  
  4904. Description
  4905.  
  4906.    The fg_getindex routine returns the color value assigned to a specified
  4907.    virtual color index.
  4908.  
  4909. Parameters
  4910.  
  4911.    index is the virtual color index to retrieve, between 0 and 255.
  4912.  
  4913. Return value
  4914.  
  4915.    In graphics video modes with fewer than 256 available colors, the return
  4916.    value is the color value assigned to the specified virtual index.  In text
  4917.    modes and 256-color graphics modes, the fg_getindex routine returns the
  4918.    value passed to it.
  4919.  
  4920. Restrictions
  4921.  
  4922.    none
  4923.  
  4924. See also
  4925.  
  4926.    fg_defcolor, fg_palette, fg_setcolor
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.                                       79
  4954. fg_getkey
  4955.  
  4956. Prototype
  4957.  
  4958.    void fg_getkey (unsigned char *key, unsigned char *aux);
  4959.    sub FGgetkey (key$, aux$)
  4960.    subroutine fg_getkey (i*1 key, i*1 aux)
  4961.    procedure fg_getkey (var key, aux : byte);
  4962.  
  4963. Description
  4964.  
  4965.    The fg_getkey routine waits for a keystroke, or reads the next entry from
  4966.    the BIOS keyboard buffer (without echo).  It returns the keystroke's
  4967.    standard or extended keyboard code (a list of these appears in Chapter 14
  4968.    of the Fastgraph User's Guide).
  4969.  
  4970. Parameters
  4971.  
  4972.    key receives the keystroke's standard keyboard code if it represents a
  4973.    standard character.  If the keystroke represents an extended character, key
  4974.    will be set to zero.  In BASIC, you must explicitly declare key as a fixed-
  4975.    length string variable of length 1.
  4976.  
  4977.    aux receives the keystroke's extended keyboard code if it represents an
  4978.    extended character.  If the keystroke represents a standard character, aux
  4979.    will be set to zero.  In BASIC, you must explicitly declare aux as a fixed-
  4980.    length string variable of length 1.
  4981.  
  4982. Return value
  4983.  
  4984.    none
  4985.  
  4986. Restrictions
  4987.  
  4988.    none
  4989.  
  4990. See also
  4991.  
  4992.    fg_intkey, fg_kbtest, fg_waitkey
  4993.  
  4994. Examples
  4995.  
  4996.    13-7, 14-1, 16-2
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.                                       80
  5013. fg_getlines
  5014.  
  5015. Prototype
  5016.  
  5017.    int fg_getlines (void);
  5018.    function FGgetlines% ()
  5019.    i*2 function fg_getlines ()
  5020.    function fg_getlines : integer;
  5021.  
  5022. Description
  5023.  
  5024.    The fg_getlines routine returns the number of text rows per video page for
  5025.    the current video mode.
  5026.  
  5027. Parameters
  5028.  
  5029.    none
  5030.  
  5031. Return value
  5032.  
  5033.    The number of text rows per video page for the current video mode.
  5034.  
  5035. Restrictions
  5036.  
  5037.    none
  5038.  
  5039. See also
  5040.  
  5041.    fg_fontsize, fg_setlines
  5042.  
  5043. Examples
  5044.  
  5045.    3-5
  5046.  
  5047.  
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.                                       81
  5072. fg_getmap
  5073.  
  5074. Prototype
  5075.  
  5076.    void fg_getmap (char *map_array, int width, int height);
  5077.    sub FGgetmap (map_array$, width%, height%)
  5078.    subroutine fg_getmap (i*1 map_array, i*2 width, i*2 height)
  5079.    procedure fg_getmap (var map_array : byte; width, height : integer);
  5080.  
  5081. Description
  5082.  
  5083.    The fg_getmap routine retrieves an image as a mode-independent bit map.
  5084.    The graphics cursor position defines the lower left corner of the image to
  5085.    retrieve.  Refer to the Fastgraph User's Guide for complete information
  5086.    about mode-independent bit maps.
  5087.  
  5088. Parameters
  5089.  
  5090.    map_array is the arbitrary-length array in which to retrieve the bit map.
  5091.    Each byte of map_array represents eight pixels.  Pixels of the current
  5092.    color set the corresponding bits in map_array.  Pixels of other colors make
  5093.    the corresponding map_array bits zero.  In BASIC, you must explicitly
  5094.    declare map_array as a fixed-length string variable of length width*height.
  5095.  
  5096.    width is the width in bytes of the bit map.
  5097.  
  5098.    height is the height in bytes (pixel rows) of the bit map.
  5099.  
  5100. Return value
  5101.  
  5102.    none
  5103.  
  5104. Restrictions
  5105.  
  5106.    This routine has no effect in text video modes.
  5107.  
  5108. See also
  5109.  
  5110.    fg_drawmap, fg_getimage
  5111.  
  5112. Examples
  5113.  
  5114.    10-10, 10-11
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.                                       82
  5131. fg_getmaxx
  5132.  
  5133. Prototype
  5134.  
  5135.    int fg_getmaxx (void);
  5136.    function FGgetmaxx% ()
  5137.    i*2 function fg_getmaxx ()
  5138.    function fg_getmaxx : integer;
  5139.  
  5140. Description
  5141.  
  5142.    The fg_getmaxx routine returns the maximum x coordinate in screen space
  5143.    when used in a graphics video mode.  It returns the maximum column number
  5144.    in character space when used in a text mode.  In either case, the maximum x
  5145.    coordinate is one less than the horizontal screen resolution.
  5146.  
  5147. Parameters
  5148.  
  5149.    none
  5150.  
  5151. Return value
  5152.  
  5153.    The maximum x coordinate.
  5154.  
  5155. Restrictions
  5156.  
  5157.    none
  5158.  
  5159. See also
  5160.  
  5161.    fg_getmaxy
  5162.  
  5163. Examples
  5164.  
  5165.    4-1, 4-2
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.                                       83
  5190. fg_getmaxy
  5191.  
  5192. Prototype
  5193.  
  5194.    int fg_getmaxy (void);
  5195.    function FGgetmaxy% ()
  5196.    i*2 function fg_getmaxy ()
  5197.    function fg_getmaxy : integer;
  5198.  
  5199. Description
  5200.  
  5201.    The fg_getmaxy routine returns the maximum y coordinate in screen space
  5202.    when used in a graphics video mode.  It returns the maximum row number in
  5203.    character space when used in a text mode.  In either case, the maximum y
  5204.    coordinate is one less than the vertical screen resolution.
  5205.  
  5206. Parameters
  5207.  
  5208.    none
  5209.  
  5210. Return value
  5211.  
  5212.    The maximum y coordinate.
  5213.  
  5214. Restrictions
  5215.  
  5216.    none
  5217.  
  5218. See also
  5219.  
  5220.    fg_getmaxx
  5221.  
  5222. Examples
  5223.  
  5224.    4-1, 4-2
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.                                       84
  5249. fg_getmode
  5250.  
  5251. Prototype
  5252.  
  5253.    int fg_getmode (void);
  5254.    function FGgetmode% ()
  5255.    i*2 function fg_getmode ()
  5256.    function fg_getmode : integer;
  5257.  
  5258. Description
  5259.  
  5260.    The fg_getmode routine returns the current video mode number.  It is
  5261.    typically one of the first Fastgraph routines called in a program.  The
  5262.    value returned by fg_getmode can be retained to restore the original video
  5263.    mode when a program transfers control back to DOS.
  5264.  
  5265. Parameters
  5266.  
  5267.    none
  5268.  
  5269. Return value
  5270.  
  5271.    The current video mode number, between 0 and 29.  Refer to the description
  5272.    of the fg_setmode routine for descriptions of each video mode.
  5273.  
  5274. Restrictions
  5275.  
  5276.    none
  5277.  
  5278. See also
  5279.  
  5280.    fg_setmode
  5281.  
  5282. Examples
  5283.  
  5284.    3-3, 3-4, 3-5, 3-6, 3-7, 3-8, 3-10
  5285.  
  5286.  
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.                                       85
  5308. fg_getpage
  5309.  
  5310. Prototype
  5311.  
  5312.    int fg_getpage (void);
  5313.    function FGgetpage% ()
  5314.    i*2 function fg_getpage ()
  5315.    function fg_getpage : integer;
  5316.  
  5317. Description
  5318.  
  5319.    The fg_getpage routine returns the active video page number (as set in the
  5320.    most recent call to fg_setpage).
  5321.  
  5322. Parameters
  5323.  
  5324.    none
  5325.  
  5326. Return value
  5327.  
  5328.    The number of the active video page, between 0 and 63.
  5329.  
  5330. Restrictions
  5331.  
  5332.    none
  5333.  
  5334. See also
  5335.  
  5336.    fg_setpage
  5337.  
  5338. Examples
  5339.  
  5340.    8-8
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.                                       86
  5367. fg_getpixel
  5368.  
  5369. Prototype
  5370.  
  5371.    int fg_getpixel (int ix, int iy);
  5372.    function FGgetpixel% (ix%, iy%)
  5373.    i*2 function fg_getpixel (i*2 ix, i*2 iy)
  5374.    function fg_getpixel (ix, iy : integer) : integer;
  5375.  
  5376. Description
  5377.  
  5378.    The fg_getpixel routine returns the color value of a specified pixel.
  5379.  
  5380. Parameters
  5381.  
  5382.    ix is the pixel's screen space x coordinate.
  5383.  
  5384.    iy is the pixel's screen space y coordinate.
  5385.  
  5386. Return value
  5387.  
  5388.    The color value of the pixel, between 0 and one less than the number of
  5389.    colors available in the current video mode.  In text modes, fg_getpixel
  5390.    always returns zero.
  5391.  
  5392. Restrictions
  5393.  
  5394.    none
  5395.  
  5396. See also
  5397.  
  5398.    fg_point, fg_pointw
  5399.  
  5400. Examples
  5401.  
  5402.    6-1
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.                                       87
  5426. fg_getrgb
  5427.  
  5428. Prototype
  5429.  
  5430.    void fg_getrgb (int number, int *red, int *green, int *blue);
  5431.    sub FGgetrgb (number%, red%, green%, blue%)
  5432.    subroutine fg_getrgb (i*2 number, i*2 red, i*2 green, i*2 blue)
  5433.    procedure fg_getrgb (number : integer; var red, green, blue : integer);
  5434.  
  5435. Description
  5436.  
  5437.    The fg_getrgb routine returns the red, green, and blue color components for
  5438.    a specified video DAC register.  Each color component is a value between 0
  5439.    and 63; increasing values produce more intense colors.
  5440.  
  5441. Parameters
  5442.  
  5443.    number is the video DAC register number.  It must be between 0 and 15 in
  5444.    video modes 17, 18, 28, and 29, and between 0 and 255 in modes 19 through
  5445.    27.  It may also assume the values 13, 14, or 16 when run on a VGA or SVGA
  5446.    system.  This routine has no effect in these modes when run on an EGA
  5447.    system.
  5448.  
  5449.    red, green, and blue respectively receive the red, green, and blue
  5450.    components of the specified video DAC register.
  5451.  
  5452. Return value
  5453.  
  5454.    none
  5455.  
  5456. Restrictions
  5457.  
  5458.    This routine has no effect in text video modes, or in any graphics video
  5459.    mode numbered 16 or below (because these video modes do not use DAC
  5460.    registers).
  5461.  
  5462. See also
  5463.  
  5464.    fg_getdacs, fg_palette, fg_setdacs, fg_setrgb
  5465.  
  5466. Examples
  5467.  
  5468.    5-11
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.                                       88
  5485. fg_getvpage
  5486.  
  5487. Prototype
  5488.  
  5489.    int fg_getvpage (void);
  5490.    function FGgetvpage% ()
  5491.    i*2 function fg_getvpage ()
  5492.    function fg_getvpage : integer;
  5493.  
  5494. Description
  5495.  
  5496.    The fg_getvpage routine returns the visual video page number (as set in the
  5497.    most recent call to fg_setvpage).
  5498.  
  5499. Parameters
  5500.  
  5501.    none
  5502.  
  5503. Return value
  5504.  
  5505.    The number of the visual video page, between 0 and 63.
  5506.  
  5507. Restrictions
  5508.  
  5509.    none
  5510.  
  5511. See also
  5512.  
  5513.    fg_setvpage
  5514.  
  5515. Examples
  5516.  
  5517.    8-8
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.                                       89
  5544. fg_getworld
  5545.  
  5546. Prototype
  5547.  
  5548.    void fg_getworld (double *xmin, double *xmax, double *ymin, double *ymax);
  5549.    sub FGgetworld (xmin#, xmax#, ymin#, ymax#)
  5550.    subroutine fg_getworld (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  5551.    procedure fg_getworld (var xmin, xmax, ymin, ymax : real);
  5552.  
  5553. Description
  5554.  
  5555.    The fg_getworld routine returns the current world space limits, as defined
  5556.    in the most recent call to fg_setworld.
  5557.  
  5558. Parameters
  5559.  
  5560.    xmin receives the world space coordinate of the screen's left edge.
  5561.  
  5562.    xmax receives the world space coordinate of the screen's right edge.
  5563.  
  5564.    ymin receives the world space coordinate of the screen's top edge.
  5565.  
  5566.    ymax receives the world space coordinate of the screen's bottom edge.
  5567.  
  5568. Return value
  5569.  
  5570.    none
  5571.  
  5572. Restrictions
  5573.  
  5574.    This routine is not available in Fastgraph/Light.
  5575.  
  5576. See also
  5577.  
  5578.    fg_setworld
  5579.  
  5580. Examples
  5581.  
  5582.    4-3
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.                                       90
  5603. fg_getxjoy
  5604.  
  5605. Prototype
  5606.  
  5607.    int fg_getxjoy (int n);
  5608.    function FGgetxjoy% (n%)
  5609.    i*2 function fg_getxjoy (i*2 n)
  5610.    function fg_getxjoy (n : integer) : integer;
  5611.  
  5612. Description
  5613.  
  5614.    The fg_getxjoy routine returns the horizontal coordinate position of the
  5615.    specified joystick.  The actual coordinates depend on the processor speed
  5616.    and brand of joystick used.
  5617.  
  5618. Parameters
  5619.  
  5620.    n specifies the joystick number, either 1 or 2.
  5621.  
  5622. Return value
  5623.  
  5624.    If the return value is positive, it represents the current horizontal
  5625.    coordinate position of the requested joystick.  If the return value is -1,
  5626.    it means the requested joystick has not been initialized or is not present.
  5627.  
  5628. Restrictions
  5629.  
  5630.    Before using this routine, you must use the fg_initjoy routine to
  5631.    initialize the requested joystick.
  5632.  
  5633. See also
  5634.  
  5635.    fg_button, fg_getyjoy, fg_initjoy, fg_intjoy
  5636.  
  5637. Examples
  5638.  
  5639.    14-12
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.                                       91
  5662. fg_getxpos
  5663.  
  5664. Prototype
  5665.  
  5666.    int fg_getxpos (void);
  5667.    function FGgetxpos% ()
  5668.    i*2 function fg_getxpos ()
  5669.    function fg_getxpos : integer;
  5670.  
  5671. Description
  5672.  
  5673.    The fg_getxpos routine returns the screen space x coordinate of the
  5674.    graphics cursor position.
  5675.  
  5676. Parameters
  5677.  
  5678.    none
  5679.  
  5680. Return value
  5681.  
  5682.    The x coordinate of graphics cursor position.
  5683.  
  5684. Restrictions
  5685.  
  5686.    none
  5687.  
  5688. See also
  5689.  
  5690.    fg_getypos
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.                                       92
  5721. fg_getyjoy
  5722.  
  5723. Prototype
  5724.  
  5725.    int fg_getyjoy (int n);
  5726.    function FGgetyjoy% (n%)
  5727.    i*2 function fg_getyjoy (i*2 n)
  5728.    function fg_getyjoy (n : integer) : integer;
  5729.  
  5730. Description
  5731.  
  5732.    The fg_getyjoy routine returns the vertical coordinate position of the
  5733.    specified joystick.  The actual coordinates depend on the processor speed
  5734.    and brand of joystick used.
  5735.  
  5736. Parameters
  5737.  
  5738.    n specifies the joystick number, either 1 or 2.
  5739.  
  5740. Return value
  5741.  
  5742.    If the return value is positive, it represents the current vertical
  5743.    coordinate position of the requested joystick.  If the return value is -1,
  5744.    it means the requested joystick has not been initialized or is not present.
  5745.  
  5746. Restrictions
  5747.  
  5748.    Before using this routine, you must use the fg_initjoy routine to
  5749.    initialize the requested joystick.
  5750.  
  5751. See also
  5752.  
  5753.    fg_button, fg_getxjoy, fg_initjoy, fg_intjoy
  5754.  
  5755. Examples
  5756.  
  5757.    14-12
  5758.  
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.                                       93
  5780. fg_getypos
  5781.  
  5782. Prototype
  5783.  
  5784.    int fg_getypos (void);
  5785.    function FGgetypos% ()
  5786.    i*2 function fg_getypos ()
  5787.    function fg_getypos : integer;
  5788.  
  5789. Description
  5790.  
  5791.    The fg_getypos routine returns the screen space y coordinate of the
  5792.    graphics cursor position.
  5793.  
  5794. Parameters
  5795.  
  5796.    none
  5797.  
  5798. Return value
  5799.  
  5800.    The y coordinate of graphics cursor position.
  5801.  
  5802. Restrictions
  5803.  
  5804.    none
  5805.  
  5806. See also
  5807.  
  5808.    fg_getxpos
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.  
  5815.  
  5816.  
  5817.  
  5818.  
  5819.  
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.                                       94
  5839. fg_hush
  5840.  
  5841. Prototype
  5842.  
  5843.    void fg_hush (void);
  5844.    sub FGhush ()
  5845.    subroutine fg_hush ()
  5846.    procedure fg_hush;
  5847.  
  5848. Description
  5849.  
  5850.    The fg_hush routine immediately stops asynchronous sound started with the
  5851.    fg_musicb, fg_sounds, or fg_voices routines.  It has no effect if there is
  5852.    no asynchronous sound in progress.
  5853.  
  5854. Parameters
  5855.  
  5856.    none
  5857.  
  5858. Return value
  5859.  
  5860.    none
  5861.  
  5862. Restrictions
  5863.  
  5864.    none
  5865.  
  5866. See also
  5867.  
  5868.    fg_hushnext, fg_musicb, fg_sounds, fg_suspend, fg_voices
  5869.  
  5870. Examples
  5871.  
  5872.    15-7
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.  
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.  
  5888.  
  5889.  
  5890.  
  5891.  
  5892.  
  5893.  
  5894.  
  5895.  
  5896.  
  5897.                                       95
  5898. fg_hushnext
  5899.  
  5900. Prototype
  5901.  
  5902.    void fg_hushnext (void);
  5903.    sub FGhushnext ()
  5904.    subroutine fg_hushnext ()
  5905.    procedure fg_hushnext;
  5906.  
  5907. Description
  5908.  
  5909.    The fg_hushnext routine stops asynchronous sound started with the
  5910.    fg_musicb, fg_sounds, or fg_voices routines, but not until the current
  5911.    repetition finishes.  It has no effect if there is no asynchronous sound in
  5912.    progress.
  5913.  
  5914. Parameters
  5915.  
  5916.    none
  5917.  
  5918. Return value
  5919.  
  5920.    none
  5921.  
  5922. Restrictions
  5923.  
  5924.    This routine has no effect unless the asynchronous sound is continuous.
  5925.  
  5926. See also
  5927.  
  5928.    fg_hush, fg_musicb, fg_sounds, fg_suspend, fg_voices
  5929.  
  5930. Examples
  5931.  
  5932.    15-7
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.                                       96
  5957. fg_imagebuf
  5958.  
  5959. Prototype
  5960.  
  5961.    void fg_imagebuf (char far *buffer, unsigned size);
  5962.    sub FGimagebuf (buffer$, size%)
  5963.    subroutine fg_imagebuf (i*1 far buffer, i*2 size)
  5964.    procedure fg_imagebuf (buffer : pointer; size : word);
  5965.  
  5966. Description
  5967.  
  5968.    The fg_imagebuf routine specifies the size and address of the buffer used
  5969.    internally when creating or displaying GIF, PCX, PPR, or SPR files.
  5970.    Fastgraph's default internal buffer size is 4,096 bytes.  Image display or
  5971.    creation is typically faster when a larger buffer is used.
  5972.  
  5973. Parameters
  5974.  
  5975.    buffer is the segmented address of the internal buffer.  Note that this is
  5976.    passed as a FAR address, except in QuickBASIC.
  5977.  
  5978.    size is the buffer size in bytes.  If size is zero, Fastgraph will use its
  5979.    own internal buffers when creating or displaying image files.
  5980.  
  5981. Return value
  5982.  
  5983.    none
  5984.  
  5985. Restrictions
  5986.  
  5987.    In Pascal programs, buffer must be allocated dynamically with the GetMem
  5988.    procedure.  This is the only way to pass something by far reference in
  5989.    Pascal.
  5990.  
  5991. See also
  5992.  
  5993.    fg_dispfile, fg_makegif, fg_makepcx, fg_makeppr, fg_makespr, fg_showgif,
  5994.    fg_showpcx, fg_showppr, fg_showspr
  5995.  
  5996. Examples
  5997.  
  5998.    9-7
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.                                       97
  6016. fg_imagesiz
  6017.  
  6018. Prototype
  6019.  
  6020.    long fg_imagesiz (int width, int height);
  6021.    function FGimagesiz& (width%, height%)
  6022.    i*4 function fg_imagesiz (i*2 width, i*2 height)
  6023.    function fg_imagesiz (width, height : integer) : longint;
  6024.  
  6025. Description
  6026.  
  6027.    The fg_imagesiz routine determines the number of bytes required to store a
  6028.    mode-specific bit-mapped image of specified dimensions.
  6029.  
  6030. Parameters
  6031.  
  6032.    width specifies the image width in pixels.
  6033.  
  6034.    height specifies the image height in pixels.
  6035.  
  6036. Return value
  6037.  
  6038.    The number of bytes required to store a mode-specific bit-mapped image of
  6039.    the specified size in the current video mode.
  6040.  
  6041. Restrictions
  6042.  
  6043.    none
  6044.  
  6045. See also
  6046.  
  6047.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_revimage
  6048.  
  6049. Examples
  6050.  
  6051.    10-12
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.                                       98
  6075. fg_initems
  6076.  
  6077. Prototype
  6078.  
  6079.    int fg_initems (void);
  6080.    function FGinitems% ()
  6081.    i*2 function fg_initems ()
  6082.    function fg_initems : integer;
  6083.  
  6084. Description
  6085.  
  6086.    The fg_initems routine initializes expanded memory (EMS) for use with
  6087.    Fastgraph.
  6088.  
  6089. Parameters
  6090.  
  6091.    none
  6092.  
  6093. Return value
  6094.  
  6095.     0 = success
  6096.    -1 = Expanded Memory Manager not installed or not accessible
  6097.  
  6098. Restrictions
  6099.  
  6100.    This routine requires an Expanded Memory Manager (EMM) that conforms to the
  6101.    Lotus/Intel/Microsoft Expanded Memory Specification (LIM-EMS) version 3.2
  6102.    or later.  On 80386 and 80486 systems, the EMM386.EXE device driver
  6103.    supplied with DOS 5.0 can be used to treat some or all of extended memory
  6104.    as expanded memory.
  6105.  
  6106.    The Expanded Memory Manager uses interrupt 67h.  As a result, this vector
  6107.    is not available for application programs.
  6108.  
  6109. See also
  6110.  
  6111.    fg_allocems, fg_initxms
  6112.  
  6113. Examples
  6114.  
  6115.    8-9
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.                                       99
  6134. fg_initjoy
  6135.  
  6136. Prototype
  6137.  
  6138.    int fg_initjoy (int n);
  6139.    function FGinitjoy% (n%)
  6140.    i*2 function fg_initjoy (i*2 n)
  6141.    function fg_initjoy (n : integer) : integer;
  6142.  
  6143. Description
  6144.  
  6145.    The fg_initjoy routine initializes either joystick and must be called
  6146.    before using fg_getxjoy, fg_getyjoy, or fg_intjoy.
  6147.  
  6148. Parameters
  6149.  
  6150.    n specifies the joystick number, either 1 or 2.
  6151.  
  6152. Return value
  6153.  
  6154.    If the return value is 0, it means the joystick initialization was
  6155.    successful.  If it is -1, it means the machine has no game port, or the
  6156.    requested joystick is not connected to the game port.
  6157.  
  6158. Restrictions
  6159.  
  6160.    When you call fg_initjoy, Fastgraph assumes the requested joystick is
  6161.    centered.
  6162.  
  6163. See also
  6164.  
  6165.    fg_button, fg_getxjoy, fg_getyjoy, fg_intjoy
  6166.  
  6167. Examples
  6168.  
  6169.    14-11, 14-12, 14-13
  6170.  
  6171.  
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.                                      100
  6193. fg_initw
  6194.  
  6195. Prototype
  6196.  
  6197.    void fg_initw (void);
  6198.    sub FGinitw ()
  6199.    subroutine fg_initw ()
  6200.    procedure fg_initw;
  6201.  
  6202. Description
  6203.  
  6204.    The fg_initw routine initializes Fastgraph's internal parameters for world
  6205.    space.  This routine must be called once, before any other routine that
  6206.    uses world space coordinates.
  6207.  
  6208. Parameters
  6209.  
  6210.    none
  6211.  
  6212. Return value
  6213.  
  6214.    none
  6215.  
  6216. Restrictions
  6217.  
  6218.    This routine is not available in Fastgraph/Light.
  6219.  
  6220. Examples
  6221.  
  6222.    4-3, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  6223.  
  6224.  
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.                                      101
  6252. fg_initxms
  6253.  
  6254. Prototype
  6255.  
  6256.    int fg_initxms (void);
  6257.    function FGinitxms% ()
  6258.    i*2 function fg_initxms ()
  6259.    function fg_initxms : integer;
  6260.  
  6261. Description
  6262.  
  6263.    The fg_initxms routine initializes extended memory (XMS) for use with
  6264.    Fastgraph.
  6265.  
  6266. Parameters
  6267.  
  6268.    none
  6269.  
  6270. Return value
  6271.  
  6272.     0 = success
  6273.    -1 = XMS driver not installed or not accessible
  6274.  
  6275. Restrictions
  6276.  
  6277.    This routine requires an external driver that conforms to the
  6278.    Lotus/Intel/Microsoft/AST eXtended Memory Specification (XMS) version 2.0,
  6279.    such as HIMEM.SYS.  XMS drivers require an 80286, 80386, or 80486 system.
  6280.  
  6281. See also
  6282.  
  6283.    fg_allocxms, fg_initems
  6284.  
  6285. Examples
  6286.  
  6287.    8-9
  6288.  
  6289.  
  6290.  
  6291.  
  6292.  
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.                                      102
  6311. fg_inside
  6312.  
  6313. Prototype
  6314.  
  6315.    int fg_inside (int *vertex_array, int n, int ix, int iy);
  6316.    function FGinside% (vertex_array%(), n%, ix%, iy%)
  6317.    i*2 function fg_inside (i*2 vertex_array, i*2 n, i*2 ix, i*2 iy)
  6318.    function fg_inside (var vertex_array : integer; n, ix, iy : integer) :
  6319.      integer;
  6320.  
  6321. Description
  6322.  
  6323.    The fg_inside routine determines if the specified point is inside a convex
  6324.    polygon.
  6325.  
  6326. Parameters
  6327.  
  6328.    vertex_array is an arbitrary-length array containing the (x,y) coordinate
  6329.    pairs of each vertex.  The first array element is the x component of the
  6330.    first vertex, the second element is the y component of the first vertex,
  6331.    the third element is the x component of the second vertex, and so forth.
  6332.  
  6333.    n is the number of vertices in the polygon.  Normally, it is one-half the
  6334.    size of vertex_array.
  6335.  
  6336.    ix is the screen space x coordinate of the test point.
  6337.  
  6338.    iy is the screen space y coordinate of the test point.
  6339.  
  6340. Return value
  6341.  
  6342.    0 = the test point is outside the polygon
  6343.    1 = the test point is inside the polygon
  6344.  
  6345. Restrictions
  6346.  
  6347.    If vertex_array does not define a convex polygon, the return value is
  6348.    undefined.
  6349.  
  6350. See also
  6351.  
  6352.    fg_polyfill, fg_polyline
  6353.  
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.                                      103
  6370. fg_intjoy
  6371.  
  6372. Prototype
  6373.  
  6374.    void fg_intjoy (int n, char *key, char *aux);
  6375.    sub FGintjoy (n%, key$, aux$)
  6376.    subroutine fg_intjoy (i*2 n, i*1 key, i*1 aux)
  6377.    procedure fg_intjoy (n : integer; var key, aux : byte);
  6378.  
  6379. Description
  6380.  
  6381.    The fg_intjoy routine returns the standard and extended keyboard codes
  6382.    analogous to the current position and button status of the specified
  6383.    joystick.
  6384.  
  6385. Parameters
  6386.  
  6387.    n specifies the joystick number, either 1 or 2.
  6388.  
  6389.    key receives the joystick's button status.  If any button on the requested
  6390.    joystick is pressed, key is set to 13, the standard keyboard code for the
  6391.    Enter key.  If no buttons are pressed, key is set to zero.  In BASIC, you
  6392.    must explicitly declare key as a fixed-length string variable of length 1.
  6393.  
  6394.    aux receives the joystick's analog position, as listed below.  In BASIC,
  6395.    you must explicitly declare aux as a fixed-length string variable of length
  6396.    1.
  6397.  
  6398.        joystick position   corresponding key   extended key code
  6399.  
  6400.           up and left            Home                 71
  6401.               up               up arrow               72
  6402.          up and right            PgUp                 73
  6403.              left             left arrow              75
  6404.            centered           (no action)              0
  6405.              right            right arrow             77
  6406.          down and left            End                 79
  6407.              down             down arrow              80
  6408.         down and right           PgDn                 81
  6409.  
  6410.    If the requested joystick has not been initialized, both key and aux will
  6411.    be set to zero.
  6412.  
  6413. Return value
  6414.  
  6415.    none
  6416.  
  6417. Restrictions
  6418.  
  6419.    Before using this routine, you must use the fg_initjoy routine to
  6420.    initialize the requested joystick.
  6421.  
  6422. See also
  6423.  
  6424.    fg_button, fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intkey
  6425.  
  6426.  
  6427.  
  6428.                                      104
  6429. fg_intjoy (continued)
  6430.  
  6431. Examples
  6432.  
  6433.    14-13
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.                                      105
  6488. fg_intkey
  6489.  
  6490. Prototype
  6491.  
  6492.    void fg_intkey (unsigned char *key, unsigned char *aux);
  6493.    sub FGintkey (key$, aux$)
  6494.    subroutine fg_intkey (i*1 key, i*1 aux)
  6495.    procedure fg_intkey (var key, aux : byte);
  6496.  
  6497. Description
  6498.  
  6499.    The fg_intkey routine reads the next entry from the BIOS keyboard buffer
  6500.    (without echo) and returns the keystroke's standard or extended keyboard
  6501.    code (a list of these appears in Chapter 14 of the Fastgraph User's Guide).
  6502.    It is similar to fg_getkey, but it does not wait for a keystroke if the
  6503.    keyboard buffer is empty.
  6504.  
  6505. Parameters
  6506.  
  6507.    key receives the keystroke's standard keyboard code if it represents a
  6508.    standard character.  If the keystroke represents an extended character, key
  6509.    will be set to zero.  In BASIC, you must explicitly declare key as a fixed-
  6510.    length string variable of length 1.
  6511.  
  6512.    aux receives the keystroke's extended keyboard code if it represents an
  6513.    extended character.  If the keystroke represents a standard character, aux
  6514.    will be set to zero.  In BASIC, you must explicitly declare aux as a fixed-
  6515.    length string variable of length 1.
  6516.  
  6517.    If the BIOS keyboard buffer is empty, both key and aux will be set to zero.
  6518.  
  6519. Return value
  6520.  
  6521.    none
  6522.  
  6523. Restrictions
  6524.  
  6525.    none
  6526.  
  6527. See also
  6528.  
  6529.    fg_getkey, fg_intjoy, fg_kbtest, fg_waitkey
  6530.  
  6531. Examples
  6532.  
  6533.    14-2, 15-7, 16-1, 16-3
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.                                      106
  6547. fg_justify
  6548.  
  6549. Prototype
  6550.  
  6551.    void fg_justify (int xjust, int yjust);
  6552.    sub FGjustify (xjust%, yjust%)
  6553.    subroutine fg_justify (i*2 xjust, i*2 yjust)
  6554.    procedure fg_justify (xjust, yjust : integer);
  6555.  
  6556. Description
  6557.  
  6558.    The fg_justify routine defines the horizontal and vertical justification
  6559.    settings for strings displayed with the fg_print routine.
  6560.  
  6561. Parameters
  6562.  
  6563.    xjust defines the horizontal justification.  If xjust is -1, strings will
  6564.    be displayed left justified relative to the current graphics x position.
  6565.    If xjust is 0, strings will be centered about the x position.  If xjust is
  6566.    1, strings will be right justified.
  6567.  
  6568.    yjust defines the vertical justification.  If yjust is -1, the bottom of
  6569.    the characters will be the current graphics y position.  If yjust is 0,
  6570.    strings will be centered about the y position.  If yjust is 1, the top of
  6571.    the characters will be at the y position.
  6572.  
  6573. Return value
  6574.  
  6575.    none
  6576.  
  6577. Restrictions
  6578.  
  6579.    The values of xjust and yjust must be -1, 0, or 1.
  6580.  
  6581. See also
  6582.  
  6583.    fg_print
  6584.  
  6585. Examples
  6586.  
  6587.    7-6
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.                                      107
  6606. fg_kbinit
  6607.  
  6608. Prototype
  6609.  
  6610.    void fg_kbinit (int state);
  6611.    sub FGkbinit (state%)
  6612.    subroutine fg_kbinit (i*2 state)
  6613.    procedure fg_kbinit (state : integer);
  6614.  
  6615. Description
  6616.  
  6617.    The fg_kbinit routine enables or disables the Fastgraph low-level keyboard
  6618.    handler.  If the keyboard handler is already in the requested state,
  6619.    nothing happens.
  6620.  
  6621. Parameters
  6622.  
  6623.    state is a flag specifying if the keyboard handler is to be enabled (state
  6624.    = 1) or disabled (state = 0).
  6625.  
  6626. Return value
  6627.  
  6628.    none
  6629.  
  6630. Restrictions
  6631.  
  6632.    When the low-level keyboard handler is enabled, it is not possible to use
  6633.    fg_getkey, fg_intkey, fg_waitkey, or any third party functions that use
  6634.    BIOS or DOS services to access the keyboard.
  6635.  
  6636. See also
  6637.  
  6638.    fg_kbtest
  6639.  
  6640. Examples
  6641.  
  6642.    14-5
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.                                      108
  6665. fg_kbtest
  6666.  
  6667. Prototype
  6668.  
  6669.    int fg_kbtest (int scan_code);
  6670.    function FGkbtest% (scan_code%)
  6671.    i*2 function fg_kbtest (i*2 scan_code)
  6672.    function fg_kbtest (scan_code : integer) : integer;
  6673.  
  6674. Description
  6675.  
  6676.    The fg_kbtest routine determines if the key having the specified scan code
  6677.    is now pressed or released.
  6678.  
  6679. Parameters
  6680.  
  6681.    scan_code is the scan code of the key to check.  Refer to the Fastgraph
  6682.    User's Guide for a list of scan codes.
  6683.  
  6684. Return value
  6685.  
  6686.    0 = key is released
  6687.    1 = key is pressed
  6688.  
  6689. Restrictions
  6690.  
  6691.    The low-level keyboard handler must be enabled for fg_kbtest to work
  6692.    properly.
  6693.  
  6694. See also
  6695.  
  6696.    fg_kbinit
  6697.  
  6698. Examples
  6699.  
  6700.    14-5
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.                                      109
  6724. fg_locate
  6725.  
  6726. Prototype
  6727.  
  6728.    void fg_locate (int row, int column);
  6729.    sub FGlocate (row%, column%)
  6730.    subroutine fg_locate (i*2 row, i*2 column)
  6731.    procedure fg_locate (row, column : integer);
  6732.  
  6733. Description
  6734.  
  6735.    The fg_locate routine changes the text cursor position for the active
  6736.    display page.  The fg_setmode routine sets each page's text cursor position
  6737.    to (0,0).
  6738.  
  6739. Parameters
  6740.  
  6741.    row is the text cursor's destination row number, between 0 and one less
  6742.    than the number of character rows available.
  6743.  
  6744.    column is text cursor's destination column number, between 0 and one less
  6745.    than the number of character columns available.
  6746.  
  6747. Return value
  6748.  
  6749.    none
  6750.  
  6751. Restrictions
  6752.  
  6753.    The first eight video pages (0 to 7) each have their own text cursor.  Each
  6754.    subsequent group of 8 video pages (pages 8 through 15, pages 16 to 23, and
  6755.    so forth) respectively share the same text cursor positions as the first 8
  6756.    pages.  For example, changing the text cursor position on video page 9 also
  6757.    changes its position on video page 1.
  6758.  
  6759. See also
  6760.  
  6761.    fg_where
  6762.  
  6763. Examples
  6764.  
  6765.    7-1, 7-2, 7-3, 7-4, 7-5, 7-7, 7-8, 7-9, 7-10
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.                                      110
  6783. fg_makegif
  6784.  
  6785. Prototype
  6786.  
  6787.    int fg_makegif (int minx, int maxx, int miny, int maxy, char *filename);
  6788.    function FGmakegif% (minx%, maxx%, miny%, maxy%, filename$)
  6789.    i*2 function fg_makegif (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  6790.      c*(*) filename)
  6791.    function fg_makegif (minx, maxx, miny, maxy : integer; filename : string) :
  6792.      integer;
  6793.  
  6794. Description
  6795.  
  6796.    The fg_makegif routine creates a GIF file from the specified rectangular
  6797.    region of the active video page.  The region's extremes are expressed in
  6798.    screen space units.
  6799.  
  6800. Parameters
  6801.  
  6802.    minx is the x coordinate of the region's left edge.
  6803.  
  6804.    maxx is the x coordinate of the region's right edge.  It must be greater
  6805.    than or equal to minx.
  6806.  
  6807.    miny is the y coordinate of the region's top edge.
  6808.  
  6809.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  6810.    than or equal to miny.
  6811.  
  6812.    filename is the name of the GIF file to create.  A device and path name may
  6813.    be included as part of the file name.  The file name must be terminated by
  6814.    a null character (that is, a zero byte).  If an identically named file
  6815.    already exists, it is overwritten.
  6816.  
  6817. Return value
  6818.  
  6819.    0 = success
  6820.    1 = file not created
  6821.  
  6822. Restrictions
  6823.  
  6824.    The fg_makegif routine has no effect in text video modes, or in the CGA and
  6825.    Hercules graphics modes.
  6826.  
  6827.    In the Tandy/PCjr 16-color graphics mode (mode 9) and the native EGA
  6828.    graphics modes (modes 13 through 16), the palette registers are not
  6829.    readable.  Hence, fg_makegif will use the default palette settings when
  6830.    used in these video modes on Tandy or EGA systems.
  6831.  
  6832. See also
  6833.  
  6834.    fg_imagebuf, fg_makepcx, fg_makeppr, fg_makespr, fg_showgif
  6835.  
  6836. Examples
  6837.  
  6838.    9-3
  6839.  
  6840.  
  6841.                                      111
  6842. fg_makepcx
  6843.  
  6844. Prototype
  6845.  
  6846.    int fg_makepcx (int minx, int maxx, int miny, int maxy, char *filename);
  6847.    function FGmakepcx% (minx%, maxx%, miny%, maxy%, filename$)
  6848.    i*2 function fg_makepcx (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  6849.      c*(*) filename)
  6850.    function fg_makepcx (minx, maxx, miny, maxy : integer; filename : string) :
  6851.      integer;
  6852.  
  6853. Description
  6854.  
  6855.    The fg_makepcx routine creates a PCX file from the specified rectangular
  6856.    region of the active video page.  The region's extremes are expressed in
  6857.    screen space units.
  6858.  
  6859. Parameters
  6860.  
  6861.    minx is the x coordinate of the region's left edge.  Its value is reduced
  6862.    to a byte boundary if necessary.
  6863.  
  6864.    maxx is the x coordinate of the region's right edge.  It must be greater
  6865.    than or equal to minx.
  6866.  
  6867.    miny is the y coordinate of the region's top edge.
  6868.  
  6869.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  6870.    than or equal to miny.
  6871.  
  6872.    filename is the name of the PCX file to create.  A device and path name may
  6873.    be included as part of the file name.  The file name must be terminated by
  6874.    a null character (that is, a zero byte).  If an identically named file
  6875.    already exists, it is overwritten.
  6876.  
  6877. Return value
  6878.  
  6879.    0 = success
  6880.    1 = file not created
  6881.  
  6882. Restrictions
  6883.  
  6884.    The fg_makepcx routine has no effect in text video modes or in the Hercules
  6885.    low-resolution graphics mode.  Refer to the description of the fg_showpcx
  6886.    routine for information about PCX file compatibility between different
  6887.    video modes.
  6888.  
  6889.    In the Tandy/PCjr 16-color graphics mode (mode 9) and the native EGA
  6890.    graphics modes (modes 13 through 16), the palette registers are not
  6891.    readable.  Hence, fg_makepcx will use the default palette settings when
  6892.    used in these video modes on Tandy or EGA systems.
  6893.  
  6894. See also
  6895.  
  6896.    fg_imagebuf, fg_makegif, fg_makespr, fg_makeppr, fg_showpcx
  6897.  
  6898.  
  6899.  
  6900.                                      112
  6901. fg_makepcx (continued)
  6902.  
  6903. Examples
  6904.  
  6905.    9-1
  6906.  
  6907.  
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  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.                                      113
  6960. fg_makeppr
  6961.  
  6962. Prototype
  6963.  
  6964.    int fg_makeppr (int minx, int maxx, int miny, int maxy, char *filename);
  6965.    function FGmakeppr% (minx%, maxx%, miny%, maxy%, filename$)
  6966.    i*2 function fg_makeppr (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  6967.      c*(*) filename)
  6968.    function fg_makeppr (minx, maxx, miny, maxy : integer; filename : string) :
  6969.      integer;
  6970.  
  6971. Description
  6972.  
  6973.    The fg_makeppr routine creates a packed pixel run (PPR) file from the
  6974.    specified rectangular region of the active video page.  The region's
  6975.    extremes are expressed in screen space units.
  6976.  
  6977. Parameters
  6978.  
  6979.    minx is the x coordinate of the region's left edge.  Its value is reduced
  6980.    to a byte boundary if necessary.
  6981.  
  6982.    maxx is the x coordinate of the region's right edge.  It must be greater
  6983.    than or equal to minx.
  6984.  
  6985.    miny is the y coordinate of the region's top edge.
  6986.  
  6987.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  6988.    than or equal to miny.
  6989.  
  6990.    filename is the name of the PPR file to create.  A device and path name may
  6991.    be included as part of the file name.  The file name must be terminated by
  6992.    a null character (that is, a zero byte).  If an identically named file
  6993.    already exists, it is overwritten.
  6994.  
  6995. Return value
  6996.  
  6997.    0 = success
  6998.    1 = file not created
  6999.  
  7000. Restrictions
  7001.  
  7002.    This routine has no effect in text video modes.
  7003.  
  7004. See also
  7005.  
  7006.    fg_imagebuf, fg_makegif, fg_makepcx, fg_makespr, fg_showppr
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.                                      114
  7019. fg_makespr
  7020.  
  7021. Prototype
  7022.  
  7023.    int fg_makespr (int minx, int maxx, int miny, int maxy, char *filename);
  7024.    function FGmakespr% (minx%, maxx%, miny%, maxy%, filename$)
  7025.    i*2 function fg_makespr (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  7026.      c*(*) filename)
  7027.    function fg_makespr (minx, maxx, miny, maxy : integer; filename : string) :
  7028.      integer;
  7029.  
  7030. Description
  7031.  
  7032.    The fg_makespr routine creates a standard pixel run (SPR) file from the
  7033.    specified rectangular region of the active video page.  The region's
  7034.    extremes are expressed in screen space units.
  7035.  
  7036. Parameters
  7037.  
  7038.    minx is the x coordinate of the region's left edge.  Its value is reduced
  7039.    to a byte boundary if necessary.
  7040.  
  7041.    maxx is the x coordinate of the region's right edge.  It must be greater
  7042.    than or equal to minx.
  7043.  
  7044.    miny is the y coordinate of the region's top edge.
  7045.  
  7046.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  7047.    than or equal to miny.
  7048.  
  7049.    filename is the name of the SPR file to create.  A device and path name may
  7050.    be included as part of the file name.  The file name must be terminated by
  7051.    a null character (that is, a zero byte).  If an identically named file
  7052.    already exists, it is overwritten.
  7053.  
  7054. Return value
  7055.  
  7056.    0 = success
  7057.    1 = file not created
  7058.  
  7059. Restrictions
  7060.  
  7061.    This routine has no effect in text video modes.
  7062.  
  7063. See also
  7064.  
  7065.    fg_imagebuf, fg_makegif, fg_makepcx, fg_makeppr, fg_showspr
  7066.  
  7067. Examples
  7068.  
  7069.    9-4
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.                                      115
  7078. fg_maprgb
  7079.  
  7080. Prototype
  7081.  
  7082.    int fg_maprgb (int red, int green, int blue);
  7083.    function FGmaprgb% (red%, green%, blue%)
  7084.    i*2 function fg_maprgb (i*2 red, i*2 green, i*2 blue)
  7085.    function fg_maprgb (red, green, blue : integer) : integer;
  7086.  
  7087. Description
  7088.  
  7089.    The fg_maprgb routine maps six-bit red, green, and blue color components
  7090.    into a suitable palette value for the current video mode.  You can then
  7091.    pass this value to the fg_palette routine.
  7092.  
  7093. Parameters
  7094.  
  7095.    red, green, and blue respectively specify the color's red, green, and blue
  7096.    components.  These values must be between 0 and 63; increasing values
  7097.    produce more intense colors.
  7098.  
  7099. Return value
  7100.  
  7101.    The mode-specific palette value for the specified color components.
  7102.  
  7103. Restrictions
  7104.  
  7105.    This routine is meaningful only in 16-color graphics video modes.
  7106.  
  7107. See also
  7108.  
  7109.    fg_palette, fg_palettes, fg_setrgb
  7110.  
  7111. Examples
  7112.  
  7113.    5-13
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.  
  7136.                                      116
  7137. fg_measure
  7138.  
  7139. Prototype
  7140.  
  7141.    int fg_measure (void);
  7142.    function FGmeasure% ()
  7143.    i*2 function fg_measure ()
  7144.    function fg_measure : integer;
  7145.  
  7146. Description
  7147.  
  7148.    The fg_measure routine returns the approximate number of delay units per
  7149.    clock tick.  This quantity is proportional to the system's processor speed.
  7150.    Delay units are used by the fg_stall routine.
  7151.  
  7152. Parameters
  7153.  
  7154.    none
  7155.  
  7156. Return value
  7157.  
  7158.    The approximate number of delay units per clock tick.  Typical values for
  7159.    some common systems are:
  7160.  
  7161.                  system            delay units
  7162.                   type           per clock tick
  7163.  
  7164.               Tandy 1000 HX            280
  7165.               25 MHz 80386            3,400
  7166.               40 MHz 80386            7,100
  7167.  
  7168. Restrictions
  7169.  
  7170.    none
  7171.  
  7172. See also
  7173.  
  7174.    fg_stall
  7175.  
  7176. Examples
  7177.  
  7178.    16-3
  7179.  
  7180.  
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.                                      117
  7196. fg_memavail
  7197.  
  7198. Prototype
  7199.  
  7200.    long fg_memavail (void);
  7201.    function FGmemavail& ()
  7202.    i*4 function fg_memavail ()
  7203.    function fg_memavail : longint;
  7204.  
  7205. Description
  7206.  
  7207.    The fg_memavail routine determines the amount of conventional memory
  7208.    available to DOS.
  7209.  
  7210. Parameters
  7211.  
  7212.    none
  7213.  
  7214. Return value
  7215.  
  7216.    The amount of conventional memory (in bytes) available to DOS.
  7217.  
  7218. Restrictions
  7219.  
  7220.    none
  7221.  
  7222. Examples
  7223.  
  7224.    17-1
  7225.  
  7226.  
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.                                      118
  7255. fg_memory
  7256.  
  7257. Prototype
  7258.  
  7259.    int fg_memory (void);
  7260.    function FGmemory% ()
  7261.    i*2 function fg_memory ()
  7262.    function fg_memory : integer;
  7263.  
  7264. Description
  7265.  
  7266.    The fg_memory routine returns the amount of video memory present (in
  7267.    kilobytes) on the user's SVGA card.
  7268.  
  7269. Parameters
  7270.  
  7271.    none
  7272.  
  7273. Return value
  7274.  
  7275.    The amount of video memory in kilobytes.  For example, if the user's SVGA
  7276.    card has 1MB of video memory installed, the return value will be 1,024.
  7277.  
  7278. Restrictions
  7279.  
  7280.    This routine is only meaningful after successfully initializing Fastgraph's
  7281.    SVGA kernel with fg_svgainit.
  7282.  
  7283. See also
  7284.  
  7285.    fg_svgainit
  7286.  
  7287. Examples
  7288.  
  7289.    3-9
  7290.  
  7291.  
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.                                      119
  7314. fg_mousebut
  7315.  
  7316. Prototype
  7317.  
  7318.    void fg_mousebut (int number, int *count, int *lastx, int *lasty);
  7319.    sub FGmousebut (number%, count%, lastx%, lasty%)
  7320.    subroutine fg_mousebut (i*2 number, i*2 count, i*2 lastx, i*2 lasty)
  7321.    procedure fg_mousebut (number : integer; var count, lastx, lasty :
  7322. integer);
  7323.  
  7324. Description
  7325.  
  7326.    The fg_mousebut routine returns information about mouse button press or
  7327.    release counts, as well as the mouse cursor position at the time of the
  7328.    last button press or release.
  7329.  
  7330. Parameters
  7331.  
  7332.    number is the mouse button for which to report information (1 means the
  7333.    left button, 2 the right button, and 3 the middle button).  If number is
  7334.    positive, button press counts will be reported.  If it is negative, release
  7335.    counts will be reported.
  7336.  
  7337.    count receives the number of press or release counts for the requested
  7338.    button since the last check, or since calling the fg_mouseini routine.
  7339.  
  7340.    lastx receives the x coordinate (in screen space) of the mouse cursor
  7341.    position at the time of the last press or release of the requested button.
  7342.    If count is zero, lastx is also set to zero.
  7343.  
  7344.    lasty receives the y coordinate (in screen space) of the mouse cursor
  7345.    position at the time of the last press or release of the requested button.
  7346.    If count is zero, lasty is also set to zero.
  7347.  
  7348. Return value
  7349.  
  7350.    none
  7351.  
  7352. Restrictions
  7353.  
  7354.    none
  7355.  
  7356. See also
  7357.  
  7358.    fg_mousepos
  7359.  
  7360. Examples
  7361.  
  7362.    14-8
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.                                      120
  7373. fg_mousecur
  7374.  
  7375. Prototype
  7376.  
  7377.    void fg_mousecur (int screen_mask, int cursor_mask);
  7378.    sub FGmousecur (screen_mask%, cursor_mask%)
  7379.    subroutine fg_mousecur (i*2 screen_mask, i*2 cursor_mask)
  7380.    procedure fg_mousecur (screen_mask, cursor_mask : integer);
  7381.  
  7382. Description
  7383.  
  7384.    The fg_mousecur routine defines the appearance of the mouse cursor in text
  7385.    video modes.  Refer to Chapter 14 of the Fastgraph User's Guide for
  7386.    complete information about defining the mouse cursor in text modes.
  7387.  
  7388. Parameters
  7389.  
  7390.    screen_mask defines the screen mask.  When you position the mouse over a
  7391.    specific character cell, the mouse driver logically ANDs the screen mask
  7392.    with the existing contents of that cell.
  7393.  
  7394.    cursor_mask defines the cursor mask.  After logically ANDing the screen
  7395.    mask with the contents of a character cell, the mouse driver XORs the
  7396.    cursor mask with the result to produce the mouse cursor.
  7397.  
  7398.    The binary structure of screen_mask and cursor_mask is:
  7399.  
  7400.                          bits      meaning
  7401.  
  7402.                          0 to 7    ASCII character value
  7403.                          8 to 11   foreground color
  7404.                          12 to 14  background color
  7405.                          15        blink
  7406.  
  7407. Return value
  7408.  
  7409.    none
  7410.  
  7411. Restrictions
  7412.  
  7413.    This routine has no effect in graphics video modes.
  7414.  
  7415. See also
  7416.  
  7417.    fg_mouseini, fg_mouseptr, fg_mousevis
  7418.  
  7419. Examples
  7420.  
  7421.    14-9
  7422.  
  7423.  
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.                                      121
  7432. fg_mousefin
  7433.  
  7434. Prototype
  7435.  
  7436.    void fg_mousefin (void);
  7437.    sub FGmousefin ()
  7438.    subroutine fg_mousefin ()
  7439.    procedure fg_mousefin;
  7440.  
  7441. Description
  7442.  
  7443.    The fg_mousefin routine unhooks Fastgraph's XVGA or SVGA mouse handler from
  7444.    the mouse driver.  This routine should be used just before reverting to a
  7445.    text mode in programs that have called fg_mouseini in XVGA or SVGA graphics
  7446.    modes.
  7447.  
  7448. Parameters
  7449.  
  7450.    none
  7451.  
  7452. Return value
  7453.  
  7454.    none
  7455.  
  7456. Restrictions
  7457.  
  7458.    This routine is only meaningful in XVGA and SVGA graphics modes.
  7459.  
  7460. See also
  7461.  
  7462.    fg_mouseini
  7463.  
  7464.  
  7465.  
  7466.  
  7467.  
  7468.  
  7469.  
  7470.  
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.                                      122
  7491. fg_mouseini
  7492.  
  7493. Prototype
  7494.  
  7495.    int fg_mouseini (void);
  7496.    function FGmouseini% ()
  7497.    i*2 function fg_mouseini ()
  7498.    function fg_mouseini : integer;
  7499.  
  7500. Description
  7501.  
  7502.    The fg_mouseini routine initializes the mouse and must be called before any
  7503.    of Fastgraph's other mouse support routines.
  7504.  
  7505. Parameters
  7506.  
  7507.    none
  7508.  
  7509. Return value
  7510.  
  7511.    If the return value is positive, it indicates the number of buttons on the
  7512.    mouse being used (2 or 3).  If the return value is -1, it means the
  7513.    initialization failed because the mouse driver has not been loaded or the
  7514.    mouse is not physically connected.
  7515.  
  7516. Restrictions
  7517.  
  7518.    none
  7519.  
  7520. See also
  7521.  
  7522.    fg_mousebut, fg_mousecur, fg_mousefin, fg_mouselim, fg_mousemov,
  7523.    fg_mousepos, fg_mouseptr, fg_mousespd, fg_mousevis, fg_resize
  7524.  
  7525. Examples
  7526.  
  7527.    14-6, 14-7, 14-8, 14-9, 14-10
  7528.  
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.                                      123
  7550. fg_mouselim
  7551.  
  7552. Prototype
  7553.  
  7554.    void fg_mouselim (int minx, int maxx, int miny, int maxy);
  7555.    sub FGmouselim (minx%, maxx%, miny%, maxy%)
  7556.    subroutine fg_mouselim (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  7557.    procedure fg_mouselim (minx, maxx, miny, maxy : integer);
  7558.  
  7559. Description
  7560.  
  7561.    The fg_mouselim routine defines the rectangular area in which the mouse
  7562.    cursor may move.  In graphics modes, the area is defined in screen space
  7563.    coordinates.  In text modes, it is defined in rows and columns.
  7564.  
  7565. Parameters
  7566.  
  7567.    minx is the x coordinate of the area's left edge.
  7568.  
  7569.    maxx is the x coordinate of the area's right edge.  It must be greater than
  7570.    or equal to the value of minx.
  7571.  
  7572.    miny is the y coordinate of the area's top edge.
  7573.  
  7574.    maxy is the y coordinate of the area's bottom edge.  It must be greater
  7575.    than or equal to the value of miny.
  7576.  
  7577. Return value
  7578.  
  7579.    none
  7580.  
  7581. Restrictions
  7582.  
  7583.    none
  7584.  
  7585. See also
  7586.  
  7587.    fg_mouseini, fg_mousemov
  7588.  
  7589. Examples
  7590.  
  7591.    14-7
  7592.  
  7593.  
  7594.  
  7595.  
  7596.  
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.                                      124
  7609. fg_mousemov
  7610.  
  7611. Prototype
  7612.  
  7613.    void fg_mousemov (int ix, int iy);
  7614.    sub FGmousemov (ix%, iy%)
  7615.    subroutine fg_mousemov (i*2 ix, i*2 iy)
  7616.    procedure fg_mousemov (ix, iy : integer);
  7617.  
  7618. Description
  7619.  
  7620.    The fg_mousemov routine moves the mouse cursor to the specified character
  7621.    cell (in text modes) or screen space position (in graphics modes).  The
  7622.    mouse cursor is moved whether or not it is currently visible.
  7623.  
  7624. Parameters
  7625.  
  7626.    ix is the x coordinate of the new mouse cursor position.
  7627.  
  7628.    iy is the y coordinate of the new mouse cursor position.
  7629.  
  7630. Return value
  7631.  
  7632.    none
  7633.  
  7634. Restrictions
  7635.  
  7636.    If you attempt to move the mouse cursor outside the area defined by
  7637.    fg_mouselim, the fg_mousemov routine just positions the cursor at the
  7638.    nearest point possible within that area.
  7639.  
  7640. See also
  7641.  
  7642.    fg_mouseini, fg_mouselim
  7643.  
  7644. Examples
  7645.  
  7646.    14-7
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.                                      125
  7668. fg_mousepos
  7669.  
  7670. Prototype
  7671.  
  7672.    void fg_mousepos (int *ix, int *iy, int *buttons);
  7673.    sub FGmousepos (ix%, iy%, buttons%)
  7674.    subroutine fg_mousepos (i*2 ix, i*2 iy, i*2 buttons)
  7675.    procedure fg_mousepos (var ix, iy, buttons : integer);
  7676.  
  7677. Description
  7678.  
  7679.    The fg_mousepos routine returns the current mouse position and button
  7680.    status.  In graphics modes, the position is defined in screen space
  7681.    coordinates.  In text modes, it is defined in rows and columns.
  7682.  
  7683. Parameters
  7684.  
  7685.    ix receives the x coordinate of the mouse cursor position.
  7686.  
  7687.    iy receives the y coordinate of the mouse cursor position.
  7688.  
  7689.    buttons receives a bit mask representing the button status, where each bit
  7690.    is set if the corresponding button is pressed.  Bit 0 corresponds to the
  7691.    left button, bit 1 to the right button, and bit 2 to the middle button.
  7692.  
  7693. Return value
  7694.  
  7695.    none
  7696.  
  7697. Restrictions
  7698.  
  7699.    none
  7700.  
  7701. See also
  7702.  
  7703.    fg_mousebut, fg_mouseini
  7704.  
  7705. Examples
  7706.  
  7707.    14-8
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.                                      126
  7727. fg_mouseptr
  7728.  
  7729. Prototype
  7730.  
  7731.    void fg_mouseptr (int *masks, int xoffset, int yoffset);
  7732.    sub FGmouseptr (masks%(), xoffset%, yoffset%)
  7733.    subroutine fg_mouseptr (i*2 masks, i*2 xoffset, i*2 yoffset)
  7734.    procedure fg_mouseptr (var masks : integer; xoffset, yoffset : integer);
  7735.  
  7736. Description
  7737.  
  7738.    The fg_mouseptr routine defines the shape and appearance of the mouse
  7739.    cursor in graphics video modes.  Refer to Chapter 14 of the Fastgraph
  7740.    User's Guide for complete information about defining the mouse cursor in
  7741.    graphics modes.
  7742.  
  7743. Parameters
  7744.  
  7745.    masks is a 32-element array containing the 16-element screen mask followed
  7746.    by the 16-element cursor mask.  The mouse driver displays the mouse cursor
  7747.    by logically ANDing video memory with the screen mask, and then XORing that
  7748.    result with the cursor mask.  The first item of each mask corresponds to
  7749.    the top row of the mouse cursor.  The following table summarizes the cursor
  7750.    appearance for all possible combinations of mask bits.
  7751.  
  7752.         screen mask bit   cursor mask bit  resulting cursor pixel
  7753.  
  7754.                0                 0                black
  7755.                0                 1                white
  7756.                1                 0              unchanged
  7757.                1                 1              inverted
  7758.  
  7759.    xoffset is the x coordinate of the "hot spot" relative to the upper left
  7760.    corner of the mouse cursor.
  7761.  
  7762.    yoffset is the y coordinate of the "hot spot" relative to the upper left
  7763.    corner of the mouse cursor.
  7764.  
  7765. Return value
  7766.  
  7767.    none
  7768.  
  7769. Restrictions
  7770.  
  7771.    This routine has no effect in text video modes.
  7772.  
  7773. See also
  7774.  
  7775.    fg_mousecur, fg_mouseini, fg_mousevis
  7776.  
  7777. Examples
  7778.  
  7779.    14-10
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.                                      127
  7786. fg_mousespd
  7787.  
  7788. Prototype
  7789.  
  7790.    void fg_mousespd (int xmickeys, int ymickeys);
  7791.    sub FGmousespd (xmickeys%, ymickeys%)
  7792.    subroutine fg_mousespd (i*2 xmickeys, i*2 ymickeys)
  7793.    procedure fg_mousespd (xmickeys, ymickeys : integer);
  7794.  
  7795. Description
  7796.  
  7797.    The fg_mousespd routine defines the number of mickey units per eight pixels
  7798.    of cursor movement (one mickey unit equals 1/200 of an inch).  This
  7799.    effectively controls the speed at which the mouse cursor moves relative to
  7800.    the movement of the mouse itself.
  7801.  
  7802. Parameters
  7803.  
  7804.    xmickeys is the number of mickey units per eight pixels of horizontal mouse
  7805.    cursor movement (the default is 8).
  7806.  
  7807.    ymickeys is the number of mickey units per eight pixels of vertical mouse
  7808.    cursor movement (the default is 16).
  7809.  
  7810. Return value
  7811.  
  7812.    none
  7813.  
  7814. Restrictions
  7815.  
  7816.    none
  7817.  
  7818. See also
  7819.  
  7820.    fg_mouseini
  7821.  
  7822. Examples
  7823.  
  7824.    14-7
  7825.  
  7826.  
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.                                      128
  7845. fg_mousevis
  7846.  
  7847. Prototype
  7848.  
  7849.    void fg_mousevis (int state);
  7850.    sub FGmousevis (state%)
  7851.    subroutine fg_mousevis (i*2 state)
  7852.    procedure fg_mousevis (state : integer);
  7853.  
  7854. Description
  7855.  
  7856.    The fg_mousevis routine makes the mouse cursor visible or invisible.  After
  7857.    calling fg_mouseini, the mouse cursor is invisible.
  7858.  
  7859. Parameters
  7860.  
  7861.    state defines the mouse cursor visibility.  If state is 0, the mouse cursor
  7862.    is made invisible.  If it is 1, the mouse cursor is made visible.
  7863.  
  7864. Return value
  7865.  
  7866.    none
  7867.  
  7868. Restrictions
  7869.  
  7870.    none
  7871.  
  7872. See also
  7873.  
  7874.    fg_mouseini
  7875.  
  7876. Examples
  7877.  
  7878.    14-7, 14-8, 14-9, 14-10
  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.                                      129
  7904. fg_move
  7905.  
  7906. Prototype
  7907.  
  7908.    void fg_move (int ix, int iy);
  7909.    sub FGmove (ix%, iy%)
  7910.    subroutine fg_move (i*2 ix, i*2 iy)
  7911.    procedure fg_move (ix, iy : integer);
  7912.  
  7913. Description
  7914.  
  7915.    The fg_move routine establishes the graphics cursor position at an absolute
  7916.    screen space point.  The fg_setmode routine sets the graphics cursor
  7917.    position to (0,0).
  7918.  
  7919. Parameters
  7920.  
  7921.    ix is the screen space x coordinate of the graphics cursor's new position.
  7922.  
  7923.    iy is the screen space y coordinate of the graphics cursor's new position.
  7924.  
  7925. Return value
  7926.  
  7927.    none
  7928.  
  7929. Restrictions
  7930.  
  7931.    This routine has no effect in text video modes.
  7932.  
  7933. See also
  7934.  
  7935.    fg_moverel, fg_moverw, fg_movew
  7936.  
  7937. Examples
  7938.  
  7939.    6-2, 6-3, 6-5, 6-6, 6-10, 6-17, 7-6, 9-4, 9-5, 9-6, 10-1, 12-4, 12-5, 12-6,
  7940.    13-5, 13-6
  7941.  
  7942.  
  7943.  
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.  
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.                                      130
  7963. fg_moverel
  7964.  
  7965. Prototype
  7966.  
  7967.    void fg_moverel (int ix, int iy);
  7968.    sub FGmoverel (ix%, iy%)
  7969.    subroutine fg_moverel (i*2 ix, i*2 iy)
  7970.    procedure fg_moverel (ix, iy : integer);
  7971.  
  7972. Description
  7973.  
  7974.    The fg_moverel routine establishes the graphics cursor position at a screen
  7975.    space point relative to the current position.
  7976.  
  7977. Parameters
  7978.  
  7979.    ix is the screen space x offset of the graphics cursor's new position.
  7980.  
  7981.    iy is the screen space y offset of the graphics cursor's new position.
  7982.  
  7983. Return value
  7984.  
  7985.    none
  7986.  
  7987. Restrictions
  7988.  
  7989.    This routine has no effect in text video modes.
  7990.  
  7991. See also
  7992.  
  7993.    fg_move, fg_moverw, fg_movew
  7994.  
  7995. Examples
  7996.  
  7997.    6-3
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.  
  8005.  
  8006.  
  8007.  
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.                                      131
  8022. fg_moverw
  8023.  
  8024. Prototype
  8025.  
  8026.    void fg_moverw (double x, double y);
  8027.    sub FGmoverw (x#, y#)
  8028.    subroutine fg_moverw (r*8 x, r*8 y)
  8029.    procedure fg_moverw (x, y : real);
  8030.  
  8031. Description
  8032.  
  8033.    The fg_moverw routine establishes the graphics cursor position at a world
  8034.    space point relative to the current position.
  8035.  
  8036. Parameters
  8037.  
  8038.    x is the world space x offset of the graphics cursor's new position.
  8039.  
  8040.    y is the world space y offset of the graphics cursor's new position.
  8041.  
  8042. Return value
  8043.  
  8044.    none
  8045.  
  8046. Restrictions
  8047.  
  8048.    This routine is not available in Fastgraph/Light and has no effect in text
  8049.    video modes.
  8050.  
  8051. See also
  8052.  
  8053.    fg_move, fg_moverel, fg_movew
  8054.  
  8055.  
  8056.  
  8057.  
  8058.  
  8059.  
  8060.  
  8061.  
  8062.  
  8063.  
  8064.  
  8065.  
  8066.  
  8067.  
  8068.  
  8069.  
  8070.  
  8071.  
  8072.  
  8073.  
  8074.  
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.                                      132
  8081. fg_movew
  8082.  
  8083. Prototype
  8084.  
  8085.    void fg_movew (double x, double y);
  8086.    sub FGmovew (x#, y#)
  8087.    subroutine fg_movew (r*8 x, r*8 y)
  8088.    procedure fg_movew (x, y : real);
  8089.  
  8090. Description
  8091.  
  8092.    The fg_movew routine establishes the graphics cursor position at an
  8093.    absolute world space point.  The fg_initw routine sets the graphics cursor
  8094.    position to (0.0,0.0).
  8095.  
  8096. Parameters
  8097.  
  8098.    x is the world space x coordinate of the graphics cursor's new position.
  8099.  
  8100.    y is the world space y coordinate of the graphics cursor's new position.
  8101.  
  8102. Return value
  8103.  
  8104.    none
  8105.  
  8106. Restrictions
  8107.  
  8108.    This routine is not available in Fastgraph/Light and has no effect in text
  8109.    video modes.
  8110.  
  8111. See also
  8112.  
  8113.    fg_move, fg_moverel, fg_moverw
  8114.  
  8115. Examples
  8116.  
  8117.    4-3, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  8118.  
  8119.  
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.                                      133
  8140. fg_music
  8141.  
  8142. Prototype
  8143.  
  8144.    void fg_music (char *music_string);
  8145.    sub FGmusic (music_string$)
  8146.    subroutine fg_music (c*(*) music_string)
  8147.    procedure fg_music (music_string : string);
  8148.  
  8149. Description
  8150.  
  8151.    The fg_music routine uses the programmable timer to play a sequence of
  8152.    musical tones.
  8153.  
  8154. Parameters
  8155.  
  8156.    music_string is an arbitrary-length sequence of music commands, followed by
  8157.    a dollar-sign ($) terminator.  Music commands are summarized in the
  8158.    following table:
  8159.  
  8160. command      meaning
  8161.  
  8162. A thru G     Play the specified note in the current octave.
  8163.  
  8164. #            May be appended to a note character (A through G) to make that
  8165.              note sharp.
  8166.  
  8167. .            May be appended to a note character (A through G) or a sharp (#)
  8168.              to extend that note by half its normal length.  Multiple dots may
  8169.              be used, and each will again extend the note by half as much as
  8170.              the previous extension.
  8171.  
  8172. Ln           Set the length of subsequent notes and pauses.  The value of n is
  8173.              an integer between 1 and 64, where 1 indicates a whole note, 2 a
  8174.              half note, 4 a quarter note, and so forth.  If no L command is
  8175.              present, L4 is assumed.
  8176.  
  8177. On           Set the octave for subsequent notes.  The value of n may be an
  8178.              integer between 0 and 6 to set a specific octave.  It also can be
  8179.              a plus (+) or minus (-) character to increment or decrement the
  8180.              current octave number.  Octave 4 contains middle C, and if no O
  8181.              command is present, O4 is assumed.
  8182.  
  8183. P            Pause (rest) for the duration specified by the most recent L
  8184.              command.
  8185.  
  8186. Sn           Set the amount of silence between notes.  The value of n is an
  8187.              integer between 0 and 2.  If n is 0, each note plays for the full
  8188.              period set by the L command (music legato).  If n is 1, each note
  8189.              plays for 7/8 the period set by the L command (music normal).  If
  8190.              n is 2, each note plays for 3/4 the period set by the L command
  8191.              (music staccato).  If no S command is present, S1 is assumed.
  8192.  
  8193. Tn           Set the tempo of the music (the number of quarter notes per
  8194.              minute).  The value of n is an integer between 32 and 255.  If no
  8195.              T command is present, T120 is assumed.
  8196.  
  8197.  
  8198.                                      134
  8199. fg_music (continued)
  8200.  
  8201. Parameters (continued)
  8202.  
  8203.    The fg_music routine ignores any other characters in music_string.  It also
  8204.    ignores command values outside the allowable range, such as T20 or O8.
  8205.  
  8206. Return value
  8207.  
  8208.    none
  8209.  
  8210. Restrictions
  8211.  
  8212.    This routine has no effect if there is asynchronous sound in progress.
  8213.  
  8214. See also
  8215.  
  8216.    fg_musicb
  8217.  
  8218. Examples
  8219.  
  8220.    15-3
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  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.                                      135
  8258. fg_musicb
  8259.  
  8260. Prototype
  8261.  
  8262.    void fg_musicb (char *music_string, int ntimes);
  8263.    sub FGmusicb (music_string$, ntimes%)
  8264.    subroutine fg_musicb (c*(*) music_string, i*2 ntimes)
  8265.    procedure fg_musicb (music_string : string; ntimes : integer);
  8266.  
  8267. Description
  8268.  
  8269.    The fg_musicb routine uses the programmable timer to play a sequence of
  8270.    musical tones, concurrent with other activity.
  8271.  
  8272. Parameters
  8273.  
  8274.    music_string is an arbitrary-length sequence of music commands, followed by
  8275.    a dollar-sign ($) terminator.  Refer to the description of the fg_music
  8276.    routine for a complete list of music commands.
  8277.  
  8278.    ntimes specifies the number of times to cycle through the music commands in
  8279.    music_string.  If ntimes is negative, the music will play repetitively
  8280.    until you stop it with the fg_hush or fg_hushnext routine.
  8281.  
  8282. Return value
  8283.  
  8284.    none
  8285.  
  8286. Restrictions
  8287.  
  8288.    This routine has no effect if there is asynchronous sound already in
  8289.    progress.  To allow for fast-tempo music, Fastgraph temporarily quadruples
  8290.    the clock tick interrupt rate from 18.2 to 72.8 ticks per second while
  8291.    producing asynchronous sound.  Because many disk controllers rely on the
  8292.    18.2 tick per second clock rate to synchronize disk accesses, your programs
  8293.    should not perform any disk operations when asynchronous sound is in
  8294.    progress.
  8295.  
  8296. See also
  8297.  
  8298.    fg_hush, fg_hushnext, fg_music, fg_playing, fg_resume, fg_suspend
  8299.  
  8300. Examples
  8301.  
  8302.    15-6, 15-7, 15-8
  8303.  
  8304.  
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.                                      136
  8317. fg_numlock
  8318.  
  8319. Prototype
  8320.  
  8321.    int fg_numlock (void);
  8322.    function FGnumlock% ()
  8323.    i*2 function fg_numlock ()
  8324.    function fg_numlock : integer;
  8325.  
  8326. Description
  8327.  
  8328.    The fg_numlock routine determines the state of the NumLock key.
  8329.  
  8330. Parameters
  8331.  
  8332.    none
  8333.  
  8334. Return value
  8335.  
  8336.    If the return value is 0, it means the NumLock key is off.  If it is 1, it
  8337.    means the NumLock key is on.
  8338.  
  8339. Restrictions
  8340.  
  8341.    none
  8342.  
  8343. See also
  8344.  
  8345.    fg_capslock, fg_scrlock, fg_setcaps, fg_setnum
  8346.  
  8347. Examples
  8348.  
  8349.    14-3
  8350.  
  8351.  
  8352.  
  8353.  
  8354.  
  8355.  
  8356.  
  8357.  
  8358.  
  8359.  
  8360.  
  8361.  
  8362.  
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.                                      137
  8376. fg_pagesize
  8377.  
  8378. Prototype
  8379.  
  8380.    long fg_pagesize (void);
  8381.    function FGpagesize& ()
  8382.    i*4 function fg_pagesize ();
  8383.    function fg_pagesize : longint;
  8384.  
  8385. Description
  8386.  
  8387.    The fg_pagesize routine returns the video page size in bytes for the
  8388.    current video mode.
  8389.  
  8390. Parameters
  8391.  
  8392.    none
  8393.  
  8394. Return value
  8395.  
  8396.    The video page size in bytes.
  8397.  
  8398. Restrictions
  8399.  
  8400.    none
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.  
  8411.  
  8412.  
  8413.  
  8414.  
  8415.  
  8416.  
  8417.  
  8418.  
  8419.  
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.                                      138
  8435. fg_paint
  8436.  
  8437. Prototype
  8438.  
  8439.    void fg_paint (int ix, int iy);
  8440.    sub FGpaint (ix%, iy%)
  8441.    subroutine fg_paint (i*2 ix, i*2 iy)
  8442.    procedure fg_paint (ix, iy : integer);
  8443.  
  8444. Description
  8445.  
  8446.    The fg_paint routine fills an arbitrary closed region with the current
  8447.    color value.  The region is defined by specifying a screen space point
  8448.    within its interior.
  8449.  
  8450. Parameters
  8451.  
  8452.    ix is the screen space x coordinate of the interior point.
  8453.  
  8454.    iy is the screen space y coordinate of the interior point.
  8455.  
  8456. Return value
  8457.  
  8458.    none
  8459.  
  8460. Restrictions
  8461.  
  8462.    This routine has no effect in text video modes.  The screen edges are not
  8463.    considered region boundaries, and filling an open region will cause
  8464.    fg_paint to behave unpredictably.
  8465.  
  8466. See also
  8467.  
  8468.    fg_flood, fg_paintw
  8469.  
  8470. Examples
  8471.  
  8472.    6-17, 13-5
  8473.  
  8474.  
  8475.  
  8476.  
  8477.  
  8478.  
  8479.  
  8480.  
  8481.  
  8482.  
  8483.  
  8484.  
  8485.  
  8486.  
  8487.  
  8488.  
  8489.  
  8490.  
  8491.  
  8492.  
  8493.                                      139
  8494. fg_paintw
  8495.  
  8496. Prototype
  8497.  
  8498.    void fg_paintw (double x, double y);
  8499.    sub FGpaintw (x#, y#)
  8500.    subroutine fg_paintw (r*8 x, r*8 y)
  8501.    procedure fg_paintw (x, y : real);
  8502.  
  8503. Description
  8504.  
  8505.    The fg_paintw routine fills an arbitrary closed region with the current
  8506.    color value.  The region is defined by specifying a world space point
  8507.    within its interior.
  8508.  
  8509. Parameters
  8510.  
  8511.    x is the world space x coordinate of the interior point.
  8512.  
  8513.    y is the world space y coordinate of the interior point.
  8514.  
  8515. Return value
  8516.  
  8517.    none
  8518.  
  8519. Restrictions
  8520.  
  8521.    This routine is not available in Fastgraph/Light and has no effect in text
  8522.    video modes.  The screen edges are not considered region boundaries, and
  8523.    filling an open region will cause fg_paintw to behave unpredictably.
  8524.  
  8525. See also
  8526.  
  8527.    fg_floodw, fg_paint
  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.                                      140
  8553. fg_palette
  8554.  
  8555. Prototype
  8556.  
  8557.    void fg_palette (int number, int color);
  8558.    sub FGpalette (number%, color%)
  8559.    subroutine fg_palette (i*2 number, i*2 color)
  8560.    procedure fg_palette (number, color : integer);
  8561.  
  8562. Description
  8563.  
  8564.    The fg_palette routine has different functions depending on the current
  8565.    graphics video mode.  For CGA four-color modes (modes 4 and 5), it
  8566.    establishes the current palette and defines the background color for that
  8567.    palette.  In the CGA two-color mode (mode 6), it defines the foreground
  8568.    color.  For 16-color graphics modes (modes 9, 13, 14, 15, 16, 17, 18, 28,
  8569.    and 29), it defines the value of a palette register.  For 256-color
  8570.    graphics modes (modes 19 through 27), it defines the value of a video DAC
  8571.    register.
  8572.  
  8573. Parameters
  8574.  
  8575.    The meanings of the number and color parameters depend on the current video
  8576.    mode.  The following table summarizes the parameter meanings and legal
  8577.    values for each video mode.
  8578.  
  8579.    mode   number parameter (range)           color parameter (range)
  8580.  
  8581.    4-5    CGA palette number (0 to 5)        background color (0 to 15)
  8582.    6      ignored                            foreground color (0 to 15)
  8583.    9      palette register (0 to 15)         palette value (0 to 15)
  8584.    13-14  palette register (0 to 15)         palette value (0 to 23)
  8585.    15     palette register (0, 1, 4, or 5)   palette value (0, 8, or 24)
  8586.    16     palette register (0 to 15)         palette value (0 to 63)
  8587.    17     palette register (0 or 1)          video DAC register (0 to 15)
  8588.    18     palette register (0 to 15)         video DAC register (0 to 15)
  8589.    19-27  video DAC register (0 to 255)      DAC value (0 to 63)
  8590.    28-29  palette register (0 to 15)         video DAC register (0 to 15)
  8591.  
  8592.    Refer to Chapter 5 of the Fastgraph User's Guide for more specific
  8593.    information about the number and color parameters.
  8594.  
  8595. Return value
  8596.  
  8597.    none
  8598.  
  8599. Restrictions
  8600.  
  8601.    This routine has no effect in text video modes or Hercules graphics modes.
  8602.    Changing the foreground color (in mode 6) always works on true CGA
  8603.    adapters, but there are very few EGA and VGA adapters that correctly
  8604.    implement this capability in their mode 6 emulation.
  8605.  
  8606. See also
  8607.  
  8608.    fg_defcolor, fg_maprgb, fg_palettes, fg_setcolor, fg_setdacs, fg_setrgb
  8609.  
  8610.  
  8611.                                      141
  8612. fg_palette (continued)
  8613.  
  8614. Examples
  8615.  
  8616.    5-1, 5-2, 5-3, 5-6, 5-7, 5-8, 5-9, 5-13, 5-16, 9-6
  8617.  
  8618.  
  8619.  
  8620.  
  8621.  
  8622.  
  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.                                      142
  8671. fg_palettes
  8672.  
  8673. Prototype
  8674.  
  8675.    void fg_palettes (int *color_array);
  8676.    sub FGpalettes (color_array%())
  8677.    subroutine fg_palettes (i*2 color_array)
  8678.    procedure fg_palettes (var color_array : integer);
  8679.  
  8680. Description
  8681.  
  8682.    The fg_palettes routine defines all 16 palette registers (in 16-color
  8683.    graphics modes), or the first 16 video DAC registers (in 256-color graphics
  8684.    modes).
  8685.  
  8686. Parameters
  8687.  
  8688.    color_array is a 16-element array that contains the values to assign to the
  8689.    palette registers or video DAC registers.
  8690.  
  8691. Return value
  8692.  
  8693.    none
  8694.  
  8695. Restrictions
  8696.  
  8697.    This routine has no effect in text video modes, CGA graphics modes, or
  8698.    Hercules graphics modes.
  8699.  
  8700. See also
  8701.  
  8702.    fg_maprgb, fg_palette, fg_setdacs
  8703.  
  8704. Examples
  8705.  
  8706.    5-14
  8707.  
  8708.  
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.  
  8719.  
  8720.  
  8721.  
  8722.  
  8723.  
  8724.  
  8725.  
  8726.  
  8727.  
  8728.  
  8729.                                      143
  8730. fg_pan
  8731.  
  8732. Prototype
  8733.  
  8734.    void fg_pan (int ix, int iy);
  8735.    sub FGpan (ix%, iy%)
  8736.    subroutine fg_pan (i*2 ix, i*2 iy)
  8737.    procedure fg_pan (ix, iy : integer);
  8738.  
  8739. Description
  8740.  
  8741.    The fg_pan routine changes the screen origin (the upper left corner of the
  8742.    screen) to the specified screen space coordinates.
  8743.  
  8744. Parameters
  8745.  
  8746.    ix is the new screen space x coordinate for the screen origin.
  8747.  
  8748.    iy is the new screen space y coordinate for the screen origin.
  8749.  
  8750. Return value
  8751.  
  8752.    none
  8753.  
  8754. Restrictions
  8755.  
  8756.    This routine has no effect in text video modes.  Because of hardware
  8757.    limitations, only certain coordinate positions can be used as the screen
  8758.    origin.  Fastgraph compensates for these restrictions by reducing ix and iy
  8759.    to acceptable values in the pertinent video modes, as shown in the
  8760.    following table.
  8761.  
  8762.                            x will be reduced   y will be reduced
  8763.           video mode       to a multiple of:   to a multiple of:
  8764.  
  8765.               4-5                  8                   2
  8766.                6                  16                   2
  8767.                9                   4                   4
  8768.               11                   8                   4
  8769.               12                   4                2 or 3
  8770.  
  8771. See also
  8772.  
  8773.    fg_panw
  8774.  
  8775. Examples
  8776.  
  8777.    13-6, 13-7
  8778.  
  8779.  
  8780.  
  8781.  
  8782.  
  8783.  
  8784.  
  8785.  
  8786.  
  8787.  
  8788.                                      144
  8789. fg_panw
  8790.  
  8791. Prototype
  8792.  
  8793.    void fg_panw (double x, double y);
  8794.    sub FGpanw (x#, y#)
  8795.    subroutine fg_panw (r*8 x, r*8 y)
  8796.    procedure fg_panw (x, y : real);
  8797.  
  8798. Description
  8799.  
  8800.    The fg_panw routine changes the screen origin (the upper left corner of the
  8801.    screen) to the specified world space coordinates.
  8802.  
  8803. Parameters
  8804.  
  8805.    x is the new world space x coordinate for the screen origin.
  8806.  
  8807.    y is the new world space y coordinate for the screen origin.
  8808.  
  8809. Return value
  8810.  
  8811.    none
  8812.  
  8813. Restrictions
  8814.  
  8815.    This routine is not available in Fastgraph/Light and has no effect in text
  8816.    video modes.  To compensate for the hardware limitations that restrict the
  8817.    screen origin coordinates (see the description of the fg_pan routine),
  8818.    Fastgraph reduces x and y to an acceptable screen space equivalent.
  8819.  
  8820. See also
  8821.  
  8822.    fg_pan
  8823.  
  8824.  
  8825.  
  8826.  
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.                                      145
  8848. fg_pattern
  8849.  
  8850. Prototype
  8851.  
  8852.    void fg_pattern (int index, int display_pattern);
  8853.    sub FGpattern (index%, display_pattern%)
  8854.    subroutine fg_pattern (i*2 index, i*2 display_pattern)
  8855.    procedure fg_pattern (index, display_pattern : integer);
  8856.  
  8857. Description
  8858.  
  8859.    The fg_pattern routine defines one of Fastgraph's 256 display patterns used
  8860.    with the fg_dispfile, fg_display, or fg_displayp routines.  When using
  8861.    these routines to display a pixel run map, Fastgraph will use the pattern
  8862.    associated with that color index instead of displaying the color itself.
  8863.    Refer to the Fastgraph User's Guide for more information about display
  8864.    patterns and their default values for each graphics video mode.
  8865.  
  8866. Parameters
  8867.  
  8868.    index is the number of the display pattern to define, between 0 and 255.
  8869.  
  8870.    display_pattern is a 16-bit value representing the actual display pattern.
  8871.    Its structure depends on the video mode, as summarized in the following
  8872.    table.
  8873.  
  8874.      video modes         pattern structure
  8875.  
  8876.      4, 5, 12            shift count (8 bits), four pixels (2 bits each)
  8877.      6, 11               shift count (8 bits), eight pixels (1 bit each)
  8878.      9                   shift count (8 bits), two pixels (4 bits each)
  8879.      13-16, 18, 28, 29   unused (8 bits), two pixels (4 bits each)
  8880.      17                  unused (14 bits), two pixels (1 bit each)
  8881.  
  8882.    The shift count defines the number of bits that display_pattern is rotated
  8883.    left when applied to odd-numbered pixel rows, while the pixels are the
  8884.    actual color values replicated through the pixel run.  For the EGA and VGA
  8885.    graphics modes, an implied one pixel shift count is used.
  8886.  
  8887. Return value
  8888.  
  8889.    none
  8890.  
  8891. Restrictions
  8892.  
  8893.    This routine has no effect in text video modes or in 256-color graphics
  8894.    modes.
  8895.  
  8896. See also
  8897.  
  8898.    fg_dispfile, fg_display, fg_displayp, fg_showppr, fg_showspr
  8899.  
  8900. Examples
  8901.  
  8902.    9-6
  8903.  
  8904.  
  8905.  
  8906.                                      146
  8907. fg_pcxhead
  8908.  
  8909. Prototype
  8910.  
  8911.    int fg_pcxhead (char *pcx_file, char *pcx_header);
  8912.    function FGpcxhead% (pcx_file$, pcx_header$)
  8913.    i*2 function fg_pcxhead (c*(*) pcx_file, i*1 pcx_header)
  8914.    function fg_pcxhead (pcx_file : string; var pcx_header : byte) : integer;
  8915.  
  8916. Description
  8917.  
  8918.    The fg_pcxhead routine reads a PCX file header into a 128-byte buffer.
  8919.  
  8920. Parameters
  8921.  
  8922.    pcx_file is the name of the PCX file.  It may include a path specification
  8923.    and must be terminated by a zero byte.
  8924.  
  8925.    pcx_header is the address of the 128-byte buffer to receive the PCX file
  8926.    header.  In BASIC programs, it must be a fixed-length 128-byte string.
  8927.  
  8928.  
  8929. Return value
  8930.  
  8931.     0 = Success
  8932.    -1 = The specified file does not exist
  8933.    -2 = The specified file is not a PCX file
  8934.  
  8935. Restrictions
  8936.  
  8937.    none
  8938.  
  8939. See also
  8940.  
  8941.    fg_pcxmode, fg_showpcx
  8942.  
  8943. Examples
  8944.  
  8945.    9-2
  8946.  
  8947.  
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.                                      147
  8966. fg_pcxmode
  8967.  
  8968. Prototype
  8969.  
  8970.    int fg_pcxmode (char *pcx_header);
  8971.    function FGpcxmode% (pcx_header$)
  8972.    i*2 function fg_pcxmode (i*1 pcx_header)
  8973.    function fg_pcxmode (var pcx_header : byte) : integer;
  8974.  
  8975. Description
  8976.  
  8977.    The fg_pcxmode routine determines the optimal video mode for displaying a
  8978.    PCX file.  The optimal mode is the compatible video mode having the lowest
  8979.    resolution larger than or equal to the image dimensions.  See the
  8980.    description of the fg_showpcx routine for a table of compatible video modes
  8981.    for PCX files.
  8982.  
  8983. Parameters
  8984.  
  8985.    pcx_header is the address of a 128-byte buffer containing the PCX file
  8986.    header.  In BASIC programs, it must be a fixed-length 128-byte string.
  8987.  
  8988. Return value
  8989.  
  8990.    >0 = The optimal video mode for displaying the PCX image
  8991.    -1 = pcx_header does not contain a valid PCX file header
  8992.    -2 = Cannot determine a compatible video mode
  8993.  
  8994. Restrictions
  8995.  
  8996.    none
  8997.  
  8998. See also
  8999.  
  9000.    fg_pcxhead, fg_setmode, fg_showpcx
  9001.  
  9002. Examples
  9003.  
  9004.    9-2
  9005.  
  9006.  
  9007.  
  9008.  
  9009.  
  9010.  
  9011.  
  9012.  
  9013.  
  9014.  
  9015.  
  9016.  
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.                                      148
  9025. fg_playing
  9026.  
  9027. Prototype
  9028.  
  9029.    int fg_playing (void);
  9030.    function FGplaying% ()
  9031.    i*2 function fg_playing ()
  9032.    function fg_playing : integer;
  9033.  
  9034. Description
  9035.  
  9036.    The fg_playing routine determines whether or not there is any asynchronous
  9037.    sound in progress.
  9038.  
  9039. Parameters
  9040.  
  9041.    none
  9042.  
  9043. Return value
  9044.  
  9045.    If the return value is 0, it means there is no asynchronous sound in
  9046.    progress.  If it is 1, then there is asynchronous sound in progress.
  9047.  
  9048. Restrictions
  9049.  
  9050.    none
  9051.  
  9052. See also
  9053.  
  9054.    fg_musicb, fg_sounds, fg_voices
  9055.  
  9056. Examples
  9057.  
  9058.    15-4, 15-5, 15-6, 15-7, 15-8
  9059.  
  9060.  
  9061.  
  9062.  
  9063.  
  9064.  
  9065.  
  9066.  
  9067.  
  9068.  
  9069.  
  9070.  
  9071.  
  9072.  
  9073.  
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.                                      149
  9084. fg_point
  9085.  
  9086. Prototype
  9087.  
  9088.    void fg_point (int ix, int iy);
  9089.    sub FGpoint (ix%, iy%)
  9090.    subroutine fg_point (i*2 ix, i*2 iy)
  9091.    procedure fg_point (ix, iy : integer);
  9092.  
  9093. Description
  9094.  
  9095.    The fg_point routine draws a point (displays a pixel) in screen space.
  9096.  
  9097. Parameters
  9098.  
  9099.    ix is the point's screen space x coordinate.
  9100.  
  9101.    iy is the point's screen space y coordinate.
  9102.  
  9103. Return value
  9104.  
  9105.    none
  9106.  
  9107. Restrictions
  9108.  
  9109.    This routine has no effect in text video modes.
  9110.  
  9111. See also
  9112.  
  9113.    fg_pointw, fg_pointx
  9114.  
  9115. Examples
  9116.  
  9117.    6-1
  9118.  
  9119.  
  9120.  
  9121.  
  9122.  
  9123.  
  9124.  
  9125.  
  9126.  
  9127.  
  9128.  
  9129.  
  9130.  
  9131.  
  9132.  
  9133.  
  9134.  
  9135.  
  9136.  
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.                                      150
  9143. fg_pointw
  9144.  
  9145. Prototype
  9146.  
  9147.    void fg_pointw (double x, double y);
  9148.    sub FGpointw (x#, y#)
  9149.    subroutine fg_pointw (r*8 x, r*8 y)
  9150.    procedure fg_pointw (x, y : real);
  9151.  
  9152. Description
  9153.  
  9154.    The fg_pointw routine draws a point (displays a pixel) in world space.
  9155.  
  9156. Parameters
  9157.  
  9158.    x is the point's world space x coordinate.
  9159.  
  9160.    y is the point's world space y coordinate.
  9161.  
  9162. Return value
  9163.  
  9164.    none
  9165.  
  9166. Restrictions
  9167.  
  9168.    This routine is not available in Fastgraph/Light and has no effect in text
  9169.    video modes.
  9170.  
  9171. See also
  9172.  
  9173.    fg_point, fg_pointxw
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.  
  9182.  
  9183.  
  9184.  
  9185.  
  9186.  
  9187.  
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.                                      151
  9202. fg_pointx
  9203.  
  9204. Prototype
  9205.  
  9206.    void fg_pointx (int ix, int iy);
  9207.    sub FGpointx (ix%, iy%)
  9208.    subroutine fg_pointx (i*2 ix, i*2 iy)
  9209.    procedure fg_pointx (ix, iy : integer);
  9210.  
  9211. Description
  9212.  
  9213.    The fg_pointx routine draws a point (display a pixel) in "exclusive or"
  9214.    mode in screen space.
  9215.  
  9216. Parameters
  9217.  
  9218.    ix is the point's screen space x coordinate.
  9219.  
  9220.    iy is the point's screen space y coordinate.
  9221.  
  9222. Return value
  9223.  
  9224.    none
  9225.  
  9226. Restrictions
  9227.  
  9228.    This routine has no effect in text video modes.
  9229.  
  9230.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  9231.    is reset to its default replacement mode on return.
  9232.  
  9233. See also
  9234.  
  9235.    fg_point, fg_pointxw
  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.                                      152
  9261. fg_pointxw
  9262.  
  9263. Prototype
  9264.  
  9265.    void fg_pointxw (double x, double y);
  9266.    sub FGpointxw (x#, y#)
  9267.    subroutine fg_pointxw (r*8 x, r*8 y)
  9268.    procedure fg_pointxw (x, y : real);
  9269.  
  9270. Description
  9271.  
  9272.    The fg_pointxw routine draws a point (displays a pixel) in "exclusive or"
  9273.    mode in world space.
  9274.  
  9275. Parameters
  9276.  
  9277.    x is the point's world space x coordinate.
  9278.  
  9279.    y is the point's world space y coordinate.
  9280.  
  9281. Return value
  9282.  
  9283.    none
  9284.  
  9285. Restrictions
  9286.  
  9287.    This routine is not available in Fastgraph/Light and has no effect in text
  9288.    video modes.
  9289.  
  9290.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  9291.    is reset to its default replacement mode on return.
  9292.  
  9293. See also
  9294.  
  9295.    fg_pointw, fg_pointx
  9296.  
  9297.  
  9298.  
  9299.  
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.  
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.                                      153
  9320. fg_polyfill
  9321.  
  9322. Prototype
  9323.  
  9324.    void fg_polyfill (int *vertex_array, int *work_array, int n);
  9325.    sub FGpolyfill (vertex_array%(), work_array%(), n%)
  9326.    subroutine fg_polyfill (i*2 vertex_array, i*2 work_array, i*2 n)
  9327.    procedure fg_polyfill (var vertex_array, work_array : integer;
  9328.      n : integer);
  9329.  
  9330. Description
  9331.  
  9332.    The fg_polyfill routine draws a filled convex polygon in screen space.  The
  9333.    polygon is filled with pixels of the current color.
  9334.  
  9335. Parameters
  9336.  
  9337.    vertex_array is an arbitrary-length array containing the (x,y) coordinate
  9338.    pairs of each vertex.  The first array element is the x component of the
  9339.    first vertex, the second element is the y component of the first vertex,
  9340.    the third element is the x component of the second vertex, and so forth.
  9341.  
  9342.    work_array is used internally by the fg_polyfill routine.  Its size must be
  9343.    at least twice the polygon height if defined as an integer array, or four
  9344.    times the polygon height if defined as a byte array.
  9345.  
  9346.    n is the number of vertices in the polygon.
  9347.  
  9348. Return value
  9349.  
  9350.    none
  9351.  
  9352. Restrictions
  9353.  
  9354.    This routine has no effect in text video modes.
  9355.  
  9356.    If you attempt to fill a non-convex polygon, only a portion of it will be
  9357.    filled.
  9358.  
  9359. See also
  9360.  
  9361.    fg_polyline, fg_polyoff
  9362.  
  9363. Examples
  9364.  
  9365.    6-8
  9366.  
  9367.  
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.                                      154
  9379. fg_polygon
  9380.  
  9381. Prototype
  9382.  
  9383.    void fg_polygon (int *ix_array, int *iy_array, int n);
  9384.    sub FGpolygon (ix_array%(), iy_array%(), n%)
  9385.    subroutine fg_polygon (i*2 ix_array, i*2 iy_array, i*2 n)
  9386.    procedure fg_polygon (var ix_array, iy_array : integer; n : integer);
  9387.  
  9388. Description
  9389.  
  9390.    The fg_polygon routine draws an unfilled polygon in screen space, using two
  9391.    coordinate arrays to define the polygon vertices.  The drawing of the
  9392.    polygon begins at the first vertex defined in the coordinate arrays,
  9393.    through the remaining vertices in sequence, and finally back to the first
  9394.    vertex if necessary.
  9395.  
  9396. Parameters
  9397.  
  9398.    ix_array is an arbitrary-length array containing the screen space x
  9399.    coordinates of the polygon vertices.
  9400.  
  9401.    iy_array is an arbitrary-length array containing the screen space y
  9402.    coordinates of the polygon vertices.
  9403.  
  9404.    n is the number of vertices in the polygon.
  9405.  
  9406. Return value
  9407.  
  9408.    none
  9409.  
  9410. Restrictions
  9411.  
  9412.    This routine has no effect in text video modes.
  9413.  
  9414. See also
  9415.  
  9416.    fg_polyline, fg_polygonw
  9417.  
  9418. Examples
  9419.  
  9420.    6-7
  9421.  
  9422.  
  9423.  
  9424.  
  9425.  
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.                                      155
  9438. fg_polygonw
  9439.  
  9440. Prototype
  9441.  
  9442.    void fg_polygonw (double *x_array, double *y_array, int n);
  9443.    sub FGpolygonw (x_array#(), y_array#(), n%)
  9444.    subroutine fg_polygonw (r*8 x_array, r*8 y_array, i*2 n)
  9445.    procedure fg_polygonw (var x_array, y_array : real; n : integer);
  9446.  
  9447. Description
  9448.  
  9449.    The fg_polygonw routine draws an unfilled polygon in world space, using two
  9450.    coordinate arrays to define the polygon vertices.  The drawing of the
  9451.    polygon begins at the first vertex defined in the coordinate arrays,
  9452.    through the remaining vertices in sequence, and finally back to the first
  9453.    vertex if necessary.
  9454.  
  9455. Parameters
  9456.  
  9457.    x_array is an arbitrary-length array containing the world space x
  9458.    coordinates of the polygon vertices.
  9459.  
  9460.    y_array is an arbitrary-length array containing the world space y
  9461.    coordinates of the polygon vertices.
  9462.  
  9463.    n is the number of vertices in the polygon.
  9464.  
  9465. Return value
  9466.  
  9467.    none
  9468.  
  9469. Restrictions
  9470.  
  9471.    This routine is not available in Fastgraph/Light and has no effect in text
  9472.    video modes.
  9473.  
  9474. See also
  9475.  
  9476.    fg_polygon
  9477.  
  9478.  
  9479.  
  9480.  
  9481.  
  9482.  
  9483.  
  9484.  
  9485.  
  9486.  
  9487.  
  9488.  
  9489.  
  9490.  
  9491.  
  9492.  
  9493.  
  9494.  
  9495.  
  9496.                                      156
  9497. fg_polyline
  9498.  
  9499. Prototype
  9500.  
  9501.    void fg_polyline (int *vertex_array, int n);
  9502.    sub FGpolyline (vertex_array%(), n%)
  9503.    subroutine fg_polyline (i*2 vertex_array, i*2 n)
  9504.    procedure fg_polyline (var vertex_array : integer; n : integer);
  9505.  
  9506. Description
  9507.  
  9508.    The fg_polyline routine draws an unfilled polygon in screen space, using
  9509.    a single array to define the polygon vertices.  Compare this to the
  9510.    fg_polygon routine, which uses separate arrays for the x and y components
  9511.    of each vertex.
  9512.  
  9513. Parameters
  9514.  
  9515.    vertex_array is an arbitrary-length array containing the (x,y) coordinate
  9516.    pairs of each vertex.  The first array element is the x component of the
  9517.    first vertex, the second element is the y component of the first vertex,
  9518.    the third element is the x component of the second vertex, and so forth.
  9519.  
  9520.    n is the number of vertices in the polygon.
  9521.  
  9522. Return value
  9523.  
  9524.    none
  9525.  
  9526. Restrictions
  9527.  
  9528.    This routine has no effect in text video modes.
  9529.  
  9530. See also
  9531.  
  9532.    fg_polyfill, fg_polygon, fg_polyoff
  9533.  
  9534. Examples
  9535.  
  9536.    6-8
  9537.  
  9538.  
  9539.  
  9540.  
  9541.  
  9542.  
  9543.  
  9544.  
  9545.  
  9546.  
  9547.  
  9548.  
  9549.  
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.                                      157
  9556. fg_polyoff
  9557.  
  9558. Prototype
  9559.  
  9560.    void fg_polyoff (int ix, int iy);
  9561.    sub FGpolyoff (ix%, iy%)
  9562.    subroutine fg_polyoff (i*2 ix, i*2 iy)
  9563.    procedure fg_polyoff (ix, iy : integer);
  9564.  
  9565. Description
  9566.  
  9567.    The fg_polyoff routine defines the screen space offset applied to each
  9568.    vertex for polygons drawn with fg_polyfill or fg_polyline.  By default, the
  9569.    polygon display functions use an offset of zero, meaning their vertex
  9570.    arrays specify the actual vertex coordinates.
  9571.  
  9572. Parameters
  9573.  
  9574.    ix is the horizontal screen space offset applied to the x component of all
  9575.    vertices.
  9576.  
  9577.    iy is the vertical screen space offset applied to the y component of all
  9578.    vertices.
  9579.  
  9580. Return value
  9581.  
  9582.    none
  9583.  
  9584. Restrictions
  9585.  
  9586.    none
  9587.  
  9588. See also
  9589.  
  9590.    fg_polyfill, fg_polyline
  9591.  
  9592. Examples
  9593.  
  9594.    6-8
  9595.  
  9596.  
  9597.  
  9598.  
  9599.  
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.                                      158
  9615. fg_print
  9616.  
  9617. Prototype
  9618.  
  9619.    void fg_print (char *string, int n);
  9620.    sub FGprint (string$, n%)
  9621.    subroutine fg_print (c*(*) string, i*2 n)
  9622.    procedure fg_print (string : string; n : integer);
  9623.  
  9624. Description
  9625.  
  9626.    The fg_print routine displays a string of hardware characters relative to
  9627.    the current graphics position using the current color index.  By default,
  9628.    strings are displayed such that the bottom row of the first character is at
  9629.    the current graphics position.  On return, the graphics cursor is
  9630.    positioned just to the right of the last character displayed.
  9631.  
  9632. Parameters
  9633.  
  9634.    string is the arbitrary-length sequence of characters to display.
  9635.  
  9636.    n is the number of characters to display from string.
  9637.  
  9638. Return value
  9639.  
  9640.    none
  9641.  
  9642. Restrictions
  9643.  
  9644.    This routine has no effect in text video modes.
  9645.  
  9646. See also
  9647.  
  9648.    fg_justify, fg_text
  9649.  
  9650. Examples
  9651.  
  9652.    7-6
  9653.  
  9654.  
  9655.  
  9656.  
  9657.  
  9658.  
  9659.  
  9660.  
  9661.  
  9662.  
  9663.  
  9664.  
  9665.  
  9666.  
  9667.  
  9668.  
  9669.  
  9670.  
  9671.  
  9672.  
  9673.                                      159
  9674. fg_putblock
  9675.  
  9676. Prototype
  9677.  
  9678.    void fg_putblock (char far *buffer, int minx, int maxx, int miny,
  9679.      int maxy);
  9680.    sub FGputblock (buffer$, minx%, maxx%, miny%, maxy%)
  9681.    subroutine fg_putblock (i*1 far buffer, i*2 minx, i*2 maxx, i*2 miny,
  9682.      i*2 maxy)
  9683.    procedure fg_putblock (buffer : pointer; minx, maxx, miny, maxy : integer);
  9684.  
  9685. Description
  9686.  
  9687.    The fg_putblock routine displays a block (previously obtained with
  9688.    fg_getblock) at the specified position on the active video page.  In text
  9689.    modes, the block extremes are defined in character space; in graphics
  9690.    modes, they are defined in screen space.
  9691.  
  9692. Parameters
  9693.  
  9694.    buffer is the address of the array containing the block.  Note that this is
  9695.    passed by FAR reference, except in QuickBASIC.
  9696.  
  9697.    minx is the x coordinate of the block's left edge.  In graphics modes, its
  9698.    value is reduced to a byte boundary if necessary.
  9699.  
  9700.    maxx is the x coordinate of the block's right edge.  It must be greater
  9701.    than or equal to the value of minx.  In graphics modes, its value is
  9702.    extended to a byte boundary if necessary.
  9703.  
  9704.    miny is the y coordinate of the block's top edge.
  9705.  
  9706.    maxy is the y coordinate of the block's bottom edge.  It must be greater
  9707.    than or equal to the value of miny.
  9708.  
  9709. Return value
  9710.  
  9711.    none
  9712.  
  9713. Restrictions
  9714.  
  9715.    The maximum size of a block is 64K bytes.
  9716.  
  9717.    In Pascal programs, buffer must be allocated dynamically with the GetMem
  9718.    procedure.  This is the only way to pass something by far reference in
  9719.    Pascal.
  9720.  
  9721. See also
  9722.  
  9723.    fg_getblock
  9724.  
  9725. Examples
  9726.  
  9727.    11-8
  9728.  
  9729.  
  9730.  
  9731.  
  9732.                                      160
  9733. fg_putimage
  9734.  
  9735. Prototype
  9736.  
  9737.    void fg_putimage (char *map_array, int width, int height);
  9738.    sub FGputimage (map_array$, width%, height%)
  9739.    subroutine fg_putimage (i*1 map_array, i*2 width, i*2 height)
  9740.    procedure fg_putimage (var map_array : byte; width, height : integer);
  9741.  
  9742. Description
  9743.  
  9744.    The fg_putimage routine displays an image stored as a mode-specific bit
  9745.    map, without treating color 0 as transparent.  The image will be positioned
  9746.    so that its lower left corner is at the graphics cursor position.  Refer to
  9747.    the Fastgraph User's Guide for complete information about mode-specific bit
  9748.    maps.
  9749.  
  9750. Parameters
  9751.  
  9752.    map_array is the arbitrary-length array containing the bit map.
  9753.  
  9754.    width is the width in bytes of the bit map.
  9755.  
  9756.    height is the height in bytes (pixel rows) of the bit map.
  9757.  
  9758. Return value
  9759.  
  9760.    none
  9761.  
  9762. Restrictions
  9763.  
  9764.    none
  9765.  
  9766. See also
  9767.  
  9768.    fg_drwimage, fg_getimage
  9769.  
  9770. Examples
  9771.  
  9772.    10-8, 10-9
  9773.  
  9774.  
  9775.  
  9776.  
  9777.  
  9778.  
  9779.  
  9780.  
  9781.  
  9782.  
  9783.  
  9784.  
  9785.  
  9786.  
  9787.  
  9788.  
  9789.  
  9790.  
  9791.                                      161
  9792. fg_quiet
  9793.  
  9794. Prototype
  9795.  
  9796.    void fg_quiet (void);
  9797.    sub FGquiet ()
  9798.    subroutine fg_quiet ()
  9799.    procedure fg_quiet;
  9800.  
  9801. Description
  9802.  
  9803.    The fg_quiet routine stops continuous synchronous sound started with the
  9804.    fg_sound or fg_voice routines.  It has no effect if there is no continuous
  9805.    sound in progress.
  9806.  
  9807. Parameters
  9808.  
  9809.    none
  9810.  
  9811. Return value
  9812.  
  9813.    none
  9814.  
  9815. Restrictions
  9816.  
  9817.    none
  9818.  
  9819. See also
  9820.  
  9821.    fg_sound, fg_voice
  9822.  
  9823. Examples
  9824.  
  9825.    15-2
  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.                                      162
  9851. fg_rect
  9852.  
  9853. Prototype
  9854.  
  9855.    void fg_rect (int minx, int maxx, int miny, int maxy);
  9856.    sub FGrect (minx%, maxx%, miny%, maxy%)
  9857.    subroutine fg_rect (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  9858.    procedure fg_rect (minx, maxx, miny, maxy : integer);
  9859.  
  9860. Description
  9861.  
  9862.    The fg_rect routine draws a solid (filled) rectangle in screen space or
  9863.    character space, without regard to the clipping region.
  9864.  
  9865. Parameters
  9866.  
  9867.    minx is the x coordinate of the rectangle's left edge.
  9868.  
  9869.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  9870.    than or equal to the value of minx.
  9871.  
  9872.    miny is the y coordinate of the rectangle's top edge.
  9873.  
  9874.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  9875.    greater than or equal to the value of miny.
  9876.  
  9877. Return value
  9878.  
  9879.    none
  9880.  
  9881. Restrictions
  9882.  
  9883.    none
  9884.  
  9885. See also
  9886.  
  9887.    fg_box, fg_clprect, fg_drect, fg_rectw
  9888.  
  9889. Examples
  9890.  
  9891.    5-8, 5-10, 6-11, 6-13, 7-5, 7-9
  9892.  
  9893.  
  9894.  
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.  
  9905.  
  9906.  
  9907.  
  9908.  
  9909.                                      163
  9910. fg_rectw
  9911.  
  9912. Prototype
  9913.  
  9914.    void fg_rectw (double xmin, double xmax, double ymin, double ymax);
  9915.    sub FGrectw (xmin#, xmax#, ymin#, ymax#)
  9916.    subroutine fg_rectw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  9917.    procedure fg_rectw (xmin, xmax, ymin, ymax : real);
  9918.  
  9919. Description
  9920.  
  9921.    The fg_rectw routine draws a solid (filled) rectangle in world space,
  9922.    without regard to the clipping region.
  9923.  
  9924. Parameters
  9925.  
  9926.    xmin is the world space x coordinate of the rectangle's left edge.
  9927.  
  9928.    xmax is the world space x coordinate of the rectangle's right edge.  It
  9929.    must be greater than or equal to the value of xmin.
  9930.  
  9931.    ymin is the world space y coordinate of the rectangle's bottom edge.
  9932.  
  9933.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  9934.    be greater than or equal to the value of ymin.
  9935.  
  9936. Return value
  9937.  
  9938.    none
  9939.  
  9940. Restrictions
  9941.  
  9942.    This routine is not available in Fastgraph/Light.
  9943.  
  9944. See also
  9945.  
  9946.    fg_boxw, fg_clprectw, fg_drectw, fg_rect
  9947.  
  9948. Examples
  9949.  
  9950.    7-13
  9951.  
  9952.  
  9953.  
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.                                      164
  9969. fg_reset
  9970.  
  9971. Prototype
  9972.  
  9973.    void fg_reset (void);
  9974.    sub FGreset ()
  9975.    subroutine fg_reset ()
  9976.    procedure fg_reset;
  9977.  
  9978. Description
  9979.  
  9980.    When the ANSI.SYS driver is not loaded, the fg_reset routine erases the
  9981.    screen.  When ANSI.SYS is loaded, fg_reset also restores any previously set
  9982.    screen attributes.  It is generally the last Fastgraph routine called in a
  9983.    program.
  9984.  
  9985. Parameters
  9986.  
  9987.    none
  9988.  
  9989. Return value
  9990.  
  9991.    none
  9992.  
  9993. Restrictions
  9994.  
  9995.    This routine has no effect in graphics video modes.
  9996.  
  9997. See also
  9998.  
  9999.    fg_erase
  10000.  
  10001. Examples
  10002.  
  10003.    3-2
  10004.  
  10005.  
  10006.  
  10007.  
  10008.  
  10009.  
  10010.  
  10011.  
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.  
  10019.  
  10020.  
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.                                      165
  10028. fg_resize
  10029.  
  10030. Prototype
  10031.  
  10032.    void fg_resize (int width, int height);
  10033.    sub FGresize (width%, height%)
  10034.    subroutine fg_resize (i*2 width, i*2 height)
  10035.    procedure fg_resize (width, height : integer);
  10036.  
  10037. Description
  10038.  
  10039.    The fg_resize routine changes the dimensions of a video page in EGA, VGA,
  10040.    and SVGA graphics modes.
  10041.  
  10042. Parameters
  10043.  
  10044.    width specifies the new video page width in pixels.
  10045.  
  10046.    height specifies the new video page height in pixels.
  10047.  
  10048. Return value
  10049.  
  10050.    none
  10051.  
  10052. Restrictions
  10053.  
  10054.    The size of a video page is constrained only by the amount of video memory
  10055.    available.  Increasing the video page size reduces the number of physical
  10056.    pages available proportionally.  In mode 13, for example, increasing the
  10057.    page size from 320x200 to 640x400 reduces the number of video pages from 8
  10058.    to 2.
  10059.  
  10060.    When you call fg_resize, the visual page must be page 0.
  10061.  
  10062.    If you have created any logical video pages, you must release them with
  10063.    fg_freepage before calling fg_resize, and then create them again afterward.
  10064.  
  10065.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  10066.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  10067.    fg_initxms), you should re-initialize these resources after calling
  10068.    fg_resize.  Most mouse drivers expect a fixed video page width, so the
  10069.    mouse cursor may become distorted after resizing video pages.
  10070.  
  10071.    Partial video pages (initially available in some video modes) are
  10072.    unavailable after calling fg_resize, even if you use the video mode's
  10073.    original resolution.
  10074.  
  10075.    The fg_setmode routine re-establishes the dimensions of a video page to the
  10076.    default screen resolution for the selected video mode.
  10077.  
  10078.    This routine is meaningful only in the native EGA and VGA graphics modes
  10079.    (13 to 18), extended VGA graphics modes (20 to 23), and SVGA graphics modes
  10080.    (24 to 29).  It has no effect in other video modes.
  10081.  
  10082. See also
  10083.  
  10084.    fg_pan
  10085.  
  10086.                                      166
  10087. fg_resize (continued)
  10088.  
  10089. Examples
  10090.  
  10091.    8-10, 13-7
  10092.  
  10093.  
  10094.  
  10095.  
  10096.  
  10097.  
  10098.  
  10099.  
  10100.  
  10101.  
  10102.  
  10103.  
  10104.  
  10105.  
  10106.  
  10107.  
  10108.  
  10109.  
  10110.  
  10111.  
  10112.  
  10113.  
  10114.  
  10115.  
  10116.  
  10117.  
  10118.  
  10119.  
  10120.  
  10121.  
  10122.  
  10123.  
  10124.  
  10125.  
  10126.  
  10127.  
  10128.  
  10129.  
  10130.  
  10131.  
  10132.  
  10133.  
  10134.  
  10135.  
  10136.  
  10137.  
  10138.  
  10139.  
  10140.  
  10141.  
  10142.  
  10143.  
  10144.  
  10145.                                      167
  10146. fg_restore
  10147.  
  10148. Prototype
  10149.  
  10150.    void fg_restore (int minx, int maxx, int miny, int maxy);
  10151.    sub FGrestore (minx%, maxx%, miny%, maxy%)
  10152.    subroutine fg_restore (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  10153.    procedure fg_restore (minx, maxx, miny, maxy : integer);
  10154.  
  10155. Description
  10156.  
  10157.    The fg_restore routine copies a rectangular region from the hidden video
  10158.    page to the same position on the active video page.  In text modes, the
  10159.    region is defined in character space; in graphics modes, it is defined in
  10160.    screen space.
  10161.  
  10162. Parameters
  10163.  
  10164.    minx is the x coordinate of the region's left edge.  In graphics modes, its
  10165.    value is reduced to a byte boundary if necessary.
  10166.  
  10167.    maxx is the x coordinate of the region's right edge.  It must be greater
  10168.    than or equal to the value of minx.  In graphics modes, its value is
  10169.    extended to a byte boundary if necessary.
  10170.  
  10171.    miny is the y coordinate of the region's top edge.
  10172.  
  10173.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  10174.    than or equal to the value of miny.
  10175.  
  10176. Return value
  10177.  
  10178.    none
  10179.  
  10180. Restrictions
  10181.  
  10182.    none
  10183.  
  10184. See also
  10185.  
  10186.    fg_restorew, fg_save, fg_sethpage, fg_transfer
  10187.  
  10188. Examples
  10189.  
  10190.    11-2, 11-3
  10191.  
  10192.  
  10193.  
  10194.  
  10195.  
  10196.  
  10197.  
  10198.  
  10199.  
  10200.  
  10201.  
  10202.  
  10203.  
  10204.                                      168
  10205. fg_restorew
  10206.  
  10207. Prototype
  10208.  
  10209.    void fg_restorew (double xmin, double xmax, double ymin, double ymax);
  10210.    sub FGrestorew (xmin#, xmax#, ymin#, ymax#)
  10211.    subroutine fg_restorew (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  10212.    procedure fg_restorew (xmin, xmax, ymin, ymax : real);
  10213.  
  10214. Description
  10215.  
  10216.    The fg_restorew routine copies a rectangular region, defined in world
  10217.    space, from the hidden video page to the same position on the active video
  10218.    page.
  10219.  
  10220. Parameters
  10221.  
  10222.    xmin is the world space x coordinate of the region's left edge.  In
  10223.    graphics modes, its value is reduced to a byte boundary if necessary.
  10224.  
  10225.    xmax is the world space x coordinate of the region's right edge.  It must
  10226.    be greater than or equal to the value of xmin.  In graphics modes, its
  10227.    value is extended to a byte boundary if necessary.
  10228.  
  10229.    ymin is the world space y coordinate of the region's bottom edge.
  10230.  
  10231.    ymax is the world space y coordinate of the region's top edge.  It must be
  10232.    greater than or equal to the value of ymin.
  10233.  
  10234. Return value
  10235.  
  10236.    none
  10237.  
  10238. Restrictions
  10239.  
  10240.    This routine is not available in Fastgraph/Light.
  10241.  
  10242. See also
  10243.  
  10244.    fg_restore, fg_savew, fg_sethpage, fg_transfer
  10245.  
  10246.  
  10247.  
  10248.  
  10249.  
  10250.  
  10251.  
  10252.  
  10253.  
  10254.  
  10255.  
  10256.  
  10257.  
  10258.  
  10259.  
  10260.  
  10261.  
  10262.  
  10263.                                      169
  10264. fg_resume
  10265.  
  10266. Prototype
  10267.  
  10268.    void fg_resume (void);
  10269.    sub FGresume ()
  10270.    subroutine fg_resume ()
  10271.    procedure fg_resume;
  10272.  
  10273. Description
  10274.  
  10275.    The fg_resume routine restarts asynchronous music previously suspended by
  10276.    the fg_suspend routine.  It has no effect if there is no suspended music.
  10277.  
  10278. Parameters
  10279.  
  10280.    none
  10281.  
  10282. Return value
  10283.  
  10284.    none
  10285.  
  10286. Restrictions
  10287.  
  10288.    none
  10289.  
  10290. See also
  10291.  
  10292.    fg_musicb, fg_suspend
  10293.  
  10294. Examples
  10295.  
  10296.    15-8
  10297.  
  10298.  
  10299.  
  10300.  
  10301.  
  10302.  
  10303.  
  10304.  
  10305.  
  10306.  
  10307.  
  10308.  
  10309.  
  10310.  
  10311.  
  10312.  
  10313.  
  10314.  
  10315.  
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.                                      170
  10323. fg_revimage
  10324.  
  10325. Prototype
  10326.  
  10327.    void fg_revimage (char *map_array, int width, int height);
  10328.    sub FGrevimage (map_array$, width%, height%)
  10329.    subroutine fg_revimage (i*1 map_array, i*2 width, i*2 height)
  10330.    procedure fg_revimage (var map_array : byte; width, height : integer);
  10331.  
  10332. Description
  10333.  
  10334.    The fg_revimage routine displays a reversed image stored as a mode-specific
  10335.    bit map.  The image will be positioned so that its lower left corner is at
  10336.    the graphics cursor position.  Refer to the Fastgraph User's Guide for
  10337.    complete information about mode-specific bit maps.
  10338.  
  10339. Parameters
  10340.  
  10341.    map_array is the arbitrary-length array containing the bit map.
  10342.  
  10343.    width is the width in bytes of the bit map.
  10344.  
  10345.    height is the height in bytes (pixel rows) of the bit map.
  10346.  
  10347. Return value
  10348.  
  10349.    none
  10350.  
  10351. Restrictions
  10352.  
  10353.    This routine has no effect in text video modes.
  10354.  
  10355. See also
  10356.  
  10357.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_putimage
  10358.  
  10359. Examples
  10360.  
  10361.    10-8, 10-9
  10362.  
  10363.  
  10364.  
  10365.  
  10366.  
  10367.  
  10368.  
  10369.  
  10370.  
  10371.  
  10372.  
  10373.  
  10374.  
  10375.  
  10376.  
  10377.  
  10378.  
  10379.  
  10380.  
  10381.                                      171
  10382. fg_revmask
  10383.  
  10384. Prototype
  10385.  
  10386.    void fg_revmask (char *map_array, int runs, int width);
  10387.    sub FGrevmask (map_array$, runs%, width%)
  10388.    subroutine fg_revmask (i*1 map_array, i*2 runs, i*2 width)
  10389.    procedure fg_revmask (var map_array : byte; runs, width : integer);
  10390.  
  10391. Description
  10392.  
  10393.    The fg_revmask routine displays a reversed image stored as a masking map.
  10394.    The image will be positioned so that its lower left corner is at the
  10395.    graphics cursor position.  Refer to the description of the fg_drawmask
  10396.    routine for more information about masking maps.
  10397.  
  10398. Parameters
  10399.  
  10400.    map_array is the arbitrary-length array containing the masking map.
  10401.  
  10402.    runs is the number of pixel runs in the masking map.
  10403.  
  10404.    width is the width in pixels of the masking map.
  10405.  
  10406. Return value
  10407.  
  10408.    none
  10409.  
  10410. Restrictions
  10411.  
  10412.    This routine has no effect in text video modes.
  10413.  
  10414. See also
  10415.  
  10416.    fg_clipmask, fg_drawmask, fg_flipmask
  10417.  
  10418. Examples
  10419.  
  10420.    10-17
  10421.  
  10422.  
  10423.  
  10424.  
  10425.  
  10426.  
  10427.  
  10428.  
  10429.  
  10430.  
  10431.  
  10432.  
  10433.  
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.                                      172
  10441. fg_save
  10442.  
  10443. Prototype
  10444.  
  10445.    void fg_save (int minx, int maxx, int miny, int maxy);
  10446.    sub FGsave (minx%, maxx%, miny%, maxy%)
  10447.    subroutine fg_save (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  10448.    procedure fg_save (minx, maxx, miny, maxy : integer);
  10449.  
  10450. Description
  10451.  
  10452.    The fg_save routine copies a rectangular region from the active video page
  10453.    to the same position on the hidden video page.  In text modes, the region
  10454.    is defined in character space; in graphics modes, it is defined in screen
  10455.    space.
  10456.  
  10457. Parameters
  10458.  
  10459.    minx is the x coordinate of the region's left edge.  In graphics modes, its
  10460.    value is reduced to a byte boundary if necessary.
  10461.  
  10462.    maxx is the x coordinate of the region's right edge.  It must be greater
  10463.    than or equal to the value of minx.  In graphics modes, its value is
  10464.    extended to a byte boundary if necessary.
  10465.  
  10466.    miny is the y coordinate of the region's top edge.
  10467.  
  10468.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  10469.    than or equal to the value of miny.
  10470.  
  10471. Return value
  10472.  
  10473.    none
  10474.  
  10475. Restrictions
  10476.  
  10477.    none
  10478.  
  10479. See also
  10480.  
  10481.    fg_restore, fg_savew, fg_sethpage, fg_transfer
  10482.  
  10483. Examples
  10484.  
  10485.    11-2, 11-3
  10486.  
  10487.  
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.  
  10499.                                      173
  10500. fg_savew
  10501.  
  10502. Prototype
  10503.  
  10504.    void fg_savew (double xmin, double xmax, double ymin, double ymax);
  10505.    sub FGsavew (xmin#, xmax#, ymin#, ymax#)
  10506.    subroutine fg_savew (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  10507.    procedure fg_savew (xmin, xmax, ymin, ymax : real);
  10508.  
  10509. Description
  10510.  
  10511.    The fg_savew routine copies a rectangular region, defined in world space,
  10512.    from the active video page to the same position on the hidden video page.
  10513.  
  10514. Parameters
  10515.  
  10516.    xmin is the world space x coordinate of the region's left edge.  In
  10517.    graphics modes, its value is reduced to a byte boundary if necessary.
  10518.  
  10519.    xmax is the world space x coordinate of the region's right edge.  It must
  10520.    be greater than or equal to the value of xmin.  In graphics modes, its
  10521.    value is extended to a byte boundary if necessary.
  10522.  
  10523.    ymin is the world space y coordinate of the region's bottom edge.
  10524.  
  10525.    ymax is the world space y coordinate of the region's top edge.  It must be
  10526.    greater than or equal to the value of ymin.
  10527.  
  10528. Return value
  10529.  
  10530.    none
  10531.  
  10532. Restrictions
  10533.  
  10534.    This routine is not available in Fastgraph/Light.
  10535.  
  10536. See also
  10537.  
  10538.    fg_restorew, fg_save, fg_sethpage, fg_transfer
  10539.  
  10540.  
  10541.  
  10542.  
  10543.  
  10544.  
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.  
  10557.  
  10558.                                      174
  10559. fg_scrlock
  10560.  
  10561. Prototype
  10562.  
  10563.    int fg_scrlock (void);
  10564.    function FGscrlock% ()
  10565.    i*2 function fg_scrlock ()
  10566.    function fg_scrlock : integer;
  10567.  
  10568. Description
  10569.  
  10570.    The fg_scrlock routine determines the state of the ScrollLock key.
  10571.  
  10572. Parameters
  10573.  
  10574.    none
  10575.  
  10576. Return value
  10577.  
  10578.    If the return value is 0, it means the ScrollLock key is off.  If it is 1,
  10579.    it means the ScrollLock key is on.
  10580.  
  10581. Restrictions
  10582.  
  10583.    Not all PC keyboards have a ScrollLock key.  For such systems, fg_scrlock
  10584.    will return a value of zero.
  10585.  
  10586. See also
  10587.  
  10588.    fg_capslock, fg_numlock, fg_setcaps, fg_setnum
  10589.  
  10590. Examples
  10591.  
  10592.    14-3
  10593.  
  10594.  
  10595.  
  10596.  
  10597.  
  10598.  
  10599.  
  10600.  
  10601.  
  10602.  
  10603.  
  10604.  
  10605.  
  10606.  
  10607.  
  10608.  
  10609.  
  10610.  
  10611.  
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.                                      175
  10618. fg_scroll
  10619.  
  10620. Prototype
  10621.  
  10622.    void fg_scroll (int minx, int maxx, int miny, int maxy, int jump,
  10623.      int type);
  10624.    sub FGscroll (minx%, maxx%, miny%, maxy%, jump%, type%)
  10625.    subroutine fg_scroll (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*2 jump,
  10626.      i*2 type)
  10627.    procedure fg_scroll (minx, maxx, miny, maxy, jump, type : integer);
  10628.  
  10629. Description
  10630.  
  10631.    The fg_scroll routine vertically scrolls a region of the active video page.
  10632.    The scrolling may be done either up or down, using either an end-off or
  10633.    circular method.  In text modes, the region is defined in character space;
  10634.    in graphics modes, it is defined in screen space.
  10635.  
  10636. Parameters
  10637.  
  10638.    minx is the x coordinate of the scrolling region's left edge.  In graphics
  10639.    modes, its value is reduced to a byte boundary if necessary.
  10640.  
  10641.    maxx is the x coordinate of the scrolling region's right edge.  It must be
  10642.    greater than or equal to the value of minx.  In graphics modes, its value
  10643.    is extended to a byte boundary if necessary.
  10644.  
  10645.    miny is the y coordinate of the scrolling region's top edge.
  10646.  
  10647.    maxy is the y coordinate of the scrolling region's bottom edge.  It must be
  10648.    greater than or equal to the value of miny.
  10649.  
  10650.    jump is the number of pixels to jump between each scrolling iteration.  If
  10651.    jump is negative, the region will scroll toward the top of the screen.  If
  10652.    jump is positive, the region will scroll toward the bottom of the screen.
  10653.  
  10654.    type specifies the type of scroll.  If type is zero, rows that scroll off
  10655.    one edge appear at the opposite edge, thus producing a circular scrolling
  10656.    effect.  If type is any other value, rows that scroll off one edge will be
  10657.    replaced at the opposite edge by lines of the current color.
  10658.  
  10659. Return value
  10660.  
  10661.    none
  10662.  
  10663. Restrictions
  10664.  
  10665.    Circular scrolling uses part of the hidden page (as defined in the most
  10666.    recent call to fg_sethpage) as a temporary workspace.
  10667.  
  10668. See also
  10669.  
  10670.    fg_setcolor, fg_sethpage
  10671.  
  10672. Examples
  10673.  
  10674.    13-3, 13-4, 13-5
  10675.  
  10676.                                      176
  10677. fg_setangle
  10678.  
  10679. Prototype
  10680.  
  10681.    void fg_setangle (double angle);
  10682.    sub FGsetangle (angle#)
  10683.    subroutine fg_setangle (r*8 angle)
  10684.    procedure fg_setangle (angle : real);
  10685.  
  10686. Description
  10687.  
  10688.    The fg_setangle routine defines the angle or orientation at which software
  10689.    characters are displayed.  If a program draws software characters before
  10690.    calling fg_setangle, Fastgraph will use its default angle of zero degrees
  10691.    (that is, horizontal).
  10692.  
  10693. Parameters
  10694.  
  10695.    angle is the angle of rotation, expressed in degrees and measured
  10696.    counterclockwise from the positive x axis.
  10697.  
  10698. Return value
  10699.  
  10700.    none
  10701.  
  10702. Restrictions
  10703.  
  10704.    This routine is not available in Fastgraph/Light.  Before using this
  10705.    routine, you must use the fg_initw and fg_setworld routines to establish a
  10706.    world space coordinate system.
  10707.  
  10708. See also
  10709.  
  10710.    fg_initw, fg_setratio, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  10711.    fg_swlength, fg_swtext
  10712.  
  10713. Examples
  10714.  
  10715.    7-12
  10716.  
  10717.  
  10718.  
  10719.  
  10720.  
  10721.  
  10722.  
  10723.  
  10724.  
  10725.  
  10726.  
  10727.  
  10728.  
  10729.  
  10730.  
  10731.  
  10732.  
  10733.  
  10734.  
  10735.                                      177
  10736. fg_setattr
  10737.  
  10738. Prototype
  10739.  
  10740.    void fg_setattr (int foreground, int background, int blink);
  10741.    sub FGsetattr (foreground%, background%, blink%)
  10742.    subroutine fg_setattr (i*2 foreground, i*2 background, i*2 blink)
  10743.    procedure fg_setattr (foreground, background, blink : integer);
  10744.  
  10745. Description
  10746.  
  10747.    The fg_setattr routine establishes the current text attribute in text video
  10748.    modes.
  10749.  
  10750. Parameters
  10751.  
  10752.    foreground is attribute's foreground component, between 0 and 15.
  10753.  
  10754.    background is the attribute's background component, between 0 and 7.
  10755.  
  10756.    blink is the attribute's blink component, between 0 and 1.
  10757.  
  10758. Return value
  10759.  
  10760.    none
  10761.  
  10762. Restrictions
  10763.  
  10764.    This routine has no effect in graphics video modes.
  10765.  
  10766. See also
  10767.  
  10768.    fg_setcolor
  10769.  
  10770. Examples
  10771.  
  10772.    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
  10773.  
  10774.  
  10775.  
  10776.  
  10777.  
  10778.  
  10779.  
  10780.  
  10781.  
  10782.  
  10783.  
  10784.  
  10785.  
  10786.  
  10787.  
  10788.  
  10789.  
  10790.  
  10791.  
  10792.  
  10793.  
  10794.                                      178
  10795. fg_setcaps
  10796.  
  10797. Prototype
  10798.  
  10799.    void fg_setcaps (int state);
  10800.    sub FGsetcaps (state%)
  10801.    subroutine fg_setcaps (i*2 state)
  10802.    procedure fg_setcaps (state : integer);
  10803.  
  10804. Description
  10805.  
  10806.    The fg_setcaps routine controls the state of the CapsLock key.
  10807.  
  10808. Parameters
  10809.  
  10810.    state defines the CapsLock key state.  If state is 0, the CapsLock key is
  10811.    turned off.  If it is 1, the CapsLock key is turned on.
  10812.  
  10813. Return value
  10814.  
  10815.    none
  10816.  
  10817. Restrictions
  10818.  
  10819.    On most keyboards, changing the CapsLock key state will also change the
  10820.    keyboard state light to reflect the new key state.  However, some older
  10821.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  10822.    update the state light.  This makes the state light inconsistent with the
  10823.    true key state.
  10824.  
  10825. See also
  10826.  
  10827.    fg_capslock, fg_numlock, fg_scrlock, fg_setnum
  10828.  
  10829. Examples
  10830.  
  10831.    14-4
  10832.  
  10833.  
  10834.  
  10835.  
  10836.  
  10837.  
  10838.  
  10839.  
  10840.  
  10841.  
  10842.  
  10843.  
  10844.  
  10845.  
  10846.  
  10847.  
  10848.  
  10849.  
  10850.  
  10851.  
  10852.  
  10853.                                      179
  10854. fg_setclip
  10855.  
  10856. Prototype
  10857.  
  10858.    void fg_setclip (int minx, int maxx, int miny, int maxy);
  10859.    sub FGsetclip (minx%, maxx%, miny%, maxy%)
  10860.    subroutine fg_setclip (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  10861.    procedure fg_setclip (minx, maxx, miny, maxy : integer);
  10862.  
  10863. Description
  10864.  
  10865.    The fg_setclip routine defines the clipping region in screen space.  The
  10866.    clipping region is a rectangular area outside of which graphics are
  10867.    suppressed.
  10868.  
  10869. Parameters
  10870.  
  10871.    minx is the screen space x coordinate of the clipping region's left edge.
  10872.  
  10873.    maxx is the screen space x coordinate of the clipping region's right edge.
  10874.    It must be greater than or equal to the value of minx.
  10875.  
  10876.    miny is the screen space y coordinate of the clipping region's top edge.
  10877.  
  10878.    maxy is the screen space y coordinate of the clipping region's bottom edge.
  10879.    It must be greater than or equal to the value of miny.
  10880.  
  10881. Return value
  10882.  
  10883.    none
  10884.  
  10885. Restrictions
  10886.  
  10887.    This routine has no effect in text video modes.
  10888.  
  10889. See also
  10890.  
  10891.    fg_setclipw
  10892.  
  10893. Examples
  10894.  
  10895.    6-5, 6-8, 10-8, 10-9, 10-17, 12-4
  10896.  
  10897.  
  10898.  
  10899.  
  10900.  
  10901.  
  10902.  
  10903.  
  10904.  
  10905.  
  10906.  
  10907.  
  10908.  
  10909.  
  10910.  
  10911.  
  10912.                                      180
  10913. fg_setclipw
  10914.  
  10915. Prototype
  10916.  
  10917.    void fg_setclipw (double xmin, double xmax, double ymin, double ymax);
  10918.    sub FGsetclipw (xmin#, xmax#, ymin#, ymax#)
  10919.    subroutine fg_setclipw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  10920.    procedure fg_setclipw (xmin, xmax, ymin, ymax : real);
  10921.  
  10922. Description
  10923.  
  10924.    The fg_setclipw routine defines the clipping region in world space.  The
  10925.    clipping region is a rectangular area outside of which graphics are
  10926.    suppressed.
  10927.  
  10928. Parameters
  10929.  
  10930.    xmin is the world space x coordinate of the clipping region's left edge.
  10931.  
  10932.    xmax is the world space x coordinate of the clipping region's right edge.
  10933.    It must be greater than or equal to the value of xmin.
  10934.  
  10935.    ymin is the world space y coordinate of the clipping region's bottom edge.
  10936.  
  10937.    ymax is the world space y coordinate of the clipping region's top edge.  It
  10938.    must be greater than or equal to the value of ymin.
  10939.  
  10940. Return value
  10941.  
  10942.    none
  10943.  
  10944. Restrictions
  10945.  
  10946.    This routine is not available in Fastgraph/Light and has no effect in text
  10947.    video modes.
  10948.  
  10949. See also
  10950.  
  10951.    fg_setclip
  10952.  
  10953.  
  10954.  
  10955.  
  10956.  
  10957.  
  10958.  
  10959.  
  10960.  
  10961.  
  10962.  
  10963.  
  10964.  
  10965.  
  10966.  
  10967.  
  10968.  
  10969.  
  10970.  
  10971.                                      181
  10972. fg_setcolor
  10973.  
  10974. Prototype
  10975.  
  10976.    void fg_setcolor (int color);
  10977.    sub FGsetcolor (color%)
  10978.    subroutine fg_setcolor (i*2 color)
  10979.    procedure fg_setcolor (color : integer);
  10980.  
  10981. Description
  10982.  
  10983.    The fg_setcolor routine establishes the current color index (which may be a
  10984.    virtual color index) in graphics modes.  In text modes, fg_setcolor
  10985.    provides an alternate method of defining the current text attribute.
  10986.  
  10987. Parameters
  10988.  
  10989.    color defines the current color index (in graphics modes) or text attribute
  10990.    (in text modes).  Its value must be between 0 and 255.
  10991.  
  10992. Return value
  10993.  
  10994.    none
  10995.  
  10996. Restrictions
  10997.  
  10998.    none
  10999.  
  11000. See also
  11001.  
  11002.    fg_defcolor, fg_getcolor, fg_setattr
  11003.  
  11004. Examples
  11005.  
  11006.    3-1 to 3-8, 3-10
  11007.  
  11008.  
  11009.  
  11010.  
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.  
  11019.  
  11020.  
  11021.  
  11022.  
  11023.  
  11024.  
  11025.  
  11026.  
  11027.  
  11028.  
  11029.  
  11030.                                      182
  11031. fg_setdacs
  11032.  
  11033. Prototype
  11034.  
  11035.    void fg_setdacs (int start, int count, char *values);
  11036.    sub FGsetdacs (start%, count%, values$)
  11037.    subroutine fg_setdacs (i*2 start, i*2 count, i*1 values)
  11038.    procedure fg_setdacs (start, count : integer; var values : shortint);
  11039.  
  11040. Description
  11041.  
  11042.    The fg_setdacs routine defines the values of a block of contiguous video
  11043.    DAC registers by specifying their red, green, and blue color components.
  11044.    Defining many DAC registers with fg_setdacs is considerably faster than
  11045.    doing so individually with fg_setrgb.
  11046.  
  11047. Parameters
  11048.  
  11049.    start is the starting video DAC register number, between 0 and 255.
  11050.  
  11051.    count is the number of contiguous DAC registers to define, between 1 and
  11052.    256.  If the sum of start and count exceeds 255, the register numbers wrap
  11053.    around and resume with register number 0.
  11054.  
  11055.    values is the array containing the color components.  The first three bytes
  11056.    of this array must contain the red, green, and blue components for DAC
  11057.    register start, the next three bytes contain the components for register
  11058.    start+1, and so forth.  The size of the values array must be at least
  11059.    3*count bytes.
  11060.  
  11061. Return value
  11062.  
  11063.    none
  11064.  
  11065. Restrictions
  11066.  
  11067.    This routine has no effect in text modes, or in CGA, Tandy, and Hercules
  11068.    graphics modes.  In modes 13 to 16, it is meaningful only when run on a VGA
  11069.    or SVGA system; its results are unpredictable in these modes when run on an
  11070.    EGA.  You can use fg_testmode(18,0) to check for a VGA or SVGA system.
  11071.  
  11072. See also
  11073.  
  11074.    fg_getdacs, fg_getrgb, fg_setrgb
  11075.  
  11076. Examples
  11077.  
  11078.    5-12
  11079.  
  11080.  
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.  
  11087.  
  11088.  
  11089.                                      183
  11090. fg_setentry
  11091.  
  11092. Prototype
  11093.  
  11094.    void fg_setentry (int page_number, int page_addr, int page_type);
  11095.    sub FGsetentry (page_number%, page_addr%, page_type%)
  11096.    subroutine fg_setentry (i*2 page_number, i*2 page_addr, i*2 page_type)
  11097.    procedure fg_setentry (page_number, page_addr, page_type : integer);
  11098.  
  11099. Description
  11100.  
  11101.    The fg_setentry routine specifies the type and address of a physical,
  11102.    virtual, or logical video page.  For logical pages, it further specifies if
  11103.    the page resides in conventional, expanded, or extended memory.  This
  11104.    routine is useful for saving virtual or logical page contents across video
  11105.    mode changes, or for manual creation of virtual and logical pages.
  11106.  
  11107. Parameters
  11108.  
  11109.    page_number is the number of the video page being defined.  It must be
  11110.    between 0 and 63.
  11111.  
  11112.    page_addr is the address of the specified page.  For physical pages,
  11113.    virtual pages, and logical pages in conventional memory, the address is an
  11114.    ordinary segment address.  For logical pages in EMS or XMS memory, the page
  11115.    address is an EMS or XMS handle.
  11116.  
  11117.    page_type is a code indicating the page type.  See the description of the
  11118.    fg_getentry routine for valid page type values.
  11119.  
  11120. Return value
  11121.  
  11122.    none
  11123.  
  11124. Restrictions
  11125.  
  11126.    none
  11127.  
  11128. See also
  11129.  
  11130.    fg_getentry
  11131.  
  11132. Examples
  11133.  
  11134.    8-11, 8-12
  11135.  
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.                                      184
  11149. fg_setfunc
  11150.  
  11151. Prototype
  11152.  
  11153.    void fg_setfunc (int mode);
  11154.    sub FGsetfunc (mode%)
  11155.    subroutine fg_setfunc (i*2 mode)
  11156.    procedure fg_setfunc (mode : integer);
  11157.  
  11158. Description
  11159.  
  11160.    The fg_setfunc routine specifies the logical operation applied when video
  11161.    memory changes in 16-color EGA/VGA/SVGA graphics modes.  Replacement mode
  11162.    is selected after you use the fg_setmode routine to establish a video mode.
  11163.  
  11164. Parameters
  11165.  
  11166.    mode defines the logical operation, as shown below.
  11167.  
  11168.                      value of        logical
  11169.                        mode         operation
  11170.  
  11171.                          0         replacement
  11172.                          1             and
  11173.                          2             or
  11174.                          3        exclusive or
  11175.  
  11176. Return value
  11177.  
  11178.    none
  11179.  
  11180. Restrictions
  11181.  
  11182.    This routine only functions in 16-color EGA/VGA/SVGA graphics video modes
  11183.    (modes 13 through 18, 28, and 29).
  11184.  
  11185. Examples
  11186.  
  11187.    12-3, 17-2
  11188.  
  11189.  
  11190.  
  11191.  
  11192.  
  11193.  
  11194.  
  11195.  
  11196.  
  11197.  
  11198.  
  11199.  
  11200.  
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.                                      185
  11208. fg_sethpage
  11209.  
  11210. Prototype
  11211.  
  11212.    void fg_sethpage (int page_number);
  11213.    sub FGsethpage (page_number%)
  11214.    subroutine fg_sethpage (i*2 page_number)
  11215.    procedure fg_sethpage (page_number : integer);
  11216.  
  11217. Description
  11218.  
  11219.    The fg_sethpage routine establishes the hidden video page.  It may be a
  11220.    physical or virtual video page.  The fg_setmode routine designates video
  11221.    page 0 as the hidden page.
  11222.  
  11223. Parameters
  11224.  
  11225.    page_number is the hidden video page number, between 0 and 63.
  11226.  
  11227. Return value
  11228.  
  11229.    none
  11230.  
  11231. Restrictions
  11232.  
  11233.    This routine has no effect if page_number references a physical video page
  11234.    that does not exist, or a virtual video page that has not been created.
  11235.  
  11236. See also
  11237.  
  11238.    fg_gethpage, fg_setpage, fg_setvpage
  11239.  
  11240. Examples
  11241.  
  11242.    11-2, 11-3, 13-2, 13-5
  11243.  
  11244.  
  11245.  
  11246.  
  11247.  
  11248.  
  11249.  
  11250.  
  11251.  
  11252.  
  11253.  
  11254.  
  11255.  
  11256.  
  11257.  
  11258.  
  11259.  
  11260.  
  11261.  
  11262.  
  11263.  
  11264.  
  11265.  
  11266.                                      186
  11267. fg_setlines
  11268.  
  11269. Prototype
  11270.  
  11271.    void fg_setlines (int lines);
  11272.    sub FGsetlines (lines%)
  11273.    subroutine fg_setlines (i*2 lines)
  11274.    procedure fg_setlines (lines : integer);
  11275.  
  11276. Description
  11277.  
  11278.    The fg_setlines routine extends an 80-column text mode to 25, 43, or 50
  11279.    lines per screen.  The fg_setmode routine sets the number of lines to 25
  11280.    when establishing an 80-column text mode.
  11281.  
  11282. Parameters
  11283.  
  11284.    lines is the number of text rows per screen.  On EGA systems, the value of
  11285.    lines must be 25 or 43.  On MCGA systems, it must be 25 or 50.  On VGA and
  11286.    SVGA systems, it must be 25, 43, or 50.  Any other value is ignored.
  11287.    Before calling fg_setlines, you should call fg_testmode with pages=0 to see
  11288.    if the user's system supports the number of rows needed.
  11289.  
  11290. Return value
  11291.  
  11292.    none
  11293.  
  11294. Restrictions
  11295.  
  11296.    This routine is only meaningful when running in 80-column text modes on
  11297.    EGA, MCGA, VGA, or SVGA systems (in other cases it does nothing).
  11298.  
  11299.    When you call fg_setlines, the visual page must be page 0.
  11300.  
  11301.    Calling fg_setlines makes the text cursor visible.
  11302.  
  11303.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  11304.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  11305.    fg_initxms), you should re-initialize these resources after calling
  11306.    fg_setlines.
  11307.  
  11308. See also
  11309.  
  11310.    fg_getlines, fg_testmode
  11311.  
  11312. Examples
  11313.  
  11314.    3-5
  11315.  
  11316.  
  11317.  
  11318.  
  11319.  
  11320.  
  11321.  
  11322.  
  11323.  
  11324.  
  11325.                                      187
  11326. fg_setmode
  11327.  
  11328. Prototype
  11329.  
  11330.    void fg_setmode (int mode_number);
  11331.    sub FGsetmode (mode_number%)
  11332.    subroutine fg_setmode (i*2 mode_number)
  11333.    procedure fg_setmode (mode_number : integer);
  11334.  
  11335. Description
  11336.  
  11337.    The fg_setmode routine establishes a video mode and initializes Fastgraph's
  11338.    internal parameters for that mode.  It must be called before any Fastgraph
  11339.    routine that performs video output.  A program can call fg_setmode as many
  11340.    times as needed to switch between different video modes.
  11341.  
  11342. Parameters
  11343.  
  11344.    mode_number is the video mode number, between 0 and 29, as shown below.
  11345.  
  11346. Mode                     No. of    Supported                Supported
  11347. No.  Type Resolution     Colors    Adapters                 Displays
  11348.  
  11349.  0   T    40 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11350.  1   T    40 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11351.  2   T    80 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11352.  3   T    80 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11353.  4   G    320 x 200      4         CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11354.  5   G    320 x 200      4         CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11355.  6   G    640 x 200      2/16      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11356.  7   T    80 x 25        b/w       MDA,HGC,EGA,VGA,SVGA     Monochrome
  11357.  9   G    320 x 200      16        Tandy 1000,PCjr          RGB
  11358. 11   G    720 x 348      b/w       HGC                      Monochrome
  11359. 12   G    320 x 200      b/w       HGC                      Monochrome
  11360. 13   G    320 x 200      16        EGA,VGA,SVGA             RGB,ECD,VGA,SVGA
  11361. 14   G    640 x 200      16        EGA,VGA,SVGA             RGB,ECD,VGA,SVGA
  11362. 15   G    640 x 350      b/w       EGA,VGA,SVGA             Mono,VGA,SVGA
  11363. 16   G    640 x 350      16/64     EGA,VGA,SVGA             ECD,VGA,SVGA
  11364. 17   G    640 x 480      2/256K    VGA,MCGA,SVGA            VGA,SVGA
  11365. 18   G    640 x 480      16/256K   VGA,SVGA                 VGA,SVGA
  11366. 19   G    320 x 200      256/256K  VGA,MCGA,SVGA            VGA,SVGA
  11367. 20   G    320 x 200      256/256K  VGA,SVGA                 VGA,SVGA
  11368. 21   G    320 x 400      256/256K  VGA,SVGA                 VGA,SVGA
  11369. 22   G    320 x 240      256/256K  VGA,SVGA                 VGA,SVGA
  11370. 23   G    320 x 480      256/256K  VGA,SVGA                 VGA,SVGA
  11371. 24   G    640 x 400      256/256K  SVGA                     SVGA
  11372. 25   G    640 x 480      256/256K  SVGA                     SVGA
  11373. 26   G    800 x 600      256/256K  SVGA                     SVGA
  11374. 27   G    1024 x 768     256/256K  SVGA                     SVGA
  11375. 28   G    800 x 600      16/256K   SVGA                     SVGA
  11376. 29   G    1024 x 768     16/256K   SVGA                     SVGA
  11377.  
  11378.    For more information about each video mode, including their required
  11379.    display adapters (graphics cards) and monitors, please refer to the
  11380.    Fastgraph User's Guide.
  11381.  
  11382.  
  11383.  
  11384.                                      188
  11385. fg_setmode (continued)
  11386.  
  11387. Parameters (continued)
  11388.  
  11389.    The value of the mode_number parameter also can be -1, which tells
  11390.    Fastgraph to use the current video mode.  This feature is often useful in
  11391.    programs that use only text video modes, programs executed from another
  11392.    program, or terminate and stay resident (TSR) programs.
  11393.  
  11394. Return value
  11395.  
  11396.    none
  11397.  
  11398. Restrictions
  11399.  
  11400.    The fg_setmode routine does not check if the specified video mode is
  11401.    available on the user's system.  If necessary, you should first use the
  11402.    fg_testmode routine to do this.
  11403.  
  11404.    SVGA graphics modes (24 to 29) are only available after successfully
  11405.    initializing the SVGA kernel with fg_svgainit.
  11406.  
  11407. See also
  11408.  
  11409.    fg_automode, fg_bestmode, fg_svgainit, fg_testmode
  11410.  
  11411. Examples
  11412.  
  11413.    3-1 to 3-8, 3-10
  11414.  
  11415.  
  11416.  
  11417.  
  11418.  
  11419.  
  11420.  
  11421.  
  11422.  
  11423.  
  11424.  
  11425.  
  11426.  
  11427.  
  11428.  
  11429.  
  11430.  
  11431.  
  11432.  
  11433.  
  11434.  
  11435.  
  11436.  
  11437.  
  11438.  
  11439.  
  11440.  
  11441.  
  11442.  
  11443.                                      189
  11444. fg_setnum
  11445.  
  11446. Prototype
  11447.  
  11448.    void fg_setnum (int state);
  11449.    sub FGsetnum (state%)
  11450.    subroutine fg_setnum (i*2 state)
  11451.    procedure fg_setnum (state : integer);
  11452.  
  11453. Description
  11454.  
  11455.    The fg_setnum routine controls the state of the NumLock key.
  11456.  
  11457. Parameters
  11458.  
  11459.    state defines the NumLock key state.  If state is 0, the NumLock key is
  11460.    turned off.  If it is 1, the NumLock key is turned on.
  11461.  
  11462. Return value
  11463.  
  11464.    none
  11465.  
  11466. Restrictions
  11467.  
  11468.    On most keyboards, changing the NumLock key state will also change the
  11469.    keyboard state light to reflect the new key state.  However, some older
  11470.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  11471.    update the state light.  This makes the state light inconsistent with the
  11472.    true key state.
  11473.  
  11474. See also
  11475.  
  11476.    fg_capslock, fg_numlock, fg_scrlock, fg_setcaps
  11477.  
  11478. Examples
  11479.  
  11480.    14-4
  11481.  
  11482.  
  11483.  
  11484.  
  11485.  
  11486.  
  11487.  
  11488.  
  11489.  
  11490.  
  11491.  
  11492.  
  11493.  
  11494.  
  11495.  
  11496.  
  11497.  
  11498.  
  11499.  
  11500.  
  11501.  
  11502.                                      190
  11503. fg_setpage
  11504.  
  11505. Prototype
  11506.  
  11507.    void fg_setpage (int page_number);
  11508.    sub FGsetpage (page_number%)
  11509.    subroutine fg_setpage (i*2 page_number)
  11510.    procedure fg_setpage (page_number : integer);
  11511.  
  11512. Description
  11513.  
  11514.    The fg_setpage routine establishes the active video page.  It may be a
  11515.    physical or virtual video page.  The fg_setmode routine designates video
  11516.    page 0 as the active page.
  11517.  
  11518. Parameters
  11519.  
  11520.    page_number is the active video page number, between 0 and 63.
  11521.  
  11522. Return value
  11523.  
  11524.    none
  11525.  
  11526. Restrictions
  11527.  
  11528.    This routine has no effect if page_number references a physical video page
  11529.    that does not exist, or a virtual video page that has not been created.
  11530.  
  11531. See also
  11532.  
  11533.    fg_getpage, fg_sethpage, fg_setvpage
  11534.  
  11535. Examples
  11536.  
  11537.    8-1 to 8-8, 8-12, 12-4, 12-5, 12-6, 13-2
  11538.  
  11539.  
  11540.  
  11541.  
  11542.  
  11543.  
  11544.  
  11545.  
  11546.  
  11547.  
  11548.  
  11549.  
  11550.  
  11551.  
  11552.  
  11553.  
  11554.  
  11555.  
  11556.  
  11557.  
  11558.  
  11559.  
  11560.  
  11561.                                      191
  11562. fg_setratio
  11563.  
  11564. Prototype
  11565.  
  11566.    void fg_setratio (double ratio);
  11567.    sub FGsetratio (ratio#)
  11568.    subroutine fg_setratio (r*8 ratio)
  11569.    procedure fg_setratio (ratio : real);
  11570.  
  11571. Description
  11572.  
  11573.    The fg_setratio routine defines the aspect ratio for software characters.
  11574.    The aspect ratio is the ratio of character width to character height.  If a
  11575.    program draws software characters before calling fg_setratio, Fastgraph
  11576.    will use its default aspect ratio of 1.
  11577.  
  11578. Parameters
  11579.  
  11580.    ratio is the aspect ratio.  It must be greater than zero.
  11581.  
  11582. Return value
  11583.  
  11584.    none
  11585.  
  11586. Restrictions
  11587.  
  11588.    This routine is not available in Fastgraph/Light.  Before using this
  11589.    routine, you must use the fg_initw and fg_setworld routines to establish a
  11590.    world space coordinate system.
  11591.  
  11592. See also
  11593.  
  11594.    fg_initw, fg_setangle, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  11595.    fg_swlength, fg_swtext
  11596.  
  11597. Examples
  11598.  
  11599.    7-11
  11600.  
  11601.  
  11602.  
  11603.  
  11604.  
  11605.  
  11606.  
  11607.  
  11608.  
  11609.  
  11610.  
  11611.  
  11612.  
  11613.  
  11614.  
  11615.  
  11616.  
  11617.  
  11618.  
  11619.  
  11620.                                      192
  11621. fg_setrgb
  11622.  
  11623. Prototype
  11624.  
  11625.    void fg_setrgb (int number, int red, int green, int blue);
  11626.    sub FGsetrgb (number%, red%, green%, blue%)
  11627.    subroutine fg_setrgb (i*2 number, i*2 red, i*2 green, i*2 blue)
  11628.    procedure fg_setrgb (number, red, green, blue : integer);
  11629.  
  11630. Description
  11631.  
  11632.    The fg_setrgb defines the value of a palette register (in Tandy/PCjr and
  11633.    EGA graphics modes) or video DAC register (in VGA, MCGA, XVGA, and SVGA
  11634.    graphics modes) by specifying its red, green, and blue color components.
  11635.  
  11636. Parameters
  11637.  
  11638.    number is the palette or video DAC register number.  If it references a
  11639.    palette register, it must be between 0 and 15 (0 and 1 in mode 17).  If it
  11640.    references a video DAC register, it must be between 0 and 255.  The value
  11641.    of number may be negative to specify an intense color for that palette
  11642.    register in Tandy/PCjr and 200-line EGA graphics modes.
  11643.  
  11644.    red, green, and blue respectively specify the red, green, and blue
  11645.    components of the specified palette or video DAC register.  These values
  11646.    must be 0 or 1 for Tandy/PCjr and 200-line EGA graphics modes, between 0
  11647.    and 3 for 350-line EGA modes, and between 0 and 63 for VGA, MCGA, XVGA, and
  11648.    SVGA modes.
  11649.  
  11650. Return value
  11651.  
  11652.    none
  11653.  
  11654. Restrictions
  11655.  
  11656.    This routine has no effect in text video modes, CGA graphics modes, or
  11657.    Hercules graphics modes.
  11658.  
  11659. See also
  11660.  
  11661.    fg_getrgb, fg_palette, fg_setcolor, fg_setdacs
  11662.  
  11663. Examples
  11664.  
  11665.    5-9, 5-11, 5-13, 5-16, 9-6
  11666.  
  11667.  
  11668.  
  11669.  
  11670.  
  11671.  
  11672.  
  11673.  
  11674.  
  11675.  
  11676.  
  11677.  
  11678.  
  11679.                                      193
  11680. fg_setsize
  11681.  
  11682. Prototype
  11683.  
  11684.    void fg_setsize (int isize);
  11685.    sub FGsetsize (isize%)
  11686.    subroutine fg_setsize (i*2 isize)
  11687.    procedure fg_setsize (isize : integer);
  11688.  
  11689. Description
  11690.  
  11691.    The fg_setsize routine defines the height of software characters in screen
  11692.    space units.  If neither fg_setsize nor fg_setsizew is called, Fastgraph
  11693.    will use its default character height of one world space unit.
  11694.  
  11695. Parameters
  11696.  
  11697.    isize is the character height in screen space units.
  11698.  
  11699. Return value
  11700.  
  11701.    none
  11702.  
  11703. Restrictions
  11704.  
  11705.    This routine is not available in Fastgraph/Light.  Before using this
  11706.    routine, you must use the fg_initw and fg_setworld routines to establish a
  11707.    world space coordinate system.
  11708.  
  11709. See also
  11710.  
  11711.    fg_initw, fg_setangle, fg_setratio, fg_setsizew, fg_setworld, fg_swchar,
  11712.    fg_swlength, fg_swtext
  11713.  
  11714.  
  11715.  
  11716.  
  11717.  
  11718.  
  11719.  
  11720.  
  11721.  
  11722.  
  11723.  
  11724.  
  11725.  
  11726.  
  11727.  
  11728.  
  11729.  
  11730.  
  11731.  
  11732.  
  11733.  
  11734.  
  11735.  
  11736.  
  11737.  
  11738.                                      194
  11739. fg_setsizew
  11740.  
  11741. Prototype
  11742.  
  11743.    void fg_setsizew (double size);
  11744.    sub FGsetsizew (size#)
  11745.    subroutine fg_setsizew (r*8 size)
  11746.    procedure fg_setsizew (size : real);
  11747.  
  11748. Description
  11749.  
  11750.    The fg_setsizew routine defines the height of software characters in world
  11751.    space units.  If neither fg_setsize nor fg_setsizew is called, Fastgraph
  11752.    will use its default character height of one world space unit.
  11753.  
  11754. Parameters
  11755.  
  11756.    size is the character height in world space units.
  11757.  
  11758. Return value
  11759.  
  11760.    none
  11761.  
  11762. Restrictions
  11763.  
  11764.    This routine is not available in Fastgraph/Light.  Before using this
  11765.    routine, you must use the fg_initw and fg_setworld routines to establish a
  11766.    world space coordinate system.
  11767.  
  11768. See also
  11769.  
  11770.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setworld, fg_swchar,
  11771.    fg_swlength, fg_swtext
  11772.  
  11773. Examples
  11774.  
  11775.    7-10, 7-11, 7-12, 7-13
  11776.  
  11777.  
  11778.  
  11779.  
  11780.  
  11781.  
  11782.  
  11783.  
  11784.  
  11785.  
  11786.  
  11787.  
  11788.  
  11789.  
  11790.  
  11791.  
  11792.  
  11793.  
  11794.  
  11795.  
  11796.  
  11797.                                      195
  11798. fg_setvpage
  11799.  
  11800. Prototype
  11801.  
  11802.    void fg_setvpage (int page_number);
  11803.    sub FGsetvpage (page_number%)
  11804.    subroutine fg_setvpage (i*2 page_number)
  11805.    procedure fg_setvpage (page_number : integer);
  11806.  
  11807. Description
  11808.  
  11809.    The fg_setvpage routine establishes the visual video page.  It may be a
  11810.    physical or virtual video page, but not a logical page.  The fg_setmode
  11811.    routine designates video page 0 as the visual page.
  11812.  
  11813. Parameters
  11814.  
  11815.    page_number is the visual video page number, between 0 and 63.
  11816.  
  11817. Return value
  11818.  
  11819.    none
  11820.  
  11821. Restrictions
  11822.  
  11823.    This routine has no effect if page_number references a physical video page
  11824.    that does not exist, or a virtual video page that has not been created.
  11825.  
  11826. See also
  11827.  
  11828.    fg_getpage, fg_sethpage, fg_setpage
  11829.  
  11830. Examples
  11831.  
  11832.    8-1 to 8-7, 12-6
  11833.  
  11834.  
  11835.  
  11836.  
  11837.  
  11838.  
  11839.  
  11840.  
  11841.  
  11842.  
  11843.  
  11844.  
  11845.  
  11846.  
  11847.  
  11848.  
  11849.  
  11850.  
  11851.  
  11852.  
  11853.  
  11854.  
  11855.  
  11856.                                      196
  11857. fg_setworld
  11858.  
  11859. Prototype
  11860.  
  11861.    void fg_setworld (double xmin, double xmax, double ymin, double ymax);
  11862.    sub FGsetworld (xmin#, xmax#, ymin#, ymax#)
  11863.    subroutine fg_setworld (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  11864.    procedure fg_setworld (xmin, xmax, ymin, ymax : real);
  11865.  
  11866. Description
  11867.  
  11868.    The fg_setworld routine defines the world space coordinates that correspond
  11869.    to the physical edges of the screen.
  11870.  
  11871. Parameters
  11872.  
  11873.    xmin is the world space coordinate of the screen's left edge.
  11874.  
  11875.    xmax is the world space coordinate of the screen's right edge.  It must be
  11876.    greater than the value of xmin.
  11877.  
  11878.    ymin is the world space coordinate of the screen's top edge.
  11879.  
  11880.    ymax is the world space coordinate of the screen's bottom edge.  It must be
  11881.    greater than the value of ymin.
  11882.  
  11883. Return value
  11884.  
  11885.    none
  11886.  
  11887. Restrictions
  11888.  
  11889.    This routine is not available in Fastgraph/Light.  Before using this
  11890.    routine, you must call the fg_initw routine to initialize Fastgraph's world
  11891.    space parameters.
  11892.  
  11893. See also
  11894.  
  11895.    fg_getworld, fg_initw
  11896.  
  11897. Examples
  11898.  
  11899.    4-3, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  11900.  
  11901.  
  11902.  
  11903.  
  11904.  
  11905.  
  11906.  
  11907.  
  11908.  
  11909.  
  11910.  
  11911.  
  11912.  
  11913.  
  11914.  
  11915.                                      197
  11916. fg_showgif
  11917.  
  11918. Prototype
  11919.  
  11920.    int fg_showgif (char *filename, int flags);
  11921.    function FGshowgif% (filename$, flags%)
  11922.    i*2 function fg_showgif (c*(*) filename, i*2 flags)
  11923.    function fg_showgif (filename : string; flags : integer) : integer;
  11924.  
  11925. Description
  11926.  
  11927.    The fg_showgif routine displays an image stored in a GIF file.  By default,
  11928.    the image will be positioned so that its upper left corner is at the
  11929.    graphics cursor position of the active video page.
  11930.  
  11931. Parameters
  11932.  
  11933.    filename specifies the name of the GIF file.  A device and path name may be
  11934.    included as part of the file name.  The file name must be terminated by a
  11935.    zero byte.
  11936.  
  11937.    flags is a bit mask that controls how the image is displayed.
  11938.      Bit 0
  11939.         0 = use palette values stored in the GIF file
  11940.         1 = use the current palette settings
  11941.      Bit 1
  11942.         0 = display image at position indicated in GIF header
  11943.         1 = display image at current graphics position
  11944.      Bits 2-15 are reserved for future use and should be zero.
  11945.  
  11946. Return value
  11947.  
  11948.    0 = success
  11949.    1 = file not found
  11950.    2 = file is not a GIF file
  11951.  
  11952. Restrictions
  11953.  
  11954.    This routine has no effect in text video modes, or the CGA and Hercules
  11955.    graphics modes.
  11956.  
  11957.    When displaying a 256-color GIF in a 16-color graphics mode, fg_showgif
  11958.    displays pixels of color c in color c mod 16.
  11959.  
  11960. See also
  11961.  
  11962.    fg_imagebuf, fg_makegif, fg_showpcx, fg_showppr, fg_showspr
  11963.  
  11964. Examples
  11965.  
  11966.    9-3
  11967.  
  11968.  
  11969.  
  11970.  
  11971.  
  11972.  
  11973.  
  11974.                                      198
  11975. fg_showpcx
  11976.  
  11977. Prototype
  11978.  
  11979.    int fg_showpcx (char *filename, int flags);
  11980.    function FGshowpcx% (filename$, flags%)
  11981.    i*2 function fg_showpcx (c*(*) filename, i*2 flags)
  11982.    function fg_showpcx (filename : string; flags : integer) : integer;
  11983.  
  11984. Description
  11985.  
  11986.    The fg_showpcx routine displays an image stored in a PCX file.  By default,
  11987.    the image will be positioned so that its upper left corner is at the
  11988.    graphics cursor position of the active video page.
  11989.  
  11990. Parameters
  11991.  
  11992.    filename is the name of the PCX file.  A device and path name may be
  11993.    included as part of the file name.  The file name must be terminated by a
  11994.    null character (that is, a zero byte).
  11995.  
  11996.    flags is a bit mask that controls how the image is displayed.
  11997.      Bit 0
  11998.         0 = use palette values stored in the PCX file
  11999.         1 = use the current palette settings
  12000.      Bit 1
  12001.         0 = display image at position indicated in PCX header
  12002.         1 = display image at current graphics position
  12003.      Bits 2-15 are reserved for future use and should be zero.
  12004.  
  12005. Return value
  12006.  
  12007.    0 = success
  12008.    1 = file not found
  12009.    2 = file is not a PCX file
  12010.  
  12011. Restrictions
  12012.  
  12013.    PCX files are specific to certain video modes.  The following table
  12014.    summarizes the compatible video modes for PCX files.
  12015.  
  12016.                     If PCX file was     You can display
  12017.                     created in mode     it in these modes
  12018.  
  12019.                     4, 5                4, 5
  12020.                     6, 11               6, 11, 13-18, 28, 29
  12021.                     9                   9
  12022.                     13-18               13-18, 28, 29
  12023.                     19-27               19-27
  12024.                     28-29               13-18, 28, 29
  12025.  
  12026.    Displaying a PCX file at a lower resolution (for example, a 640x480 PCX
  12027.    file at 320x200) will truncate the display on the right and on the bottom.
  12028.    This effectively displays the upper left corner of the PCX file.  If you
  12029.    attempt to display a PCX file in an incompatible video mode, fg_showpcx
  12030.    will still display something, but it will be garbled.
  12031.  
  12032.  
  12033.                                      199
  12034. fg_showpcx (continued)
  12035.  
  12036. Restrictions (continued)
  12037.  
  12038.    The fg_showpcx routine has no effect in text video modes or in the Hercules
  12039.    low-resolution graphics mode.
  12040.  
  12041. See also
  12042.  
  12043.    fg_imagebuf, fg_makepcx, fg_showgif, fg_showppr, fg_showspr
  12044.  
  12045. Examples
  12046.  
  12047.    9-1, 9-7
  12048.  
  12049.  
  12050.  
  12051.  
  12052.  
  12053.  
  12054.  
  12055.  
  12056.  
  12057.  
  12058.  
  12059.  
  12060.  
  12061.  
  12062.  
  12063.  
  12064.  
  12065.  
  12066.  
  12067.  
  12068.  
  12069.  
  12070.  
  12071.  
  12072.  
  12073.  
  12074.  
  12075.  
  12076.  
  12077.  
  12078.  
  12079.  
  12080.  
  12081.  
  12082.  
  12083.  
  12084.  
  12085.  
  12086.  
  12087.  
  12088.  
  12089.  
  12090.  
  12091.  
  12092.                                      200
  12093. fg_showppr
  12094.  
  12095. Prototype
  12096.  
  12097.    int fg_showppr (char *filename, int width);
  12098.    function FGshowppr% (filename$, width%)
  12099.    i*2 function fg_showppr (c*(*) filename, i*2 width)
  12100.    function fg_showppr (filename : string; width : integer) : integer;
  12101.  
  12102. Description
  12103.  
  12104.    The fg_showppr routine displays an image stored in a packed pixel run (PPR)
  12105.    file.  The image will be positioned so that its lower left corner is at the
  12106.    graphics cursor position on the active video page.
  12107.  
  12108. Parameters
  12109.  
  12110.    filename specifies the name of the PPR file.  A device and path name may be
  12111.    included as part of the file name.  The file name must be terminated by a
  12112.    zero byte.
  12113.  
  12114.    width is the width of the image in pixels.  It must be greater than zero.
  12115.  
  12116. Return value
  12117.  
  12118.    0 = success
  12119.    1 = file not found
  12120.  
  12121. Restrictions
  12122.  
  12123.    This routine has no effect in text video modes or in 256-color graphics
  12124.    modes.
  12125.  
  12126. See also
  12127.  
  12128.    fg_dispfile, fg_imagebuf, fg_makeppr, fg_pattern, fg_showgif, fg_showpcx,
  12129.    fg_showspr
  12130.  
  12131. Examples
  12132.  
  12133.    9-6
  12134.  
  12135.  
  12136.  
  12137.  
  12138.  
  12139.  
  12140.  
  12141.  
  12142.  
  12143.  
  12144.  
  12145.  
  12146.  
  12147.  
  12148.  
  12149.  
  12150.  
  12151.                                      201
  12152. fg_showspr
  12153.  
  12154. Prototype
  12155.  
  12156.    int fg_showspr (char *filename, int width);
  12157.    function FGshowspr% (filename$, width%)
  12158.    i*2 function fg_showspr (c*(*) filename, i*2 width)
  12159.    function fg_showspr (filename : string; width : integer) : integer;
  12160.  
  12161. Description
  12162.  
  12163.    The fg_showspr routine displays an image stored in a standard pixel run
  12164.    (SPR) file.  The image will be positioned so that its lower left corner is
  12165.    at the graphics cursor position on the active video page.
  12166.  
  12167. Parameters
  12168.  
  12169.    filename specifies the name of the SPR file.  A device and path name may be
  12170.    included as part of the file name.  The file name must be terminated by a
  12171.    zero byte.
  12172.  
  12173.    width is the width of the image in pixels.  It must be greater than zero.
  12174.  
  12175. Return value
  12176.  
  12177.    0 = success
  12178.    1 = file not found
  12179.  
  12180. Restrictions
  12181.  
  12182.    This routine has no effect in text video modes.
  12183.  
  12184. See also
  12185.  
  12186.    fg_dispfile, fg_imagebuf, fg_makespr, fg_pattern, fg_showgif, fg_showpcx,
  12187.    fg_showppr
  12188.  
  12189. Examples
  12190.  
  12191.    9-4
  12192.  
  12193.  
  12194.  
  12195.  
  12196.  
  12197.  
  12198.  
  12199.  
  12200.  
  12201.  
  12202.  
  12203.  
  12204.  
  12205.  
  12206.  
  12207.  
  12208.  
  12209.  
  12210.                                      202
  12211. fg_sound
  12212.  
  12213. Prototype
  12214.  
  12215.    void fg_sound (int frequency, int duration);
  12216.    sub FGsound (frequency%, duration%)
  12217.    subroutine fg_sound (i*2 frequency, i*2 duration)
  12218.    procedure fg_sound (frequency, duration : integer);
  12219.  
  12220. Description
  12221.  
  12222.    The fg_sound routine produces a tone of a specified frequency and duration
  12223.    using the programmable timer.
  12224.  
  12225. Parameters
  12226.  
  12227.    frequency is tone's frequency in Hertz, between 18 and 32,767.
  12228.  
  12229.    duration is the tone's length in clock ticks (there are approximately 18.2
  12230.    clock ticks per second).  If duration is zero or negative, the tone is said
  12231.    to be continuous and will play until you stop it with the fg_quiet routine.
  12232.  
  12233. Return value
  12234.  
  12235.    none
  12236.  
  12237. Restrictions
  12238.  
  12239.    This routine has no effect if there is asynchronous sound already in
  12240.    progress.
  12241.  
  12242. See also
  12243.  
  12244.    fg_music, fg_quiet, fg_sounds, fg_voice
  12245.  
  12246. Examples
  12247.  
  12248.    15-1
  12249.  
  12250.  
  12251.  
  12252.  
  12253.  
  12254.  
  12255.  
  12256.  
  12257.  
  12258.  
  12259.  
  12260.  
  12261.  
  12262.  
  12263.  
  12264.  
  12265.  
  12266.  
  12267.  
  12268.  
  12269.                                      203
  12270. fg_sounds
  12271.  
  12272. Prototype
  12273.  
  12274.    void fg_sounds (int *sound_array, int ntimes);
  12275.    sub FGsounds (sound_array%(), ntimes%)
  12276.    subroutine fg_sounds (i*2 sound_array, i*2 ntimes)
  12277.    procedure fg_sounds (var sound_array : integer; ntimes : integer);
  12278.  
  12279. Description
  12280.  
  12281.    The fg_sounds routine uses the programmable timer to play a series of tones
  12282.    of specified frequencies and durations, concurrent with other activity.  It
  12283.    is the asynchronous version of the fg_sound routine.
  12284.  
  12285. Parameters
  12286.  
  12287.    sound_array is an arbitrary-length array containing a series of
  12288.    (frequency,duration) sound definitions.  The format of this array is:
  12289.  
  12290.  
  12291.                           [0]    frequency of sound 1
  12292.  
  12293.                           [1]    duration  of sound 1
  12294.  
  12295.                           [2]    frequency of sound 2
  12296.  
  12297.                           [3]    duration  of sound 2
  12298.                                           .
  12299.                                           .
  12300.                                           .
  12301.                                           .
  12302.                                           .
  12303.                        [2n-2]    frequency of sound n
  12304.  
  12305.                        [2n-1]    duration  of sound n
  12306.  
  12307.                          [2n]       terminator (0)
  12308.  
  12309.  
  12310.    Each frequency value is measured in Hertz and must be between 18 and
  12311.    32,767.  The durations are measured in clock ticks (there are approximately
  12312.    72.8 clock ticks per second).  A null character (that is, a zero byte)
  12313.    terminates the array.
  12314.  
  12315.    ntimes specifies the number of times to cycle through the sounds defined in
  12316.    sound_array.  If ntimes is negative, the sounds will play repetitively
  12317.    until stopped with the fg_hush or fg_hushnext routine.
  12318.  
  12319. Return value
  12320.  
  12321.    none
  12322.  
  12323.  
  12324.  
  12325.  
  12326.  
  12327.  
  12328.                                      204
  12329. fg_sounds (continued)
  12330.  
  12331. Restrictions
  12332.  
  12333.    This routine has no effect if there is asynchronous sound already in
  12334.    progress.  To expand the range of sound effects, Fastgraph temporarily
  12335.    quadruples the clock tick interrupt rate from 18.2 to 72.8 ticks per second
  12336.    while producing asynchronous sound.  Because many disk controllers rely on
  12337.    the 18.2 tick per second clock rate to synchronize disk accesses, your
  12338.    programs should not perform any disk operations when asynchronous sound is
  12339.    in progress.
  12340.  
  12341. See also
  12342.  
  12343.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sound, fg_voice, fg_voices
  12344.  
  12345. Examples
  12346.  
  12347.    15-4
  12348.  
  12349.  
  12350.  
  12351.  
  12352.  
  12353.  
  12354.  
  12355.  
  12356.  
  12357.  
  12358.  
  12359.  
  12360.  
  12361.  
  12362.  
  12363.  
  12364.  
  12365.  
  12366.  
  12367.  
  12368.  
  12369.  
  12370.  
  12371.  
  12372.  
  12373.  
  12374.  
  12375.  
  12376.  
  12377.  
  12378.  
  12379.  
  12380.  
  12381.  
  12382.  
  12383.  
  12384.  
  12385.  
  12386.  
  12387.                                      205
  12388. fg_stall
  12389.  
  12390. Prototype
  12391.  
  12392.    void fg_stall (int delay);
  12393.    sub FGstall (delay%)
  12394.    subroutine fg_stall (i*2 delay)
  12395.    procedure fg_stall (delay : integer);
  12396.  
  12397. Description
  12398.  
  12399.    The fg_stall routine delays a program's execution for a given number of
  12400.    processor-specific delay units.  You can use the fg_measure routine to
  12401.    obtain the number of delay units per clock tick for the system being used.
  12402.  
  12403. Parameters
  12404.  
  12405.    delay is the number of delay units to wait.
  12406.  
  12407. Return value
  12408.  
  12409.    none
  12410.  
  12411. Restrictions
  12412.  
  12413.    none
  12414.  
  12415. See also
  12416.  
  12417.    fg_measure, fg_waitfor
  12418.  
  12419. Examples
  12420.  
  12421.    16-3
  12422.  
  12423.  
  12424.  
  12425.  
  12426.  
  12427.  
  12428.  
  12429.  
  12430.  
  12431.  
  12432.  
  12433.  
  12434.  
  12435.  
  12436.  
  12437.  
  12438.  
  12439.  
  12440.  
  12441.  
  12442.  
  12443.  
  12444.  
  12445.  
  12446.                                      206
  12447. fg_suspend
  12448.  
  12449. Prototype
  12450.  
  12451.    void fg_suspend (void);
  12452.    sub FGsuspend ()
  12453.    subroutine fg_suspend ()
  12454.    procedure fg_suspend;
  12455.  
  12456. Description
  12457.  
  12458.    The fg_suspend routine suspends asynchronous music previously started by
  12459.    the fg_musicb routine.  It has no effect if there is no asynchronous music
  12460.    in progress.
  12461.  
  12462. Parameters
  12463.  
  12464.    none
  12465.  
  12466. Return value
  12467.  
  12468.    none
  12469.  
  12470. Restrictions
  12471.  
  12472.    A program must not exit to DOS with music suspended.  You must call fg_hush
  12473.    to cancel the music first.
  12474.  
  12475. See also
  12476.  
  12477.    fg_hush, fg_musicb, fg_resume
  12478.  
  12479. Examples
  12480.  
  12481.    15-8
  12482.  
  12483.  
  12484.  
  12485.  
  12486.  
  12487.  
  12488.  
  12489.  
  12490.  
  12491.  
  12492.  
  12493.  
  12494.  
  12495.  
  12496.  
  12497.  
  12498.  
  12499.  
  12500.  
  12501.  
  12502.  
  12503.  
  12504.  
  12505.                                      207
  12506. fg_svgainit
  12507.  
  12508. Prototype
  12509.  
  12510.    int fg_svgainit (int method);
  12511.    function FGsvgainit% (method%)
  12512.    i*2 function fg_svgainit (i*2 method)
  12513.    function fg_svgainit (method : integer) : integer;
  12514.  
  12515. Description
  12516.  
  12517.    The fg_svgainit routine initializes Fastgraph's SVGA kernel.  It must be
  12518.    called before establishing an SVGA graphics mode (modes 24 to 29) with
  12519.    fg_setmode, before testing SVGA video mode availability with fg_bestmode or
  12520.    fg_testmode, or before calling fg_memory.
  12521.  
  12522. Parameters
  12523.  
  12524.    method specifies how to initialize the SVGA kernel.  If method is 0, the
  12525.    SVGA kernel performs a chipset autodetect, giving chipset-specific code
  12526.    precedence over the VESA BIOS.  If method is 1, the SVGA kernel also
  12527.    performs an autodetect but gives the VESA BIOS precedence over chipset-
  12528.    specific code.  If method is 2 or more, the SVGA kernel is initialized for
  12529.    a specific chipset (without testing for presence of that chipset).  Refer
  12530.    to Chapter 3 of the Fastgraph User's Guide for a list of supported
  12531.    chipsets.
  12532.  
  12533. Return value
  12534.  
  12535.    For autodetect requests (method = 0 or 1), fg_svgainit returns a value
  12536.    between 1 and 22 corresponding to the SVGA chipset found.  A value of 1
  12537.    means a VESA BIOS will be used.  A value between 2 and 22 means a specific
  12538.    SVGA chipset will be used.  If no VESA BIOS or supported SVGA chipset is
  12539.    found, fg_svgainit returns zero.
  12540.  
  12541.    For specific chipsets, fg_svgainit returns the chipset value passed to it.
  12542.    No checks are made to see if that chipset is actually present.
  12543.  
  12544. Restrictions
  12545.  
  12546.    none
  12547.  
  12548. See also
  12549.  
  12550.    fg_setmode, fg_svgastat
  12551.  
  12552. Examples
  12553.  
  12554.    3-9, 3-10
  12555.  
  12556.  
  12557.  
  12558.  
  12559.  
  12560.  
  12561.  
  12562.  
  12563.  
  12564.                                      208
  12565.  
  12566. fg_svgastat
  12567.  
  12568. Prototype
  12569.  
  12570.    int fg_svgastat (void);
  12571.    function FGsvgastat% ()
  12572.    i*2 function fg_svgastat ()
  12573.    function fg_svgastat : integer;
  12574.  
  12575. Description
  12576.  
  12577.    Return information about the active SVGA chipset.
  12578.  
  12579. Parameters
  12580.  
  12581.    none
  12582.  
  12583. Return value
  12584.  
  12585.    A 16-bit mask containing information about the active SVGA chipset.
  12586.      Bit 0
  12587.         0 = SVGA kernel not initialized (all bits will be 0 in this case)
  12588.         1 = SVGA kernel initialized
  12589.      Bit 1
  12590.         0 = VESA support disabled
  12591.         1 = VESA support enabled
  12592.      Bit 2
  12593.         0 = Extended video pages are not available in modes 13-23
  12594.         1 = Extended video pages are available in these modes
  12595.      Bit 3
  12596.         0 = SVGA chipset uses one bank for reading and writing
  12597.         1 = SVGA chipset has separate read and write banks
  12598.      Bits 4-15 are reserved for future use and are all zero.
  12599.  
  12600. Restrictions
  12601.  
  12602.    none
  12603.  
  12604. See also
  12605.  
  12606.    fg_svgainit
  12607.  
  12608.  
  12609.  
  12610.  
  12611.  
  12612.  
  12613.  
  12614.  
  12615.  
  12616.  
  12617.  
  12618.  
  12619.  
  12620.  
  12621.  
  12622.  
  12623.                                      209
  12624. fg_svgaver
  12625.  
  12626. Prototype
  12627.  
  12628.    void fg_svgaver (int *major, int *minor);
  12629.    sub FGsvgaver (major%, minor%)
  12630.    subroutine fg_svgaver (i*2 major, i*2 minor)
  12631.    procedure fg_svgaver (var major, minor : integer);
  12632.  
  12633. Description
  12634.  
  12635.    The fg_svgaver routine returns the major and minor version numbers for
  12636.    Fastgraph's SVGA kernel.
  12637.  
  12638. Parameters
  12639.  
  12640.    major receives the SVGA kernel major version number.
  12641.  
  12642.    minor receives the SVGA kernel minor version number, expressed in
  12643.    hundredths.
  12644.  
  12645.  
  12646. Return value
  12647.  
  12648.    none
  12649.  
  12650. Restrictions
  12651.  
  12652.    none
  12653.  
  12654. See also
  12655.  
  12656.    fg_svgainit, fg_version
  12657.  
  12658. Examples
  12659.  
  12660.    3-9
  12661.  
  12662.  
  12663.  
  12664.  
  12665.  
  12666.  
  12667.  
  12668.  
  12669.  
  12670.  
  12671.  
  12672.  
  12673.  
  12674.  
  12675.  
  12676.  
  12677.  
  12678.  
  12679.  
  12680.  
  12681.  
  12682.                                      210
  12683. fg_swchar
  12684.  
  12685. Prototype
  12686.  
  12687.    void fg_swchar (char *string, int n, int justify);
  12688.    sub FGswchar (string$, n%, justify%)
  12689.    subroutine fg_swchar (c*(*) string, i*2 n, i*2 justify)
  12690.    procedure fg_swchar (string : string; n, justify : integer);
  12691.  
  12692. Description
  12693.  
  12694.    The fg_swchar routine displays a string of software characters in the
  12695.    current color index.  The string may be left justified, centered, or right
  12696.    justified relative to the graphics cursor.
  12697. Parameters
  12698.  
  12699.    string is the arbitrary-length sequence of characters to display.  It may
  12700.    contain special operators, as summarized in the following table.
  12701.  
  12702.                 operator      meaning
  12703.  
  12704.                     \         switch to other font
  12705.                    \^         superscript the next character
  12706.                    \v         subscript the next character
  12707.                     _         begin underlining characters until another
  12708.                               underscore character is encountered
  12709.  
  12710.    n is the number of characters in string, including any special operator
  12711.    characters.
  12712.  
  12713.    justify determines how string is positioned relative to the current
  12714.    position.  If justify is negative, string is left justified; if it is zero,
  12715.    string is centered; if it is positive, string is right justified.
  12716.  
  12717. Return value
  12718.  
  12719.    none
  12720.  
  12721. Restrictions
  12722.  
  12723.    Before using this routine, you must use the fg_initw and fg_setworld
  12724.    routines to establish a world space coordinate system.  This routine is not
  12725.    available in Fastgraph/Light and has no effect in text video modes.
  12726.  
  12727. See also
  12728.  
  12729.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  12730.    fg_swlength, fg_swtext
  12731.  
  12732. Examples
  12733.  
  12734.    7-10, 7-11
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.                                      211
  12742. fg_swlength
  12743.  
  12744. Prototype
  12745.  
  12746.    double fg_swlength (char *string, int n);
  12747.    function FGswlength# (string$, n%)
  12748.    r*8 function fg_swlength (c*(*) string, i*2 n)
  12749.    function fg_swlength (string : string; n : integer) : real;
  12750.  
  12751. Description
  12752.  
  12753.    The fg_swlength routine computes the length of a string of software
  12754.    characters.
  12755.  
  12756. Parameters
  12757.  
  12758.    string is the arbitrary-length sequence of characters for which to compute
  12759.    the length.  It may contain special operators used by the fg_swchar and
  12760.    fg_swtext routines.
  12761.  
  12762.    n is the number of characters in string, including any special operator
  12763.    characters.
  12764.  
  12765. Return value
  12766.  
  12767.    The length of string, in world space units.
  12768.  
  12769. Restrictions
  12770.  
  12771.    Before using this routine, you must use the fg_initw and fg_setworld
  12772.    routines to establish a world space coordinate system.  This routine is not
  12773.    available in Fastgraph/Light and has no effect in text video modes.
  12774.  
  12775. See also
  12776.  
  12777.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  12778.    fg_swchar, fg_swtext
  12779.  
  12780. Examples
  12781.  
  12782.    7-13
  12783.  
  12784.  
  12785.  
  12786.  
  12787.  
  12788.  
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800.                                      212
  12801. fg_swtext
  12802.  
  12803. Prototype
  12804.  
  12805.    void fg_swtext (char *string, int n, int justify);
  12806.    sub FGswtext (string$, n%, justify%)
  12807.    subroutine fg_swtext (c*(*) string, i*2 n, i*2 justify)
  12808.    procedure fg_swtext (string : string; n, justify : integer);
  12809.  
  12810. Description
  12811.  
  12812.    The fg_swtext routine is a scaled down version of the fg_swchar routine.
  12813.    It does not include the alternate font character definitions and thus
  12814.    requires less memory than fg_swchar.
  12815.  
  12816. Parameters
  12817.  
  12818.    string is the arbitrary-length sequence of characters to display.  It may
  12819.    contain special operators, as summarized in the following table.
  12820.  
  12821.                 operator      meaning
  12822.  
  12823.                    \^         superscript the next character
  12824.                    \v         subscript the next character
  12825.                     _         begin underlining characters until another
  12826.                               underscore character is encountered
  12827.  
  12828.    n is the number of characters in string, including any special operator
  12829.    characters.
  12830.  
  12831.    justify determines how string is positioned relative to the current
  12832.    position.  If justify is negative, string is left justified; if it is zero,
  12833.    string is centered; if it is positive, string is right justified.
  12834.  
  12835. Return value
  12836.  
  12837.    none
  12838.  
  12839. Restrictions
  12840.  
  12841.    Before using this routine, you must use the fg_initw and fg_setworld
  12842.    routines to establish a world space coordinate system.  This routine is not
  12843.    available in Fastgraph/Light and has no effect in text video modes.
  12844.  
  12845. See also
  12846.  
  12847.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  12848.    fg_swchar, fg_swlength
  12849.  
  12850. Examples
  12851.  
  12852.    7-12, 7-13
  12853.  
  12854.  
  12855.  
  12856.  
  12857.  
  12858.  
  12859.                                      213
  12860. fg_tcdefine
  12861.  
  12862. Prototype
  12863.  
  12864.    void fg_tcdefine (int index, int attribute);
  12865.    sub FGtcdefine (index%, attribute%)
  12866.    subroutine fg_tcdefine (i*2 index, i*2 attribute)
  12867.    procedure fg_tcdefine (index, attribute : integer);
  12868.  
  12869. Description
  12870.  
  12871.    The fg_tcdefine routine defines the transparency attribute of a color index
  12872.    for use with the fg_tcxfer routine.
  12873.  
  12874. Parameters
  12875.  
  12876.    index is the color index being defined (between 0 and 255).
  12877.  
  12878.    attribute is the transparency attribute for the color index.  If the
  12879.    attribute is 0, the specified color will be opaque (non-transparent).  If
  12880.    it is any other value, fg_tcxfer will treat the color as transparent.
  12881.  
  12882. Return value
  12883.  
  12884.    none
  12885.  
  12886. Restrictions
  12887.  
  12888.    This routine has no effect in text video modes.
  12889.  
  12890. See also
  12891.  
  12892.    fg_tcmask, fg_tcxfer
  12893.  
  12894.  
  12895.  
  12896.  
  12897.  
  12898.  
  12899.  
  12900.  
  12901.  
  12902.  
  12903.  
  12904.  
  12905.  
  12906.  
  12907.  
  12908.  
  12909.  
  12910.  
  12911.  
  12912.  
  12913.  
  12914.  
  12915.  
  12916.  
  12917.  
  12918.                                      214
  12919. fg_tcmask
  12920.  
  12921. Prototype
  12922.  
  12923.    void fg_tcmask (int mask);
  12924.    sub FGtcmask (mask%)
  12925.    subroutine fg_tcmask (i*2 mask)
  12926.    procedure fg_tcmask (mask : integer);
  12927.  
  12928. Description
  12929.  
  12930.    The fg_tcmask routine defines which of the first 16 color values the
  12931.    fg_tcxfer routine will consider transparent.  Use the fg_tcdefine routine
  12932.    to control the transparency of colors 17 to 255 in the 256-color graphics
  12933.    modes.
  12934.  
  12935. Parameters
  12936.  
  12937.    mask is a 16-bit mask, where each bit indicates whether or not the
  12938.    corresponding color value is transparent.  For example, if bit 0 (the
  12939.    rightmost bit) is 1, then color 0 will be transparent.  If bit 0 is 0,
  12940.    color 0 will not be transparent.
  12941.  
  12942. Return value
  12943.  
  12944.    none
  12945.  
  12946. Restrictions
  12947.  
  12948.    This routine has no effect in text video modes.
  12949.  
  12950. See also
  12951.  
  12952.    fg_tcdefine, fg_tcxfer
  12953.  
  12954. Examples
  12955.  
  12956.    11-7
  12957.  
  12958.  
  12959.  
  12960.  
  12961.  
  12962.  
  12963.  
  12964.  
  12965.  
  12966.  
  12967.  
  12968.  
  12969.  
  12970.  
  12971.  
  12972.  
  12973.  
  12974.  
  12975.  
  12976.  
  12977.                                      215
  12978. fg_tcxfer
  12979.  
  12980. Prototype
  12981.  
  12982.    void fg_tcxfer (int minx, int maxx, int miny, int maxy, int newx, int newy,
  12983.      int source_page, int dest_page);
  12984.    sub FGtcxfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  12985.      dest_page%)
  12986.    subroutine fg_tcxfer (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*2 newx,
  12987.      i*2 newy, i*2 source_page, i*2 dest_page);
  12988.    procedure fg_tcxfer (minx, maxx, miny, maxy, newx, newy, source_page,
  12989.      dest_page : integer);
  12990.  
  12991. Description
  12992.  
  12993.    The fg_tcxfer routine copies a rectangular region from any position on any
  12994.    video page to any position on any video page, excluding any pixels whose
  12995.    color is transparent.  The transparent colors are defined by the fg_tcmask
  12996.    routine.
  12997.  
  12998. Parameters
  12999.  
  13000.    minx is the x coordinate of the source region's left edge.  Its value is
  13001.    reduced to a byte boundary if necessary.
  13002.  
  13003.    maxx is the x coordinate of the source region's right edge.  It must be
  13004.    greater than or equal to the value of minx.  Its value is extended to a
  13005.    byte boundary if necessary.
  13006.  
  13007.    miny is the y coordinate of the source region's top edge.
  13008.  
  13009.    maxy is the y coordinate of the source region's bottom edge.  It must be
  13010.    greater than or equal to the value of miny.
  13011.  
  13012.    newx is the x coordinate of the destination region's left edge.  Its value
  13013.    is reduced to a byte boundary if necessary.
  13014.  
  13015.    newy is the y coordinate of the destination region's bottom edge.
  13016.  
  13017.    source_page is the video page number containing the source region.
  13018.  
  13019.    dest_page is the video page number for the destination region.
  13020.  
  13021. Return value
  13022.  
  13023.    none
  13024.  
  13025. Restrictions
  13026.  
  13027.    If source_page and dest_page reference the same video page, the source
  13028.    region and destination region must not overlap.  This routine has no effect
  13029.    in text video modes.
  13030.  
  13031. See also
  13032.  
  13033.    fg_tcdefine, fg_tcmask, fg_transfer
  13034.  
  13035.  
  13036.                                      216
  13037. fg_tcxfer (continued)
  13038.  
  13039. Examples
  13040.  
  13041.    11-7
  13042.  
  13043.  
  13044.  
  13045.  
  13046.  
  13047.  
  13048.  
  13049.  
  13050.  
  13051.  
  13052.  
  13053.  
  13054.  
  13055.  
  13056.  
  13057.  
  13058.  
  13059.  
  13060.  
  13061.  
  13062.  
  13063.  
  13064.  
  13065.  
  13066.  
  13067.  
  13068.  
  13069.  
  13070.  
  13071.  
  13072.  
  13073.  
  13074.  
  13075.  
  13076.  
  13077.  
  13078.  
  13079.  
  13080.  
  13081.  
  13082.  
  13083.  
  13084.  
  13085.  
  13086.  
  13087.  
  13088.  
  13089.  
  13090.  
  13091.  
  13092.  
  13093.  
  13094.  
  13095.                                      217
  13096. fg_testmode
  13097.  
  13098. Prototype
  13099.  
  13100.    int fg_testmode (int mode, int pages);
  13101.    function FGtestmode% (mode%, pages%)
  13102.    i*2 function fg_testmode (i*2 mode, i*2 pages)
  13103.    function fg_testmode (mode, pages : integer) : integer;
  13104.  
  13105. Description
  13106.  
  13107.    The fg_testmode routine determines whether or not a specified video mode is
  13108.    available on the user's system.  Additionally, fg_testmode can check if
  13109.    there is enough video memory (for physical pages) or random-access memory
  13110.    (for virtual pages) to support the number of video pages needed.
  13111.  
  13112. Parameters
  13113.  
  13114.    mode is the video mode number to test, between 0 and 29.  Refer to the
  13115.    description of the fg_setmode routine for a list of available video modes.
  13116.  
  13117.    pages is the number of video pages required (either physical pages, virtual
  13118.    pages, or both).  If the pages parameter is zero or negative, fg_testmode
  13119.    checks for availability of the video mode but does not consider video
  13120.    memory requirements.
  13121.  
  13122. Return value
  13123.  
  13124.    If the requested video mode is available (with the requested number of
  13125.    video pages), fg_testmode returns 1.  If not, it returns 0.
  13126.  
  13127. Restrictions
  13128.  
  13129.    SVGA graphics modes are available only after successfully initializing the
  13130.    SVGA kernel with fg_svgainit.
  13131.  
  13132. See also
  13133.  
  13134.    fg_automode, fg_bestmode, fg_setmode, fg_svgainit
  13135.  
  13136. Examples
  13137.  
  13138.    3-3, 3-5, 3-8, 3-10, 5-16, 6-7, 6-8
  13139.  
  13140.  
  13141.  
  13142.  
  13143.  
  13144.  
  13145.  
  13146.  
  13147.  
  13148.  
  13149.  
  13150.  
  13151.  
  13152.  
  13153.  
  13154.                                      218
  13155. fg_text
  13156.  
  13157. Prototype
  13158.  
  13159.    void fg_text (char *string, int n);
  13160.    sub FGtext (string$, n%)
  13161.    subroutine fg_text (c*(*) string, i*2 n)
  13162.    procedure fg_text (string : string; n : integer);
  13163.  
  13164. Description
  13165.  
  13166.    The fg_text routine displays a string of hardware characters, starting at
  13167.    the text cursor position, using the current text attribute (for text modes)
  13168.    or color index (for graphics modes).  This routine leaves the text cursor
  13169.    one column to the right of the last character changed (or the first column
  13170.    of the next row if the last character is at the end of a row).
  13171.  
  13172. Parameters
  13173.  
  13174.    string is the arbitrary-length sequence of characters to display.
  13175.  
  13176.    n is the number of characters to display from string.
  13177.  
  13178. Return value
  13179.  
  13180.    none
  13181.  
  13182. Restrictions
  13183.  
  13184.    none
  13185.  
  13186. See also
  13187.  
  13188.    fg_locate, fg_print, fg_setattr
  13189.  
  13190. Examples
  13191.  
  13192.    7-1, 7-2, 7-3, 7-4, 7-5, 7-7, 7-8, 7-9, 7-10
  13193.  
  13194.  
  13195.  
  13196.  
  13197.  
  13198.  
  13199.  
  13200.  
  13201.  
  13202.  
  13203.  
  13204.  
  13205.  
  13206.  
  13207.  
  13208.  
  13209.  
  13210.  
  13211.  
  13212.  
  13213.                                      219
  13214. fg_transfer
  13215.  
  13216. Prototype
  13217.  
  13218.    void fg_transfer (int minx, int maxx, int miny, int maxy, int newx,
  13219.      int newy, int source_page, int dest_page);
  13220.    sub FGtransfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  13221.      dest_page%)
  13222.    subroutine fg_transfer (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*2 newx,
  13223.      i*2 newy, i*2 source_page, i*2 dest_page);
  13224.    procedure fg_transfer (minx, maxx, miny, maxy, newx, newy, source_page,
  13225.      dest_page : integer);
  13226.  
  13227. Description
  13228.  
  13229.    The fg_transfer routine copies a rectangular region from any position on
  13230.    any video page to any position on any video page.  In text modes, the
  13231.    region is defined in character space; in graphics modes, it is defined in
  13232.    screen space.  It is Fastgraph's most general image transfer routine.
  13233.  
  13234. Parameters
  13235.  
  13236.    minx is the x coordinate of the source region's left edge.  In graphics
  13237.    modes, its value is reduced to a byte boundary if necessary.
  13238.  
  13239.    maxx is the x coordinate of the source region's right edge.  It must be
  13240.    greater than or equal to the value of minx.  In graphics modes, its value
  13241.    is extended to a byte boundary if necessary.
  13242.  
  13243.    miny is the y coordinate of the source region's top edge.
  13244.  
  13245.    maxy is the y coordinate of the source region's bottom edge.  It must be
  13246.    greater than or equal to the value of miny.
  13247.  
  13248.    newx is the x coordinate of the destination region's left edge.  Its value
  13249.    is reduced to a byte boundary if necessary.
  13250.  
  13251.    newy is the y coordinate of the destination region's bottom edge.
  13252.  
  13253.    source_page is the video page number containing the source region.
  13254.  
  13255.    dest_page is the video page number for the destination region.
  13256.  
  13257. Return value
  13258.  
  13259.    none
  13260.  
  13261. Restrictions
  13262.  
  13263.    If source_page and dest_page reference the same video page, the source
  13264.    region and destination region must not overlap.
  13265.  
  13266. See also
  13267.  
  13268.    fg_copypage, fg_restore, fg_save, fg_tcxfer
  13269.  
  13270.  
  13271.  
  13272.                                      220
  13273. fg_transfer (continued)
  13274.  
  13275. Examples
  13276.  
  13277.    11-4, 11-5, 11-6, 12-4, 12-5, 12-6
  13278.  
  13279.  
  13280.  
  13281.  
  13282.  
  13283.  
  13284.  
  13285.  
  13286.  
  13287.  
  13288.  
  13289.  
  13290.  
  13291.  
  13292.  
  13293.  
  13294.  
  13295.  
  13296.  
  13297.  
  13298.  
  13299.  
  13300.  
  13301.  
  13302.  
  13303.  
  13304.  
  13305.  
  13306.  
  13307.  
  13308.  
  13309.  
  13310.  
  13311.  
  13312.  
  13313.  
  13314.  
  13315.  
  13316.  
  13317.  
  13318.  
  13319.  
  13320.  
  13321.  
  13322.  
  13323.  
  13324.  
  13325.  
  13326.  
  13327.  
  13328.  
  13329.  
  13330.  
  13331.                                      221
  13332. fg_version
  13333.  
  13334. Prototype
  13335.  
  13336.    void fg_version (int *major, int *minor);
  13337.    sub FGversion (major%, minor%)
  13338.    subroutine fg_version (i*2 major, i*2 minor)
  13339.    procedure fg_version (var major, minor : integer);
  13340.  
  13341. Description
  13342.  
  13343.    The fg_version routine returns the major and minor version numbers for your
  13344.    copy of Fastgraph or Fastgraph/Light.  For example, if you are using
  13345.    Fastgraph version 2.10, the major version number is 2 and the minor version
  13346.    number is 10.
  13347.  
  13348. Parameters
  13349.  
  13350.    major receives the major version number.
  13351.  
  13352.    minor receives the minor version number, expressed in hundredths.
  13353.  
  13354. Return value
  13355.  
  13356.    none
  13357.  
  13358. Restrictions
  13359.  
  13360.    none
  13361.  
  13362. See also
  13363.  
  13364.    fg_svgaver
  13365.  
  13366. Examples
  13367.  
  13368.    1-1
  13369.  
  13370.  
  13371.  
  13372.  
  13373.  
  13374.  
  13375.  
  13376.  
  13377.  
  13378.  
  13379.  
  13380.  
  13381.  
  13382.  
  13383.  
  13384.  
  13385.  
  13386.  
  13387.  
  13388.  
  13389.  
  13390.                                      222
  13391. fg_voice
  13392.  
  13393. Prototype
  13394.  
  13395.    void fg_voice (int channel, int frequency, int volume, int duration);
  13396.    sub FGvoice (channel%, frequency%, volume%, duration%)
  13397.    subroutine fg_voice (i*2 channel, i*2 frequency, i*2 volume, i*2 duration)
  13398.    procedure fg_voice (channel, frequency, volume, duration : integer);
  13399.  
  13400. Description
  13401.  
  13402.    The fg_voice routine produces a tone of a specified frequency, duration,
  13403.    and volume using one of the TI sound chip's four independent voice
  13404.    channels.
  13405.  
  13406. Parameters
  13407.  
  13408.    channel defines the voice channel or type of noise, as shown below.
  13409.  
  13410.                        value  meaning
  13411.  
  13412.                          1    voice channel #1
  13413.                          2    voice channel #2
  13414.                          3    voice channel #3
  13415.                          4    voice channel #4, periodic noise
  13416.                          5    voice channel #4, white noise
  13417.  
  13418.    frequency defines the tone's frequency in Hertz.  If channel is 1, 2, or 3,
  13419.    then frequency represents the actual frequency, between 18 and 32,767.  If
  13420.    channel is 4 or 5, frequency is instead a value that represents a specific
  13421.    frequency, as shown below.
  13422.  
  13423.                             value   frequency
  13424.  
  13425.                               0     512 Hertz
  13426.                               1    1024 Hertz
  13427.                               2    2048 Hertz
  13428.  
  13429.    volume is the tone's volume, between 0 (silent) and 15 (loudest).
  13430.  
  13431.    duration is the tone's length in clock ticks (there are approximately 18.2
  13432.    clock ticks per second).  If duration is zero or negative, the tone is said
  13433.    to be continuous and will play until you stop it with the fg_quiet routine.
  13434.  
  13435. Return value
  13436.  
  13437.    none
  13438.  
  13439. Restrictions
  13440.  
  13441.    This routine should only be used on systems equipped with the TI sound chip
  13442.    (namely, the PCjr and Tandy 1000 systems).  It has no effect if there is
  13443.    asynchronous sound already in progress.
  13444.  
  13445. See also
  13446.  
  13447.    fg_music, fg_quiet, fg_sound, fg_voices
  13448.  
  13449.                                      223
  13450. fg_voice (continued)
  13451.  
  13452. Examples
  13453.  
  13454.    15-2
  13455.  
  13456.  
  13457.  
  13458.  
  13459.  
  13460.  
  13461.  
  13462.  
  13463.  
  13464.  
  13465.  
  13466.  
  13467.  
  13468.  
  13469.  
  13470.  
  13471.  
  13472.  
  13473.  
  13474.  
  13475.  
  13476.  
  13477.  
  13478.  
  13479.  
  13480.  
  13481.  
  13482.  
  13483.  
  13484.  
  13485.  
  13486.  
  13487.  
  13488.  
  13489.  
  13490.  
  13491.  
  13492.  
  13493.  
  13494.  
  13495.  
  13496.  
  13497.  
  13498.  
  13499.  
  13500.  
  13501.  
  13502.  
  13503.  
  13504.  
  13505.  
  13506.  
  13507.  
  13508.                                      224
  13509. fg_voices
  13510.  
  13511. Prototype
  13512.  
  13513.    void fg_voices (int *sound_array, int ntimes);
  13514.    sub FGvoices (sound_array%(), ntimes%)
  13515.    subroutine fg_voices (i*2 sound_array, i*2 ntimes)
  13516.    procedure fg_voices (var sound_array : integer; ntimes : integer);
  13517.  
  13518. Description
  13519.  
  13520.    The fg_voices routine uses the TI sound chip to play a series of tones of
  13521.    specified frequencies, durations, and volumes, concurrent with other
  13522.    activity.  It is the asynchronous version of the fg_voice routine.
  13523.  
  13524. Parameters
  13525.  
  13526.    sound_array is an arbitrary-length array containing a series of
  13527.    (channel,frequency,volume,duration) sound definitions.  The format of this
  13528.    array is:
  13529.  
  13530.  
  13531.                           [0]    channel # of sound 1
  13532.  
  13533.                           [1]    frequency of sound 1
  13534.  
  13535.                           [2]    volume    of sound 1
  13536.  
  13537.                           [3]    duration  of sound 1
  13538.                                           .
  13539.                                           .
  13540.                                           .
  13541.                                           .
  13542.                                           .
  13543.                        [4n-4]    channel # of sound n
  13544.  
  13545.                        [4n-3]    frequency of sound n
  13546.  
  13547.                        [4n-2]    volume    of sound n
  13548.  
  13549.                        [4n-1]    duration  of sound n
  13550.  
  13551.                          [4n]       terminator (0)
  13552.  
  13553.  
  13554.    The channel numbers, frequencies, volumes, and durations must be in the
  13555.    same ranges as discussed in the description of the fg_voice routine, except
  13556.    the durations are quadrupled because of the accelerated clock tick
  13557.    interrupt rate (there are 72.8 instead of 18.2 clock ticks per second).  A
  13558.    null character (that is, a zero byte) terminates the array.
  13559.  
  13560.    ntimes specifies the number of times to cycle through the sounds defined in
  13561.    sound_array.  If ntimes is negative, the sounds will play repetitively
  13562.    until stopped with the fg_hush or fg_hushnext routine.
  13563.  
  13564.  
  13565.  
  13566.  
  13567.                                      225
  13568. fg_voices (continued)
  13569.  
  13570. Return value
  13571.  
  13572.    none
  13573.  
  13574. Restrictions
  13575.  
  13576.    This routine should only be used on systems equipped with the TI sound chip
  13577.    (namely, the PCjr and Tandy 1000 systems).  It has no effect if there is
  13578.    asynchronous sound already in progress.  To expand the range of sound
  13579.    effects, Fastgraph temporarily quadruples the clock tick interrupt rate
  13580.    from 18.2 to 72.8 ticks per second while producing asynchronous sound.
  13581.    Because many disk controllers rely on the 18.2 tick per second clock rate
  13582.    to synchronize disk accesses, your programs should not perform any disk
  13583.    operations when asynchronous sound is in progress.
  13584.  
  13585. See also
  13586.  
  13587.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sounds, fg_voice
  13588.  
  13589. Examples
  13590.  
  13591.    15-5
  13592.  
  13593.  
  13594.  
  13595.  
  13596.  
  13597.  
  13598.  
  13599.  
  13600.  
  13601.  
  13602.  
  13603.  
  13604.  
  13605.  
  13606.  
  13607.  
  13608.  
  13609.  
  13610.  
  13611.  
  13612.  
  13613.  
  13614.  
  13615.  
  13616.  
  13617.  
  13618.  
  13619.  
  13620.  
  13621.  
  13622.  
  13623.  
  13624.  
  13625.  
  13626.                                      226
  13627. fg_waitfor
  13628.  
  13629. Prototype
  13630.  
  13631.    void fg_waitfor (int ticks);
  13632.    sub FGwaitfor (ticks%)
  13633.    subroutine fg_waitfor (i*2 ticks)
  13634.    procedure fg_waitfor (ticks : integer);
  13635.  
  13636. Description
  13637.  
  13638.    The fg_waitfor routine delays a program's execution for a given number of
  13639.    clock ticks.  There are 18.2 clock ticks per second, regardless of the
  13640.    system's processor speed.
  13641.  
  13642. Parameters
  13643.  
  13644.    ticks is the number of clock ticks to wait.
  13645.  
  13646. Return value
  13647.  
  13648.    none
  13649.  
  13650. Restrictions
  13651.  
  13652.    none
  13653.  
  13654. See also
  13655.  
  13656.    fg_stall
  13657.  
  13658. Examples
  13659.  
  13660.    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,
  13661.    15-1, 15-2, 15-3, 15-6, 15-7, 16-1
  13662.  
  13663.  
  13664.  
  13665.  
  13666.  
  13667.  
  13668.  
  13669.  
  13670.  
  13671.  
  13672.  
  13673.  
  13674.  
  13675.  
  13676.  
  13677.  
  13678.  
  13679.  
  13680.  
  13681.  
  13682.  
  13683.  
  13684.  
  13685.                                      227
  13686. fg_waitkey
  13687.  
  13688. Prototype
  13689.  
  13690.    void fg_waitkey (void);
  13691.    sub FGwaitkey ()
  13692.    subroutine fg_waitkey ()
  13693.    procedure fg_waitkey;
  13694.  
  13695. Description
  13696.  
  13697.    The fg_waitkey routine flushes the BIOS keyboard buffer (that is, removes
  13698.    any type-ahead characters) and then waits for another keystroke.  It is
  13699.    most useful in "press any key to continue" situations.
  13700.  
  13701. Parameters
  13702.  
  13703.    none
  13704.  
  13705. Return value
  13706.  
  13707.    none
  13708.  
  13709. Restrictions
  13710.  
  13711.    none
  13712.  
  13713. See also
  13714.  
  13715.    fg_getkey, fg_intkey
  13716.  
  13717. Examples
  13718.  
  13719.    3-2 to 3-8, 3-10
  13720.  
  13721.  
  13722.  
  13723.  
  13724.  
  13725.  
  13726.  
  13727.  
  13728.  
  13729.  
  13730.  
  13731.  
  13732.  
  13733.  
  13734.  
  13735.  
  13736.  
  13737.  
  13738.  
  13739.  
  13740.  
  13741.  
  13742.  
  13743.  
  13744.                                      228
  13745. fg_waitvr
  13746.  
  13747. Prototype
  13748.  
  13749.    void fg_waitvr (int state);
  13750.    sub FGwaitvr (state%)
  13751.    subroutine fg_waitvr (i*2 state)
  13752.    procedure fg_waitvr (state : integer);
  13753.  
  13754. Description
  13755.  
  13756.    The fg_waitvr routine disables or enables Fastgraph's internal vertical
  13757.    retrace waiting (it is enabled by default).  When it is disabled, Fastgraph
  13758.    assumes your application will control the retrace synchronization as
  13759.    needed.  Vertical retrace waiting applies to the Fastgraph routines listed
  13760.    in the "see also" section below.
  13761.  
  13762. Parameters
  13763.  
  13764.    state defines whether vertical retrace waiting is enabled or disabled.  If
  13765.    state is 0, vertical retrace waiting is disabled.  If it is 1, vertical
  13766.    retrace waiting is enabled.
  13767.  
  13768. Return value
  13769.  
  13770.    none
  13771.  
  13772. Restrictions
  13773.  
  13774.    none
  13775.  
  13776. See also
  13777.  
  13778.    fg_getdacs, fg_makegif, fg_makepcx, fg_palettes, fg_pan, fg_setdacs,
  13779.    fg_setvpage, fg_showgif, fg_showpcx
  13780.  
  13781.  
  13782.  
  13783.  
  13784.  
  13785.  
  13786.  
  13787.  
  13788.  
  13789.  
  13790.  
  13791.  
  13792.  
  13793.  
  13794.  
  13795.  
  13796.  
  13797.  
  13798.  
  13799.  
  13800.  
  13801.  
  13802.  
  13803.                                      229
  13804. fg_where
  13805.  
  13806. Prototype
  13807.  
  13808.    void fg_where (int *row, int *column);
  13809.    sub FGwhere (row%, column%)
  13810.    subroutine fg_where (i*2 row, i*2 column)
  13811.    procedure fg_where (row, column : integer);
  13812.  
  13813. Description
  13814.  
  13815.    The fg_where routine retrieves the text cursor position for the active
  13816.    display page.
  13817.  
  13818. Parameters
  13819.  
  13820.    row receives the text cursor's current row number, between 0 and one less
  13821.    than the number of character rows available.
  13822.  
  13823.    column receives text cursor's current column number, between 0 and one less
  13824.    than the number of character columns available.
  13825.  
  13826. Return value
  13827.  
  13828.    none
  13829.  
  13830. Restrictions
  13831.  
  13832.    none
  13833.  
  13834. See also
  13835.  
  13836.    fg_locate
  13837.  
  13838. Examples
  13839.  
  13840.    7-2
  13841.  
  13842.  
  13843.  
  13844.  
  13845.  
  13846.  
  13847.  
  13848.  
  13849.  
  13850.  
  13851.  
  13852.  
  13853.  
  13854.  
  13855.  
  13856.  
  13857.  
  13858.  
  13859.  
  13860.  
  13861.  
  13862.                                      230
  13863. fg_xalpha
  13864.  
  13865. Prototype
  13866.  
  13867.    int fg_xalpha (int ix);
  13868.    function FGxalpha% (ix%)
  13869.    i*2 function fg_xalpha (i*2 ix)
  13870.    function fg_xalpha (ix : integer) : integer;
  13871.  
  13872. Description
  13873.  
  13874.    The fg_xalpha routine translates a screen space x coordinate to the
  13875.    character space column containing that coordinate.
  13876.  
  13877. Parameters
  13878.  
  13879.    ix is the screen space coordinate to translate.
  13880.  
  13881. Return value
  13882.  
  13883.    The character space column containing the screen space coordinate ix.  In
  13884.    text modes, the return value is equal to the value of ix.
  13885.  
  13886. Restrictions
  13887.  
  13888.    none
  13889.  
  13890. See also
  13891.  
  13892.    fg_xconvert, fg_yalpha, fg_yconvert
  13893.  
  13894. Examples
  13895.  
  13896.    14-10
  13897.  
  13898.  
  13899.  
  13900.  
  13901.  
  13902.  
  13903.  
  13904.  
  13905.  
  13906.  
  13907.  
  13908.  
  13909.  
  13910.  
  13911.  
  13912.  
  13913.  
  13914.  
  13915.  
  13916.  
  13917.  
  13918.  
  13919.  
  13920.  
  13921.                                      231
  13922. fg_xconvert
  13923.  
  13924. Prototype
  13925.  
  13926.    int fg_xconvert (int column);
  13927.    function FGxconvert% (column%)
  13928.    i*2 function fg_xconvert (i*2 column)
  13929.    function fg_xconvert (column : integer) : integer;
  13930.  
  13931. Description
  13932.  
  13933.    The fg_xconvert routine translates a character space column to the screen
  13934.    space coordinate of its leftmost pixel.  In graphics video modes,
  13935.    fg_xconvert(1) is an easy way to determine the width in pixels of a
  13936.    character cell.
  13937.  
  13938. Parameters
  13939.  
  13940.    column is the character space column to translate.
  13941.  
  13942. Return value
  13943.  
  13944.    The screen space x coordinate of the leftmost pixel in the character space
  13945.    column column.  In text modes, the return value is equal to the value of
  13946.    column.
  13947.  
  13948. Restrictions
  13949.  
  13950.    none
  13951.  
  13952. See also
  13953.  
  13954.    fg_xalpha, fg_yalpha, fg_yconvert
  13955.  
  13956. Examples
  13957.  
  13958.    7-9, 14-8
  13959.  
  13960.  
  13961.  
  13962.  
  13963.  
  13964.  
  13965.  
  13966.  
  13967.  
  13968.  
  13969.  
  13970.  
  13971.  
  13972.  
  13973.  
  13974.  
  13975.  
  13976.  
  13977.  
  13978.  
  13979.  
  13980.                                      232
  13981. fg_xscreen
  13982.  
  13983. Prototype
  13984.  
  13985.    int fg_xscreen (double x);
  13986.    function FGxscreen% (x#)
  13987.    i*2 function fg_xscreen (r*8 x)
  13988.    function fg_xscreen (x : real) : integer;
  13989.  
  13990. Description
  13991.  
  13992.    The fg_xscreen routine translates a world space x coordinate to its screen
  13993.    space equivalent.
  13994.  
  13995. Parameters
  13996.  
  13997.    x is the world space coordinate to translate.
  13998.  
  13999. Return value
  14000.  
  14001.    The screen space x coordinate equivalent to the world space coordinate x.
  14002.  
  14003. Restrictions
  14004.  
  14005.    This routine is not available in Fastgraph/Light.
  14006.  
  14007. See also
  14008.  
  14009.    fg_xworld, fg_yscreen, fg_yworld
  14010.  
  14011.  
  14012.  
  14013.  
  14014.  
  14015.  
  14016.  
  14017.  
  14018.  
  14019.  
  14020.  
  14021.  
  14022.  
  14023.  
  14024.  
  14025.  
  14026.  
  14027.  
  14028.  
  14029.  
  14030.  
  14031.  
  14032.  
  14033.  
  14034.  
  14035.  
  14036.  
  14037.  
  14038.  
  14039.                                      233
  14040. fg_xworld
  14041.  
  14042. Prototype
  14043.  
  14044.    double fg_xworld (int ix);
  14045.    function FGxworld# (ix%)
  14046.    r*8 function fg_xworld (i*2 ix)
  14047.    function fg_xworld (ix : integer) : real;
  14048.  
  14049. Description
  14050.  
  14051.    The fg_xworld routine translates a screen space x coordinate to its world
  14052.    space equivalent.
  14053.  
  14054. Parameters
  14055.  
  14056.    ix is the screen space coordinate to translate.
  14057.  
  14058. Return value
  14059.  
  14060.    The world space x coordinate equivalent to the screen space coordinate ix.
  14061.  
  14062. Restrictions
  14063.  
  14064.    This routine is not available in Fastgraph/Light.
  14065.  
  14066. See also
  14067.  
  14068.    fg_xscreen, fg_yscreen, fg_yworld
  14069.  
  14070.  
  14071.  
  14072.  
  14073.  
  14074.  
  14075.  
  14076.  
  14077.  
  14078.  
  14079.  
  14080.  
  14081.  
  14082.  
  14083.  
  14084.  
  14085.  
  14086.  
  14087.  
  14088.  
  14089.  
  14090.  
  14091.  
  14092.  
  14093.  
  14094.  
  14095.  
  14096.  
  14097.  
  14098.                                      234
  14099. fg_yalpha
  14100.  
  14101. Prototype
  14102.  
  14103.    int fg_yalpha (int iy);
  14104.    function FGyalpha% (iy%)
  14105.    i*2 function fg_yalpha (i*2 iy)
  14106.    function fg_yalpha (iy : integer) : integer;
  14107.  
  14108. Description
  14109.  
  14110.    The fg_yalpha routine translates a screen space y coordinate to the
  14111.    character space row containing that coordinate.
  14112.  
  14113. Parameters
  14114.  
  14115.    iy is the screen space coordinate to translate.
  14116.  
  14117. Return value
  14118.  
  14119.    The character space row containing the screen space coordinate iy.  In text
  14120.    modes, the return value is equal to the value of iy.
  14121.  
  14122. Restrictions
  14123.  
  14124.    none
  14125.  
  14126. See also
  14127.  
  14128.    fg_xalpha, fg_xconvert, fg_yconvert
  14129.  
  14130. Examples
  14131.  
  14132.    14-10
  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.                                      235
  14158. fg_yconvert
  14159.  
  14160. Prototype
  14161.  
  14162.    int fg_yconvert (int row);
  14163.    function FGyconvert% (row%)
  14164.    i*2 function fg_yconvert (i*2 row)
  14165.    function fg_yconvert (row : integer) : integer;
  14166.  
  14167. Description
  14168.  
  14169.    The fg_yconvert routine translates a character space row to the screen
  14170.    space coordinate of its top (lowest-numbered) pixel.  In graphics video
  14171.    modes, fg_yconvert(1) is an easy way to determine the height in pixels of a
  14172.    character cell.
  14173.  
  14174. Parameters
  14175.  
  14176.    row is the character space row to translate.
  14177.  
  14178. Return value
  14179.  
  14180.    The screen space y coordinate of the top pixel in the character space row
  14181.    row.  In text modes, the return value is equal to the value of row.
  14182.  
  14183. Restrictions
  14184.  
  14185.    none
  14186.  
  14187. See also
  14188.  
  14189.    fg_xalpha, fg_xconvert, fg_yalpha
  14190.  
  14191. Examples
  14192.  
  14193.    7-9, 14-8
  14194.  
  14195.  
  14196.  
  14197.  
  14198.  
  14199.  
  14200.  
  14201.  
  14202.  
  14203.  
  14204.  
  14205.  
  14206.  
  14207.  
  14208.  
  14209.  
  14210.  
  14211.  
  14212.  
  14213.  
  14214.  
  14215.  
  14216.                                      236
  14217. fg_yscreen
  14218.  
  14219. Prototype
  14220.  
  14221.    int fg_yscreen (double y);
  14222.    function FGyscreen% (y#)
  14223.    i*2 function fg_yscreen (r*8 y)
  14224.    function fg_yscreen (y : real) : integer;
  14225.  
  14226. Description
  14227.  
  14228.    The fg_yscreen routine translates a world space y coordinate to its screen
  14229.    space equivalent.
  14230.  
  14231. Parameters
  14232.  
  14233.    y is the world space coordinate to translate.
  14234.  
  14235. Return value
  14236.  
  14237.    The screen space y coordinate equivalent to the world space coordinate y.
  14238.  
  14239. Restrictions
  14240.  
  14241.    This routine is not available in Fastgraph/Light.
  14242.  
  14243. See also
  14244.  
  14245.    fg_xscreen, fg_xworld, fg_yworld
  14246.  
  14247.  
  14248.  
  14249.  
  14250.  
  14251.  
  14252.  
  14253.  
  14254.  
  14255.  
  14256.  
  14257.  
  14258.  
  14259.  
  14260.  
  14261.  
  14262.  
  14263.  
  14264.  
  14265.  
  14266.  
  14267.  
  14268.  
  14269.  
  14270.  
  14271.  
  14272.  
  14273.  
  14274.  
  14275.                                      237
  14276. fg_yworld
  14277.  
  14278. Prototype
  14279.  
  14280.    double fg_yworld (int iy);
  14281.    function FGyworld# (iy%)
  14282.    r*8 function fg_yworld (i*2 iy)
  14283.    function fg_yworld (iy : integer) : real;
  14284.  
  14285. Description
  14286.  
  14287.    The fg_yworld routine translates a screen space y coordinate to its world
  14288.    space equivalent.
  14289.  
  14290. Parameters
  14291.  
  14292.    iy is the screen space coordinate to translate.
  14293.  
  14294. Return value
  14295.  
  14296.    The world space y coordinate equivalent to the screen space coordinate iy.
  14297.  
  14298. Restrictions
  14299.  
  14300.    This routine is not available in Fastgraph/Light.
  14301.  
  14302. See also
  14303.  
  14304.    fg_xscreen, fg_xworld, fg_yscreen
  14305.  
  14306.  
  14307.  
  14308.  
  14309.  
  14310.  
  14311.  
  14312.  
  14313.  
  14314.  
  14315.  
  14316.  
  14317.  
  14318.  
  14319.  
  14320.  
  14321.  
  14322.  
  14323.  
  14324.  
  14325.  
  14326.  
  14327.  
  14328.  
  14329.  
  14330.  
  14331.  
  14332.  
  14333.  
  14334.                                      238
  14335.