home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c500 / 4.ddi / GRAPHHLP.WPK / GRAPHICS.HLP
Encoding:
Text File  |  1992-05-28  |  92.2 KB  |  2,304 lines

  1. ::::_ARC
  2. #include \<graph.h>
  3. short _FAR _arc( short x1, short y1,
  4.          short x2, short y2,
  5.          short x3, short y3,
  6.          short x4, short y4 );
  7.  
  8. short _FAR _arc_w( double x1, double y1,
  9.            double x2, double y2,
  10.            double x3, double y3,
  11.            double x4, double y4 );
  12.  
  13. short _FAR _arc_wxy( struct _wxycoord _FAR *p1,
  14.              struct _wxycoord _FAR *p2,
  15.              struct _wxycoord _FAR *p3,
  16.              struct _wxycoord _FAR *p4 );
  17.  
  18. The _arc functions draw elliptical arcs.  The _arc function uses the
  19. view coordinate system.  The _arc_w and _arc_wxy functions use the
  20. window coordinate system.
  21.  
  22. The center of the arc is the center of the rectangle established by
  23. the points (x1,y1) and (x2,y2).  The arc is a segment of the ellipse
  24. drawn within this bounding rectangle.  The arc starts at the point on
  25. this ellipse that intersects the vector from the centre of the ellipse
  26. to the point (x3,y3).  The arc ends at the point on this ellipse that
  27. intersects the vector from the centre of the ellipse to the point
  28. (x4,y4).  The arc is drawn in a counter-clockwise direction with the
  29. current plot action using the current color and the current line
  30. style.
  31.  
  32. When the coordinates (x1,y1) and (x2,y2) establish a line or a point
  33. (this happens when one or more of the x-coordinates or y-coordinates
  34. are equal), nothing is drawn.
  35.  
  36. The current output position for graphics output is set to be the point
  37. at the end of the arc that was drawn.
  38. ::::_ARC_W
  39.  ->_ARC
  40. ::::_ARC_WXY
  41.  ->_ARC
  42. ::::_CLEARSCREEN
  43. #include \<graph.h>
  44. void _FAR _clearscreen( short area );
  45.  
  46. The _clearscreen function clears the indicated "area" and fills it
  47. with the background color.  The "area" argument must be one of the
  48. following values:
  49.  
  50. _GCLEARSCREEN  area is entire screen
  51. _GVIEWPORT     area is current viewport or clip region
  52. _GWINDOW       area is current text window
  53. ::::_DISPLAYCURSOR
  54. #include \<graph.h>
  55. short _FAR _displaycursor( short mode );
  56.  
  57. The _displaycursor function is used to establish whether the text
  58. cursor is to be displayed when graphics functions complete.  On entry
  59. to a graphics function, the text cursor is turned off.    When the
  60. function completes, the "mode" setting determines whether the cursor
  61. is turned back on.  The "mode" argument can have one of the following
  62. values:
  63.  
  64. _GCURSORON     the cursor will be displayed
  65. _GCURSOROFF    the cursor will not be displayed
  66. ::::_ELLIPSE
  67. #include \<graph.h>
  68. short _FAR _ellipse( short fill, short x1, short y1,
  69.                  short x2, short y2 );
  70.  
  71. short _FAR _ellipse_w( short fill, double x1, double y1,
  72.                    double x2, double y2 );
  73.  
  74. short _FAR _ellipse_wxy( short fill,
  75.              struct _wxycoord _FAR *p1,
  76.              struct _wxycoord _FAR *p2 );
  77.  
  78. The _ellipse functions draw ellipses.  The _ellipse function uses the
  79. view coordinate system.  The _ellipse_w and _ellipse_wxy functions use
  80. the window coordinate system.
  81.  
  82. The center of the ellipse is the center of the rectangle established
  83. by the points (x1,y1) and (x2,y2).
  84.  
  85. The argument "fill" determines whether the ellipse is filled in or has
  86. only its outline drawn.  The argument can have one of two values:
  87.  
  88. _GFILLINTERIOR fill the interior by writing pixels with the current
  89.            plot action using the current color and the current
  90.            fill mask
  91. _GBORDER       leave the interior unchanged; draw the outline of the
  92.            figure with the current plot action using the current
  93.            color and line style
  94.  
  95. When the coordinates (x1,y1) and (x2,y2) establish a line or a point
  96. (this happens when one or more of the x-coordinates or y-coordinates
  97. are equal), nothing is drawn.
  98. ::::_ELLIPSE_W
  99.  ->_ELLIPSE
  100. ::::_ELLIPSE_WXY
  101.  ->_ELLIPSE
  102. ::::_FLOODFILL
  103. #include \<graph.h>
  104. short _FAR _floodfill( short x, short y,
  105.                short stop_color );
  106.  
  107. short _FAR _floodfill_w( double x, double y,
  108.              short stop_color );
  109.  
  110. The _floodfill functions fill an area of the screen.  The _floodfill
  111. function uses the view coordinate system.  The _floodfill_w function
  112. uses the window coordinate system.
  113.  
  114. The filling starts at the point (x,y) and continues in all directions:
  115. when a pixel is filled, the neighbouring pixels (horizontally and
  116. vertically) are then considered for filling.  Filling is done using
  117. the current color and fill mask.  No filling will occur if the point
  118. (x,y) lies outside the clipping region.
  119.  
  120. If the argument "stop_color" is a valid pixel value, filling will
  121. occur in each direction until a pixel is encountered with a pixel
  122. value of "stop_color". The filled area will be the area around (x,y),
  123. bordered by "stop_color". No filling will occur if the point (x,y) has
  124. the pixel value "stop_color".
  125.  
  126. If "stop_color" has the value (-1), filling occurs until a pixel is
  127. encountered with a pixel value different from the pixel value of the
  128. starting point (x,y).  No filling will occur if the pixel value of the
  129. point (x,y) is the current color.
  130. ::::_FLOODFILL_W
  131.  ->_FLOODFILL
  132. ::::_GETACTIVEPAGE
  133. #include \<graph.h>
  134. short _FAR _getactivepage( void );
  135.  
  136. The _getactivepage function returns the number of the currently
  137. selected active graphics page.
  138.  
  139. Only some combinations of video modes and hardware allow multiple
  140. pages of graphics to exist.  When multiple pages are supported, the
  141. active page may differ from the visual page.  The graphics information
  142. in the visual page determines what is displayed upon the screen.
  143. Animation may be accomplished by alternating the visual page.  A
  144. graphics page can be constructed without affecting the screen by
  145. setting the active page to be different than the visual page.
  146.  
  147. The number of available video pages can be determined by using the
  148. _getvideoconfig function.  The default video page is 0.
  149. ::::_GETARCINFO
  150. #include \<graph.h>
  151. short _FAR _getarcinfo( struct xycoord _FAR *start_pt,
  152.             struct xycoord _FAR *end_pt,
  153.             struct xycoord _FAR *inside_pt );
  154.  
  155. The _getarcinfo function returns information about the arc most
  156. recently drawn by the _arc or _pie functions.  The arguments
  157. "start_pt" and "end_pt" are set to contain the endpoints of the arc.
  158. The argument "inside_pt" will contain the coordinates of a point
  159. within the pie.  The points are all specified in the view coordinate
  160. system.
  161.  
  162. The endpoints of the arc can be used to connect other lines to the
  163. arc.  The interior point can be used to fill the pie.
  164. ::::_GETBKCOLOR
  165. #include \<graph.h>
  166. long _FAR _getbkcolor( void );
  167.  
  168. The _getbkcolor function returns the current background color.    In
  169. text modes, the background color controls the area behind each
  170. individual character.  In graphics modes, the background refers to the
  171. entire screen.    The default background color is 0.
  172. ::::_GETCLIPRGN
  173. #include \<graph.h>
  174. void _FAR _getcliprgn( short _FAR *x1, short _FAR *y1,
  175.                short _FAR *x2, short _FAR *y2 );
  176.  
  177. The _getcliprgn function returns the location of the current clipping
  178. region.  A clipping region is defined with the _setcliprgn or
  179. _setviewport functions.  By default, the clipping region is the entire
  180. screen.
  181.  
  182. The current clipping region is a rectangular area of the screen to
  183. which graphics output is restricted.  The top left corner of the
  184. clipping region is placed in the arguments (x1,y1).  The bottom right
  185. corner of the clipping region is placed in (x2,y2).
  186. ::::_GETCOLOR
  187. #include \<graph.h>
  188. short _FAR _getcolor( void );
  189.  
  190. The _getcolor function returns the pixel value for the current color.
  191. This is the color used for displaying graphics output.    The default
  192. color value is one less than the maximum number of colors in the
  193. current video mode.
  194. ::::_GETCURRENTPOSITION
  195. #include \<graph.h>
  196. struct xycoord _FAR _getcurrentposition( void );
  197.  
  198. struct _wxycoord _FAR _getcurrentposition_w( void );
  199.  
  200. The _getcurrentposition functions return the current output position
  201. for graphics.  The _getcurrentposition function returns the point in
  202. view coordinates.  The _getcurrentposition_w function returns the
  203. point in window coordinates.
  204.  
  205. The current position defaults to the origin, (0,0), when a new video
  206. mode is selected.  It is changed by successful calls to the _arc,
  207. _moveto and _lineto functions as well as the _setviewport function.
  208.  
  209. Note that the output position for graphics output differs from that
  210. for text output.  The output position for text output can be set by
  211. use of the _settextposition function.
  212. ::::_GETCURRENTPOSITION_W
  213.  ->_GETCURRENTPOSITION
  214. ::::_GETFILLMASK
  215. #include \<graph.h>
  216. unsigned char _FAR * _FAR
  217.     _getfillmask( unsigned char _FAR *mask );
  218.  
  219. The _getfillmask function copies the current fill mask into the area
  220. located by the argument "mask". The fill mask is used by the _ellipse,
  221. _floodfill, _pie, _polygon and _rectangle functions that fill an area
  222. of the screen.
  223.  
  224. The fill mask is an eight-byte array which is interpreted as a square
  225. pattern (8 by 8) of 64 bits.  Each bit in the mask corresponds to a
  226. pixel.    When a region is filled, each point in the region is mapped
  227. onto the fill mask.  When a bit from the mask is one, the pixel value
  228. of the corresponding point is set using the current plotting action
  229. with the current color; when the bit is zero, the pixel value of that
  230. point is not affected.
  231.  
  232. When the fill mask is not set, a fill operation will set all points in
  233. the fill region to have a pixel value of the current color.
  234. ::::_GETFONTINFO
  235. #include \<graph.h>
  236. short _FAR _getfontinfo( struct _fontinfo _FAR *info );
  237.  
  238. The _getfontinfo function returns information about the currently
  239. selected font.    Fonts are selected with the _setfont function.    The
  240. font information is returned in the _fontinfo structure indicated by
  241. the argument "info". The structure contains the following fields:
  242.  
  243. type           1 for a vector font, 0 for a bit-mapped font
  244. ascent           distance from top of character to baseline in pixels
  245. pixwidth       character width in pixels (0 for a proportional font)
  246. pixheight      character height in pixels
  247. avgwidth       average character width in pixels
  248. filename       name of the file containing the current font
  249. facename       name of the current font
  250. ::::_GETGTEXTEXTENT
  251. #include \<graph.h>
  252. short _FAR _getgtextextent( char _FAR *text );
  253.  
  254. The _getgtextextent function returns the length in pixels of the
  255. argument "text" as it would be displayed in the current font by the
  256. function _outgtext.  Note that the text is not displayed on the
  257. screen, only its length is determined.
  258. ::::_GETGTEXTVECTOR
  259. #include \<graph.h>
  260. struct xycoord _FAR _getgtextvector( void );
  261.  
  262. The _getgtextvector function returns the current value of the text
  263. orientation vector.  This is the direction used when text is displayed
  264. by the _outgtext function.
  265. ::::_GETIMAGE
  266. #include \<graph.h>
  267. void _FAR _getimage( short x1, short y1,
  268.              short x2, short y2,
  269.              char _HUGE *image );
  270.  
  271. void _FAR _getimage_w( double x1, double y1,
  272.                double x2, double y2,
  273.                char _HUGE *image );
  274.  
  275. void _FAR _getimage_wxy( struct _wxycoord _FAR *p1,
  276.              struct _wxycoord _FAR *p2,
  277.              char _HUGE *image );
  278.  
  279. The _getimage functions store a copy of an area of the screen into the
  280. buffer indicated by the "image" argument.  The _getimage function uses
  281. the view coordinate system.  The _getimage_w and _getimage_wxy
  282. functions use the window coordinate system.
  283.  
  284. The screen image is the rectangular area defined by the points (x1,y1)
  285. and (x2,y2).  The buffer "image" must be large enough to contain the
  286. image (the size of the image can be determined by using the _imagesize
  287. function).  The image may be displayed upon the screen at some later
  288. time by using the _putimage functions.
  289. ::::_GETIMAGE_W
  290.  ->_GETIMAGE
  291. ::::_GETIMAGE_WXY
  292.  ->_GETIMAGE
  293. ::::_GETLINESTYLE
  294. #include \<graph.h>
  295. unsigned short _FAR _getlinestyle( void );
  296.  
  297. The _getlinestyle function returns the current line-style mask.
  298.  
  299. The line-style mask determines the style by which lines and arcs are
  300. drawn.    The mask is treated as an array of 16 bits.  As a line is
  301. drawn, a pixel at a time, the bits in this array are cyclically
  302. tested.  When a bit in the array is 1, the pixel value for the current
  303. point is set using the current color according to the current plotting
  304. action; otherwise, the pixel value for the point is left unchanged.  A
  305. solid line would result from a value of 0xFFFF and a dashed line would
  306. result from a value of 0xF0F0
  307.  
  308. The default line style mask is 0xFFFF.
  309. ::::_GETPHYSCOORD
  310. #include \<graph.h>
  311. struct xycoord _FAR _getphyscoord( short x, short y );
  312.  
  313. The _getphyscoord function returns the physical coordinates of the
  314. position with view coordinates (x,y).  View coordinates are defined by
  315. the _setvieworg and _setviewport functions.
  316. ::::_GETPIXEL
  317. #include \<graph.h>
  318. short _FAR _getpixel( short x, short y );
  319.  
  320. short _FAR _getpixel_w( double x, double y );
  321.  
  322. The _getpixel functions return the pixel value for the point with
  323. coordinates (x,y).  The _getpixel function uses the view coordinate
  324. system.  The _getpixel_w function uses the window coordinate system.
  325. ::::_GETPIXEL_W
  326.  ->_GETPIXEL
  327. ::::_GETPLOTACTION
  328. #include \<graph.h>
  329. short _FAR _getplotaction( void );
  330.  
  331. The _getplotaction function returns the current plotting action.
  332.  
  333. The drawing functions cause pixels to be set with a pixel value.  By
  334. default, the value to be set is obtained by replacing the original
  335. pixel value with the supplied pixel value.  Alternatively, the
  336. replaced value may be computed as a function of the original and the
  337. supplied pixel values.
  338.  
  339. The plotting action can have one of the following values:
  340.  
  341. _GPSET           replace the original screen pixel value with the
  342.            supplied pixel value
  343. _GAND           replace the original screen pixel value with the
  344.            bitwise and of the original pixel value and the
  345.            supplied pixel value
  346. _GOR           replace the original screen pixel value with the
  347.            bitwise or of the original pixel value and the supplied
  348.            pixel value
  349. _GXOR           replace the original screen pixel value with the
  350.            bitwise exclusive-or of the original pixel value and
  351.            the supplied pixel value.  Performing this operation
  352.            twice will restore the original screen contents,
  353.            providing an efficient method to produce animated
  354.            effects.
  355. ::::_GETTEXTCOLOR
  356. #include \<graph.h>
  357. short _FAR _gettextcolor( void );
  358.  
  359. The _gettextcolor function returns the pixel value of the current text
  360. color.    This is the color used for displaying text with the _outtext
  361. and _outmem functions.    The default text color value is set to 7
  362. whenever a new video mode is selected.
  363. ::::_GETTEXTCURSOR
  364. #include \<graph.h>
  365. short _FAR _gettextcursor( void );
  366.  
  367. The _gettextcursor function returns the current cursor attribute, or
  368. shape.    The cursor shape is set with the _settextcursor function.  See
  369. the _settextcursor function for a description of the value returned by
  370. the _gettextcursor function.
  371. ::::_GETTEXTEXTENT
  372. #include \<graph.h>
  373. void _FAR _gettextextent( short x, short y,
  374.               char _FAR *text,
  375.               struct xycoord _FAR *concat,
  376.               struct xycoord _FAR *extent );
  377.  
  378. The _gettextextent function simulates the effect of using the _grtext
  379. function to display the text string "text" at the position (x,y),
  380. using the current text settings.  The concatenation point is returned
  381. in the argument "concat". The text extent parallelogram is returned in
  382. the array "extent".
  383.  
  384. The concatenation point is the position to use to output text after
  385. the given string.  The text extent parallelogram outlines the area
  386. where the text string would be displayed.  The four points are
  387. returned in counter-clockwise order, starting at the upper-left
  388. corner.
  389. ::::_GETTEXTPOSITION
  390. #include \<graph.h>
  391. struct rccoord _FAR _gettextposition( void );
  392.  
  393. The _gettextposition function returns the current output position for
  394. text.  This position is in terms of characters, not pixels.
  395.  
  396. The current position defaults to the top left corner of the screen,
  397. (1,1), when a new video mode is selected.  It is changed by successful
  398. calls to the _outtext, _outmem, _settextposition and _settextwindow
  399. functions.
  400.  
  401. Note that the output position for graphics output differs from that
  402. for text output.  The output position for graphics output can be set
  403. by use of the _moveto function.
  404. ::::_GETTEXTSETTINGS
  405. #include \<graph.h>
  406. struct textsettings _FAR * _FAR _gettextsettings
  407.     ( struct textsettings _FAR *settings );
  408.  
  409. The _gettextsettings function returns information about the current
  410. text settings used when text is displayed by the _grtext function.
  411. The information is stored in the textsettings structure indicated by
  412. the argument "settings". The structure contains the following fields
  413. (all are short fields):
  414.  
  415. basevectorx    x-component of the current base vector
  416. basevectory    y-component of the current base vector
  417. path           current text path
  418. height           current text height (in pixels)
  419. width           current text width (in pixels)
  420. spacing        current text spacing (in pixels)
  421. horizalign     horizontal component of the current text alignment
  422. vertalign      vertical component of the current text alignment
  423. ::::_GETTEXTWINDOW
  424. #include \<graph.h>
  425. void _FAR _gettextwindow(
  426.         short _FAR *row1, short _FAR *col1,
  427.         short _FAR *row2, short _FAR *col2 );
  428.  
  429. The _gettextwindow function returns the location of the current text
  430. window.  A text window is defined with the _settextwindow function.
  431. By default, the text window is the entire screen.
  432.  
  433. The current text window is a rectangular area of the screen.  Text
  434. display is restricted to be within this window.  The top left corner
  435. of the text window is placed in the arguments (row1,col1).  The bottom
  436. right corner of the text window is placed in (row2,col2).
  437. ::::_GETVIDEOCONFIG
  438. #include \<graph.h>
  439. struct videoconfig _FAR * _FAR _getvideoconfig
  440.     ( struct videoconfig _FAR *config );
  441.  
  442. The _getvideoconfig function returns information about the current
  443. video mode and the hardware configuration.  The information is
  444. returned in the videoconfig structure indicated by the argument
  445. "config". The structure contains the following fields (all are short
  446. fields):
  447.  
  448. numxpixels     number of pixels in x-axis
  449. numypixels     number of pixels in y-axis
  450. numtextcols    number of text columns
  451. numtextrows    number of text rows
  452. numcolors      number of actual colors
  453. bitsperpixel   number of bits in a pixel value
  454. numvideopages  number of video pages
  455. mode           current video mode
  456. adapter        adapter type
  457. monitor        monitor type
  458. memory           number of kilobytes (1024 characters) of video memory
  459.  
  460. The adapter field will contain one of the following values:
  461.  
  462. _NODISPLAY     no display adapter attached
  463. _UNKNOWN       unknown adapter/monitor type
  464. _MDPA           Monochrome Display/Printer Adapter
  465. _CGA           Color Graphics Adapter
  466. _HERCULES      Hercules Monochrome Adapter
  467. _MCGA           Multi-Color Graphics Array
  468. _EGA           Enhanced Graphics Adapter
  469. _VGA           Video Graphics Array
  470. _SVGA           SuperVGA Adapter
  471.  
  472. The monitor field will contain one of the following values:
  473.  
  474. _MONO           regular monochrome
  475. _COLOR           regular color
  476. _ENHANCED      enhanced color
  477. _ANALOGMONO    analog monochrome
  478. _ANALOGCOLOR   analog color
  479.  
  480. The amount of memory reported by _getvideoconfig will not always be
  481. correct for SuperVGA adapters.    Since it is not always possible to
  482. determine the amount of memory, _getvideoconfig will always report
  483. 256K, the minimum amount.
  484. ::::_GETVIEWCOORD
  485. #include \<graph.h>
  486. struct xycoord _FAR _getviewcoord( short x, short y );
  487.  
  488. struct xycoord _FAR _getviewcoord_w( double x, double y );
  489.  
  490. struct xycoord _FAR _getviewcoord_wxy(
  491.             struct _wxycoord _FAR *p );
  492.  
  493. The _getviewcoord functions translate a point from one coordinate
  494. system to viewport coordinates.  The _getviewcoord function translates
  495. the point (x,y) from physical coordinates.  The _getviewcoord_w and
  496. _getviewcoord_wxy functions translate the point from the window
  497. coordinate system.
  498.  
  499. Viewport coordinates are defined by the _setvieworg and _setviewport
  500. functions.  Window coordinates are defined by the _setwindow function.
  501.  
  502. Note:  In previous versions of the software, the _getviewcoord
  503. function was called _getlogcoord.
  504. ::::_GETVIEWCOORD_W
  505.  ->_GETVIEWCOORD
  506. ::::_GETVIEWCOORD_WXY
  507.  ->_GETVIEWCOORD
  508. ::::_GETVISUALPAGE
  509. #include \<graph.h>
  510. short _FAR _getvisualpage( void );
  511.  
  512. The _getvisualpage function returns the number of the currently
  513. selected visual graphics page.
  514.  
  515. Only some combinations of video modes and hardware allow multiple
  516. pages of graphics to exist.  When multiple pages are supported, the
  517. active page may differ from the visual page.  The graphics information
  518. in the visual page determines what is displayed upon the screen.
  519. Animation may be accomplished by alternating the visual page.  A
  520. graphics page can be constructed without affecting the screen by
  521. setting the active page to be different than the visual page.
  522.  
  523. The number of available video pages can be determined by using the
  524. _getvideoconfig function.  The default video page is 0.
  525. ::::_GETWINDOWCOORD
  526. #include \<graph.h>
  527. struct _wxycoord _FAR _getwindowcoord( short x, short y );
  528.  
  529. The _getwindowcoord function returns the window coordinates of the
  530. position with view coordinates (x,y).  Window coordinates are defined
  531. by the _setwindow function.
  532. ::::_GRSTATUS
  533. #include \<graph.h>
  534. short _FAR _grstatus( void );
  535.  
  536. The _grstatus function returns the status of the most recently called
  537. graphics library function.  The function can be called after any
  538. graphics function to determine if any errors or warnings occurred.
  539. The function returns 0 if the previous function was successful.
  540. Values less than 0 indicate an error occurred; values greater than 0
  541. indicate a warning condition.
  542.  
  543. The following values can be returned:
  544.  
  545. Constant          Value  Explanation
  546.  
  547. _GROK            0    no error
  548. _GRERROR           -1    graphics error
  549. _GRMODENOTSUPPORTED    -2    video mode not supported
  550. _GRNOTINPROPERMODE     -3    function n/a in this mode
  551. _GRINVALIDPARAMETER    -4    invalid parameter(s)
  552. _GRINSUFFICIENTMEMORY  -5    out of memory
  553. _GRFONTFILENOTFOUND    -6    can't open font file
  554. _GRINVALIDFONTFILE     -7    font file has invalid format
  555. _GRNOOUTPUT        1    nothing was done
  556. _GRCLIPPED        2    output clipped
  557. ::::_GRTEXT
  558. #include \<graph.h>
  559. short _FAR _grtext( short x, short y,
  560.             char _FAR *text );
  561.  
  562. short _FAR _grtext_w( double x, double y,
  563.               char _FAR *text );
  564.  
  565. The _grtext functions display a character string.  The _grtext
  566. function uses the view coordinate system.  The _grtext_w function uses
  567. the window coordinate system.
  568.  
  569. The character string "text" is displayed at the point (x,y).  The
  570. string must be terminated by a null character ('\0').  The text is
  571. displayed in the current color using the current text settings.
  572.  
  573. The graphics library can display text in three different ways.
  574.  
  575. 1.  The _outtext and _outmem functions use the system BIOS, and can be
  576.     displayed in any video mode.  However, this variety of text can be
  577.     displayed in only one size.
  578.  
  579. 2.  The _grtext function displays text as a sequence of line segments,
  580.     and can be drawn in different sizes, with different orientations
  581.     and alignments.
  582.  
  583. 3.  The _outgtext function displays text in the currently selected
  584.     font.  Both bit-mapped and vector fonts are supported; the size
  585.     and type of text depends on the fonts that are available.
  586.  
  587. ::::_GRTEXT_W
  588.  ->_GRTEXT
  589. ::::_IMAGESIZE
  590. #include \<graph.h>
  591. long _FAR _imagesize( short x1, short y1,
  592.               short x2, short y2 );
  593.  
  594. long _FAR _imagesize_w( double x1, double y1,
  595.             double x2, double y2 );
  596.  
  597. long _FAR _imagesize_wxy( struct _wxycoord _FAR *p1,
  598.               struct _wxycoord _FAR *p2 );
  599.  
  600. The _imagesize functions compute the number of bytes required to store
  601. a screen image.  The _imagesize function uses the view coordinate
  602. system.  The _imagesize_w and _imagesize_wxy functions use the window
  603. coordinate system.
  604.  
  605. The screen image is the rectangular area defined by the points (x1,y1)
  606. and (x2,y2).  The storage area used by the _getimage functions must be
  607. at least this large (in bytes).
  608. ::::_IMAGESIZE_W
  609.  ->_IMAGESIZE
  610. ::::_IMAGESIZE_WXY
  611.  ->_IMAGESIZE
  612. ::::_LINETO
  613. #include \<graph.h>
  614. short _FAR _lineto( short x, short y );
  615.  
  616. short _FAR _lineto_w( double x, double y );
  617.  
  618. The _lineto functions draw straight lines.  The _lineto function uses
  619. the view coordinate system.  The _lineto_w function uses the window
  620. coordinate system.
  621.  
  622. The line is drawn from the current position to the point at the
  623. coordinates (x,y).  The point (x,y) becomes the new current position.
  624. The line is drawn with the current plotting action using the current
  625. line style and the current color.
  626. ::::_LINETO_W
  627.  ->_LINETO
  628. ::::_MOVETO
  629. #include \<graph.h>
  630. struct xycoord _FAR _moveto( short x, short y );
  631.  
  632. struct _wxycoord _FAR _moveto_w( double x, double y );
  633.  
  634. The _moveto functions set the current output position for graphics.
  635. The _moveto function uses the view coordinate system.  The _moveto_w
  636. function uses the window coordinate system.
  637.  
  638. The current output position is set to be the point at the coordinates
  639. (x,y).    Nothing is drawn by the function.  The _lineto function uses
  640. the current output position as the starting point when a line is
  641. drawn.
  642.  
  643. Note that the output position for graphics output differs from that
  644. for text output.  The output position for text output can be set by
  645. use of the _settextposition function.
  646. ::::_MOVETO_W
  647.  ->_MOVETO
  648. ::::_OUTGTEXT
  649. #include \<graph.h>
  650. void _FAR _outgtext( char _FAR *text );
  651.  
  652. The _outgtext function displays the character string indicated by the
  653. argument "text". The string must be terminated by a null character
  654. ('\0').
  655.  
  656. The string is displayed starting at the current position (see the
  657. _moveto function) in the current color and in the currently selected
  658. font (see the _setfont function).  The current position is updated to
  659. follow the displayed text.
  660.  
  661. When no font has been previously selected with _setfont, a default
  662. font will be used.  The default font is an 8-by-8 bit-mapped font.
  663.  
  664. The graphics library can display text in three different ways.
  665.  
  666. 1.  The _outtext and _outmem functions use the system BIOS, and can be
  667.     displayed in any video mode.  However, this variety of text can be
  668.     displayed in only one size.
  669.  
  670. 2.  The _grtext function displays text as a sequence of line segments,
  671.     and can be drawn in different sizes, with different orientations
  672.     and alignments.
  673.  
  674. 3.  The _outgtext function displays text in the currently selected
  675.     font.  Both bit-mapped and vector fonts are supported; the size
  676.     and type of text depends on the fonts that are available.
  677.  
  678. ::::_OUTMEM
  679. #include \<graph.h>
  680. void _FAR _outmem( char _FAR *text, short length );
  681.  
  682. The _outmem function displays the character string indicated by the
  683. argument "text". The argument "length" specifies the number of
  684. characters to be displayed.  Unlike the _outtext function, _outmem
  685. will display the graphical representation of characters such as ASCII
  686. 10 and 0, instead of interpreting them as control characters.
  687.  
  688. The text is displayed using the current text color (see the
  689. _settextcolor function), starting at the current text position (see
  690. the _settextposition function).  The text position is updated to
  691. follow the end of the displayed text.
  692.  
  693. The graphics library can display text in three different ways.
  694.  
  695. 1.  The _outtext and _outmem functions use the system BIOS, and can be
  696.     displayed in any video mode.  However, this variety of text can be
  697.     displayed in only one size.
  698.  
  699. 2.  The _grtext function displays text as a sequence of line segments,
  700.     and can be drawn in different sizes, with different orientations
  701.     and alignments.
  702.  
  703. 3.  The _outgtext function displays text in the currently selected
  704.     font.  Both bit-mapped and vector fonts are supported; the size
  705.     and type of text depends on the fonts that are available.
  706.  
  707. ::::_OUTTEXT
  708. #include \<graph.h>
  709. void _FAR _outtext( char _FAR *text );
  710.  
  711. The _outtext function displays the character string indicated by the
  712. argument "text". The string must be terminated by a null character
  713. ('\0').  When a line-feed character ('\n') is encountered in the
  714. string, the characters following will be displayed on the next row of
  715. the screen.
  716.  
  717. The text is displayed using the current text color (see the
  718. _settextcolor function), starting at the current text position (see
  719. the _settextposition function).  The text position is updated to
  720. follow the end of the displayed text.
  721.  
  722. The graphics library can display text in three different ways.
  723.  
  724. 1.  The _outtext and _outmem functions use the system BIOS, and can be
  725.     displayed in any video mode.  However, this variety of text can be
  726.     displayed in only one size.
  727.  
  728. 2.  The _grtext function displays text as a sequence of line segments,
  729.     and can be drawn in different sizes, with different orientations
  730.     and alignments.
  731.  
  732. 3.  The _outgtext function displays text in the currently selected
  733.     font.  Both bit-mapped and vector fonts are supported; the size
  734.     and type of text depends on the fonts that are available.
  735.  
  736. ::::_PG_ANALYZECHART
  737. #include \<pgchart.h>
  738. short _FAR _pg_analyzechart( chartenv _FAR *env,
  739.                  char _FAR * _FAR *cat,
  740.                  float _FAR *values, short n );
  741.  
  742. short _FAR _pg_analyzechartms( chartenv _FAR *env,
  743.                    char _FAR * _FAR *cat,
  744.                    float _FAR *values,
  745.                    short nseries,
  746.                    short n, short dim,
  747.                    char _FAR * _FAR *labels );
  748.  
  749. The _pg_analyzechart functions analyze either a single-series or a
  750. multi-series bar, column or line chart.  These functions calculate
  751. default values for chart elements without actually displaying the
  752. chart.
  753.  
  754. The _pg_analyzechart function analyzes a single-series bar, column or
  755. line chart.  The chart environment structure "env" is filled with
  756. default values based on the type of chart and the values of the "cat"
  757. and "values" arguments.  The arguments are the same as for the
  758. _pg_chart function.
  759.  
  760. The _pg_analyzechart_w function analyzes a multi-series bar, column or
  761. line chart.  The chart environment structure "env" is filled with
  762. default values based on the type of chart and the values of the "cat",
  763. "values" and "labels" arguments.  The arguments are the same as for
  764. the _pg_chartms function.
  765. ::::_PG_ANALYZECHARTMS
  766.  ->_PG_ANALYZECHART
  767. ::::_PG_ANALYZEPIE
  768. #include \<pgchart.h>
  769. short _FAR _pg_analyzepie( chartenv _FAR *env,
  770.                char _FAR * _FAR *cat,
  771.                float _FAR *values,
  772.                short _FAR *explode, short n );
  773.  
  774. The _pg_analyzepie function analyzes a pie chart.  This function
  775. calculates default values for chart elements without actually
  776. displaying the chart.
  777.  
  778. The chart environment structure "env" is filled with default values
  779. based on the values of the "cat", "values" and "explode" arguments.
  780. The arguments are the same as for the _pg_chartpie function.
  781. ::::_PG_ANALYZESCATTER
  782. #include \<pgchart.h>
  783. short _FAR _pg_analyzescatter( chartenv _FAR *env,
  784.                    float _FAR *x,
  785.                    float _FAR *y, short n );
  786.  
  787. short _FAR _pg_analyzescatterms(
  788.               chartenv _FAR *env,
  789.               float _FAR *x, float _FAR *y,
  790.               short nseries, short n, short dim,
  791.               char _FAR * _FAR *labels );
  792.  
  793. The _pg_analyzescatter functions analyze either a single-series or a
  794. multi-series scatter chart.  These functions calculate default values
  795. for chart elements without actually displaying the chart.
  796.  
  797. The _pg_analyzescatter function analyzes a single-series scatter
  798. chart.    The chart environment structure "env" is filled with default
  799. values based on the values of the "x" and "y" arguments.  The
  800. arguments are the same as for the _pg_chartscatter function.
  801.  
  802. The _pg_analyzescatter_w function analyzes a multi-series scatter
  803. chart.    The chart environment structure "env" is filled with default
  804. values based on the values of the "x", "y" and "labels" arguments.
  805. The arguments are the same as for the _pg_chartscatterms function.
  806. ::::_PG_ANALYZESCATTERMS
  807.  ->_PG_ANALYZESCATTER
  808. ::::_PG_CHART
  809. #include \<pgchart.h>
  810. short _FAR _pg_chart( chartenv _FAR *env,
  811.               char _FAR * _FAR *cat,
  812.               float _FAR *values, short n );
  813.  
  814. short _FAR _pg_chartms( chartenv _FAR *env,
  815.             char _FAR * _FAR *cat,
  816.             float _FAR *values, short nseries,
  817.             short n, short dim,
  818.             char _FAR * _FAR *labels );
  819.  
  820. The _pg_chart functions display either a single-series or a
  821. multi-series bar, column or line chart.  The type of chart displayed
  822. and other chart options are contained in the "env" argument.  The
  823. argument "cat" is an array of strings.    These strings describe the
  824. categories against which the data in the "values" array is charted.
  825.  
  826. The _pg_chart function displays a bar, column or line chart from the
  827. single series of data contained in the "values" array.    The argument
  828. "n" specifies the number of values to chart.
  829.  
  830. The _pg_chart_w function displays a multi-series bar, column or line
  831. chart.    The argument "nseries" specifies the number of series of data
  832. to chart.  The argument "values" is assumed to be a two-dimensional
  833. array defined as follows:
  834.  
  835. float values[ nseries ][ dim ];
  836.  
  837. The number of values used from each series is given by the argument
  838. "n", where "n" is less than or equal to "dim". The argument "labels"
  839. is an array of strings.  These strings describe each of the series and
  840. are used in the chart legend.
  841. ::::_PG_CHARTMS
  842.  ->_PG_CHART
  843. ::::_PG_CHARTPIE
  844. #include \<pgchart.h>
  845. short _FAR _pg_chartpie( chartenv _FAR *env,
  846.              char _FAR * _FAR *cat,
  847.              float _FAR *values,
  848.              short _FAR *explode, short n );
  849.  
  850. The _pg_chartpie function displays a pie chart.  The chart is
  851. displayed using the options specified in the "env" argument.
  852.  
  853. The pie chart is created from the data contained in the "values"
  854. array.    The argument "n" specifies the number of values to chart.
  855.  
  856. The argument "cat" is an array of strings.  These strings describe
  857. each of the pie slices and are used in the chart legend.  The argument
  858. "explode" is an array of values corresponding to each of the pie
  859. slices.  For each non-zero element in the array, the corresponding pie
  860. slice is drawn "exploded", or slightly offset from the rest of the
  861. pie.
  862. ::::_PG_CHARTSCATTER
  863. #include \<pgchart.h>
  864. short _FAR _pg_chartscatter( chartenv _FAR *env,
  865.                  float _FAR *x,
  866.                  float _FAR *y, short n );
  867.  
  868. short _FAR _pg_chartscatterms( chartenv _FAR *env,
  869.                    float _FAR *x,
  870.                    float _FAR *y,
  871.                    short nseries,
  872.                    short n, short dim,
  873.                    char _FAR * _FAR *labels );
  874.  
  875. The _pg_chartscatter functions display either a single-series or a
  876. multi-series scatter chart.  The chart is displayed using the options
  877. specified in the "env" argument.
  878.  
  879. The _pg_chartscatter function displays a scatter chart from the single
  880. series of data contained in the arrays "x" and "y". The argument "n"
  881. specifies the number of values to chart.
  882.  
  883. The _pg_chartscatter_w function displays a multi-series scatter chart.
  884. The argument "nseries" specifies the number of series of data to
  885. chart.    The arguments "x" and "y" are assumed to be two-dimensional
  886. arrays defined as follows:
  887.  
  888. float x[ nseries ][ dim ];
  889.  
  890. The number of values used from each series is given by the argument
  891. "n", where "n" is less than or equal to "dim". The argument "labels"
  892. is an array of strings.  These strings describe each of the series and
  893. are used in the chart legend.
  894. ::::_PG_CHARTSCATTERMS
  895.  ->_PG_CHARTSCATTER
  896. ::::_PG_DEFAULTCHART
  897. #include \<pgchart.h>
  898. short _FAR _pg_defaultchart( chartenv _FAR *env,
  899.                  short type, short style );
  900.  
  901. The _pg_defaultchart function initializes the chart structure "env" to
  902. contain default values before a chart is drawn.  All values in the
  903. chart structure are initialized, including blanking of all titles.
  904. The chart type in the structure is initialized to the value "type",
  905. and the chart style is initialized to "style".
  906.  
  907. The argument "type" can have one of the following values:
  908.  
  909. _PG_BARCHART        Bar chart (horizontal bars)
  910. _PG_COLUMNCHART     Column chart (vertical bars)
  911. _PG_LINECHART        Line chart
  912. _PG_SCATTERCHART    Scatter chart
  913. _PG_PIECHART        Pie chart
  914.  
  915. Each type of chart can be drawn in one of two styles.  For each chart
  916. type the argument "style" can have one of the following values:
  917.  
  918. Type        Style 1         Style 2
  919.  
  920. Bar        _PG_PLAINBARS        _PG_STACKEDBARS
  921. Column        _PG_PLAINBARS        _PG_STACKEDBARS
  922. Line        _PG_POINTANDLINE    _PG_POINTONLY
  923. Scatter     _PG_POINTANDLINE    _PG_POINTONLY
  924. Pie        _PG_PERCENT        _PG_NOPERCENT
  925.  
  926. For single-series bar and column charts, the chart style is ignored.
  927. The "plain" (clustered) and "stacked" styles only apply when there is
  928. more than one series of data.  The "percent" style for pie charts
  929. causes percentages to be displayed beside each of the pie slices.
  930. ::::_PG_GETCHARDEF
  931. #include \<pgchart.h>
  932. short _FAR _pg_getchardef( short ch,
  933.                unsigned char _FAR *def );
  934.  
  935. The _pg_getchardef function retrieves the current bit-map definition
  936. for the character "ch". The bit-map is placed in the array "def". The
  937. current font must be an 8-by-8 bit-mapped font.
  938. ::::_PG_GETPALETTE
  939. #include \<pgchart.h>
  940. short _FAR _pg_getpalette( paletteentry _FAR *pal );
  941.  
  942. The _pg_getpalette function retrieves the internal palette of the
  943. presentation graphics system.  The palette controls the colors, line
  944. styles, fill patterns and plot characters used to display each series
  945. of data in a chart.
  946.  
  947. The argument "pal" is an array of palette structures that will contain
  948. the palette.  Each element of the palette is a structure containing
  949. the following fields:
  950.  
  951. color           color used to display series
  952. style           line style used for line and scatter charts
  953. fill           fill pattern used to fill interior of bar and pie
  954.            sections
  955. plotchar       character plotted on line and scatter charts
  956. ::::_PG_GETSTYLESET
  957. #include \<pgchart.h>
  958. void _FAR _pg_getstyleset( unsigned short _FAR *style );
  959.  
  960. The _pg_getstyleset function retrieves the internal style-set of the
  961. presentation graphics system.  The style-set is a set of line styles
  962. used for drawing window borders and grid-lines.  The argument "style"
  963. is an array that will contain the style-set.
  964. ::::_PG_HLABELCHART
  965. #include \<pgchart.h>
  966. short _FAR _pg_hlabelchart( chartenv _FAR *env,
  967.                 short x, short y,
  968.                 short color,
  969.                 char _FAR *label );
  970.  
  971. The _pg_hlabelchart function displays the text string "label" on the
  972. chart described by the "env" chart structure.  The string is displayed
  973. horizontally starting at the point (x,y), relative to the upper left
  974. corner of the chart.  The "color" specifies the palette color used to
  975. display the string.
  976. ::::_PG_INITCHART
  977. #include \<pgchart.h>
  978. short _FAR _pg_initchart( void );
  979.  
  980. The _pg_initchart function initializes the presentation graphics
  981. system.  This includes initializing the internal palette and style-set
  982. used when drawing charts.  This function must be called before any of
  983. the other presentation graphics functions.
  984.  
  985. The initialization of the presentation graphics system requires that a
  986. valid graphics mode has been selected.    For this reason the
  987. _setvideomode function must be called before _pg_initchart is called.
  988. If a font has been selected (with the _setfont function), that font
  989. will be used when text is displayed in a chart.  Font selection should
  990. also be done before initializing the presentation graphics system.
  991. ::::_PG_RESETPALETTE
  992. #include \<pgchart.h>
  993. short _FAR _pg_resetpalette( void );
  994.  
  995. The _pg_resetpalette function resets the internal palette of the
  996. presentation graphics system to default values.  The palette controls
  997. the colors, line styles, fill patterns and plot characters used to
  998. display each series of data in a chart.  The default palette chosen is
  999. dependent on the current video mode.
  1000. ::::_PG_RESETSTYLESET
  1001. #include \<pgchart.h>
  1002. void _FAR _pg_resetstyleset( void );
  1003.  
  1004. The _pg_resetstyleset function resets the internal style-set of the
  1005. presentation graphics system to default values.  The style-set is a
  1006. set of line styles used for drawing window borders and grid-lines.
  1007. ::::_PG_SETCHARDEF
  1008. #include \<pgchart.h>
  1009. short _FAR _pg_setchardef( short ch,
  1010.                unsigned char _FAR *def );
  1011.  
  1012. The _pg_setchardef function sets the current bit-map definition for
  1013. the character "ch". The bit-map is contained in the array "def". The
  1014. current font must be an 8-by-8 bit-mapped font.
  1015. ::::_PG_SETPALETTE
  1016. #include \<pgchart.h>
  1017. short _FAR _pg_setpalette( paletteentry _FAR *pal );
  1018.  
  1019. The _pg_setpalette function sets the internal palette of the
  1020. presentation graphics system.  The palette controls the colors, line
  1021. styles, fill patterns and plot characters used to display each series
  1022. of data in a chart.
  1023.  
  1024. The argument "pal" is an array of palette structures containing the
  1025. new palette.  Each element of the palette is a structure containing
  1026. the following fields:
  1027.  
  1028. color           color used to display series
  1029. style           line style used for line and scatter charts
  1030. fill           fill pattern used to fill interior of bar and pie
  1031.            sections
  1032. plotchar       character plotted on line and scatter charts
  1033. ::::_PG_SETSTYLESET
  1034. #include \<pgchart.h>
  1035. void _FAR _pg_setstyleset( unsigned short _FAR *style );
  1036.  
  1037. The _pg_setstyleset function retrieves the internal style-set of the
  1038. presentation graphics system.  The style-set is a set of line styles
  1039. used for drawing window borders and grid-lines.  The argument "style"
  1040. is an array containing the new style-set.
  1041. ::::_PG_VLABELCHART
  1042. #include \<pgchart.h>
  1043. short _FAR _pg_vlabelchart( chartenv _FAR *env,
  1044.                 short x, short y,
  1045.                 short color,
  1046.                 char _FAR *label );
  1047.  
  1048. The _pg_vlabelchart function displays the text string "label" on the
  1049. chart described by the "env" chart structure.  The string is displayed
  1050. vertically starting at the point (x,y), relative to the upper left
  1051. corner of the chart.  The "color" specifies the palette color used to
  1052. display the string.
  1053. ::::_PIE
  1054. #include \<graph.h>
  1055. short _FAR _pie( short fill, short x1, short y1,
  1056.                  short x2, short y2,
  1057.                  short x3, short y3,
  1058.                  short x4, short y4 );
  1059.  
  1060. short _FAR _pie_w( short fill, double x1, double y1,
  1061.                    double x2, double y2,
  1062.                    double x3, double y3,
  1063.                    double x4, double y4 );
  1064.  
  1065. short _FAR _pie_wxy( short fill,
  1066.              struct _wxycoord _FAR *p1,
  1067.              struct _wxycoord _FAR *p2,
  1068.              struct _wxycoord _FAR *p3,
  1069.              struct _wxycoord _FAR *p4 );
  1070.  
  1071. The _pie functions draw pie-shaped wedges.  The _pie function uses the
  1072. view coordinate system.  The _pie_w and _pie_wxy functions use the
  1073. window coordinate system.
  1074.  
  1075. The pie wedges are drawn by drawing an elliptical arc (in the way
  1076. described for the _arc functions) and then joining the center of the
  1077. rectangle that contains the ellipse to the two endpoints of the arc.
  1078.  
  1079. The elliptical arc is drawn with its center at the center of the
  1080. rectangle established by the points (x1,y1) and (x2,y2).  The arc is a
  1081. segment of the ellipse drawn within this bounding rectangle.  The arc
  1082. starts at the point on this ellipse that intersects the vector from
  1083. the centre of the ellipse to the point (x3,y3).  The arc ends at the
  1084. point on this ellipse that intersects the vector from the centre of
  1085. the ellipse to the point (x4,y4).  The arc is drawn in a
  1086. counter-clockwise direction with the current plot action using the
  1087. current color and the current line style.
  1088.  
  1089. When the coordinates (x1,y1) and (x2,y2) establish a line or a point
  1090. (this happens when one or more of the x-coordinates or y-coordinates
  1091. are equal), nothing is drawn.
  1092.  
  1093. The argument "fill" determines whether the figure is filled in or has
  1094. only its outline drawn.  The argument can have one of two values:
  1095.  
  1096. _GFILLINTERIOR fill the interior by writing pixels with the current
  1097.            plot action using the current color and the current
  1098.            fill mask
  1099. _GBORDER       leave the interior unchanged; draw the outline of the
  1100.            figure with the current plot action using the current
  1101.            color and line style
  1102. ::::_PIE_W
  1103.  ->_PIE
  1104. ::::_PIE_WXY
  1105.  ->_PIE
  1106. ::::_POLYGON
  1107. #include \<graph.h>
  1108. short _FAR _polygon( short fill, short numpts,
  1109.              struct xycoord _FAR *points );
  1110.  
  1111. short _FAR _polygon_w( short fill, short numpts,
  1112.                double _FAR *points );
  1113.  
  1114. short _FAR _polygon_wxy( short fill, short numpts,
  1115.              struct _wxycoord _FAR *points );
  1116.  
  1117. The _polygon functions draw polygons.  The _polygon function uses the
  1118. view coordinate system.  The _polygon_w and _polygon_wxy functions use
  1119. the window coordinate system.
  1120.  
  1121. The polygon is defined as containing "numpts" points whose coordinates
  1122. are given in the array "points".
  1123.  
  1124. The argument "fill" determines whether the polygon is filled in or has
  1125. only its outline drawn.  The argument can have one of two values:
  1126.  
  1127. _GFILLINTERIOR fill the interior by writing pixels with the current
  1128.            plot action using the current color and the current
  1129.            fill mask
  1130. _GBORDER       leave the interior unchanged; draw the outline of the
  1131.            figure with the current plot action using the current
  1132.            color and line style
  1133. ::::_POLYGON_W
  1134.  ->_POLYGON
  1135. ::::_POLYGON_WXY
  1136.  ->_POLYGON
  1137. ::::_PUTIMAGE
  1138. #include \<graph.h>
  1139. void _FAR _putimage( short x, short y,
  1140.              char _HUGE *image, short mode );
  1141.  
  1142. void _FAR _putimage_w( double x, double y,
  1143.                char _HUGE *image, short mode );
  1144.  
  1145. The _putimage functions display the screen image indicated by the
  1146. argument "image". The _putimage function uses the view coordinate
  1147. system.  The _putimage_w function uses the window coordinate system.
  1148.  
  1149. The image is displayed upon the screen with its top left corner
  1150. located at the point with coordinates (x,y).  The image was previously
  1151. saved using the _getimage functions.  The image is displayed in a
  1152. rectangle whose size is the size of the rectangular image saved by the
  1153. _getimage functions.
  1154.  
  1155. The image can be displayed in a number of ways, depending upon the
  1156. value of the "mode" argument.  This argument can have the following
  1157. values:
  1158.  
  1159. _GPSET           replace the rectangle on the screen by the saved image
  1160. _GPRESET       replace the rectangle on the screen with the pixel
  1161.            values of the saved image inverted; this produces a
  1162.            negative image
  1163. _GAND           produce a new image on the screen by ANDing together
  1164.            the pixel values from the screen with those from the
  1165.            saved image
  1166. _GOR           produce a new image on the screen by ORing together the
  1167.            pixel values from the screen with those from the saved
  1168.            image
  1169. _GXOR           produce a new image on the screen by exclusive ORing
  1170.            together the pixel values from the screen with those
  1171.            from the saved image; the original screen is restored
  1172.            by two successive calls to the _putimage function with
  1173.            this value, providing an efficient method to produce
  1174.            animated effects
  1175. ::::_PUTIMAGE_W
  1176.  ->_PUTIMAGE
  1177. ::::_RECTANGLE
  1178. #include \<graph.h>
  1179. short _FAR _rectangle( short fill,
  1180.                short x1, short y1,
  1181.                short x2, short y2 );
  1182.  
  1183. short _FAR _rectangle_w( short fill,
  1184.              double x1, double y1,
  1185.              double x2, double y2 );
  1186.  
  1187. short _FAR _rectangle_wxy( short fill,
  1188.                struct _wxycoord _FAR *p1,
  1189.                struct _wxycoord _FAR *p2 );
  1190.  
  1191. The _rectangle functions draw rectangles.  The _rectangle function
  1192. uses the view coordinate system.  The _rectangle_w and _rectangle_wxy
  1193. functions use the window coordinate system.
  1194.  
  1195. The rectangle is defined with opposite corners established by the
  1196. points (x1,y1) and (x2,y2).
  1197.  
  1198. The argument "fill" determines whether the rectangle is filled in or
  1199. has only its outline drawn.  The argument can have one of two values:
  1200.  
  1201. _GFILLINTERIOR fill the interior by writing pixels with the current
  1202.            plot action using the current color and the current
  1203.            fill mask
  1204. _GBORDER       leave the interior unchanged; draw the outline of the
  1205.            figure with the current plot action using the current
  1206.            color and line style
  1207. ::::_RECTANGLE_W
  1208.  ->_RECTANGLE
  1209. ::::_RECTANGLE_WXY
  1210.  ->_RECTANGLE
  1211. ::::_REGISTERFONTS
  1212. #include \<graph.h>
  1213. short _FAR _registerfonts( char _FAR *path );
  1214.  
  1215. The _registerfonts function initializes the font graphics system.
  1216. Fonts must be registered, and a font selected, before text can be
  1217. displayed with the _outgtext function.
  1218.  
  1219. The argument "path" specifies the location of the font files.  This
  1220. argument is a DOS file specification, and can contain drive and
  1221. directory components and may contain wildcard characters.  The
  1222. _registerfonts function opens each of the font files specified and
  1223. reads the font information.  Memory is allocated to store the
  1224. characteristics of the font.  These font characteristics are used by
  1225. the _setfont function when selecting a font.
  1226. ::::_REMAPALLPALETTE
  1227. #include \<graph.h>
  1228. short _FAR _remapallpalette( long _FAR *colors );
  1229.  
  1230. The _remapallpalette function sets (or remaps) all of the colors in
  1231. the palette.  The color values in the palette are replaced by the
  1232. array of color values given by the argument "colors". This function is
  1233. supported in all video modes, but only works with EGA, MCGA and VGA
  1234. adapters.
  1235.  
  1236. The array "colors" must contain at least as many elements as there are
  1237. supported colors.  The newly mapped palette will cause the complete
  1238. screen to change color wherever there is a pixel value of a changed
  1239. color in the palette.
  1240.  
  1241. The representation of colors depends upon the hardware being used.
  1242. The number of colors in the palette can be determined by using the
  1243. _getvideoconfig function.
  1244. ::::_REMAPPALETTE
  1245. #include \<graph.h>
  1246. long _FAR _remappalette( short pixval, long color );
  1247.  
  1248. The _remappalette function sets (or remaps) the palette color "pixval"
  1249. to be the color "color". This function is supported in all video
  1250. modes, but only works with EGA, MCGA and VGA adapters.
  1251.  
  1252. The argument "pixval" is an index in the color palette of the current
  1253. video mode.  The argument "color" specifies the actual color displayed
  1254. on the screen by pixels with pixel value "pixval". Color values are
  1255. selected by specifying the red, green and blue intensities that make
  1256. up the color.  Each intensity can be in the range from 0 to 63,
  1257. resulting in 262144 possible different colors.    A given color value
  1258. can be conveniently specified as a value of type long.    The color
  1259. value is of the form 0x00bbggrr, where bb is the blue intensity, gg is
  1260. the green intensity and rr is the red intensity of the selected color.
  1261. The file graph.h defines constants containing the color intensities of
  1262. each of the 16 default colors.
  1263.  
  1264. The _remappalette function takes effect immediately.  All pixels on
  1265. the complete screen which have a pixel value equal to the value of
  1266. "pixval" will now have the color indicated by the argument "color".
  1267. ::::_SCROLLTEXTWINDOW
  1268. #include \<graph.h>
  1269. void _FAR _scrolltextwindow( short rows );
  1270.  
  1271. The _scrolltextwindow function scrolls the lines in the current text
  1272. window.  A text window is defined with the _settextwindow function.
  1273. By default, the text window is the entire screen.
  1274.  
  1275. The argument "rows" specifies the number of rows to scroll.  A
  1276. positive value means to scroll the text window up or towards the top
  1277. of the screen.    A negative value means to scroll the text window down
  1278. or towards the bottom of the screen.  Specifying a number of rows
  1279. greater than the height of the text window is equivalent to clearing
  1280. the text window with the _clearscreen function.
  1281.  
  1282. Two constants are defined that can be used with the _scrolltextwindow
  1283. function:
  1284.  
  1285. _GSCROLLUP     the contents of the text window are scrolled up
  1286.            (towards the top of the screen) by one row
  1287. _GSCROLLDOWN   the contents of the text window are scrolled down
  1288.            (towards the bottom of the screen) by one row
  1289. ::::_SELECTPALETTE
  1290. #include \<graph.h>
  1291. short _FAR _selectpalette( short palnum );
  1292.  
  1293. The _selectpalette function selects the palette indicated by the
  1294. argument "palnum" from the color palettes available.  This function is
  1295. only supported by the video modes _MRES4COLOR and _MRESNOCOLOR.
  1296.  
  1297. Mode _MRES4COLOR supports four palettes of four colors.  In each
  1298. palette, color 0, the background color, can be any of the 16 possible
  1299. colors.  The color values associated with the other three pixel
  1300. values, (1, 2 and 3), are determined by the selected palette.
  1301.  
  1302. The following table outlines the available color palettes:
  1303.  
  1304. Palette          Pixel Values
  1305. Number      1          2          3
  1306.  
  1307.    0     green         red         brown
  1308.    1     cyan         magenta     white
  1309.    2     light green     light red     yellow
  1310.    3     light cyan     light magenta     bright white
  1311. ::::_SETACTIVEPAGE
  1312. #include \<graph.h>
  1313. short _FAR _setactivepage( short pagenum );
  1314.  
  1315. The _setactivepage function selects the page (in memory) to which
  1316. graphics output is written.  The page to be selected is given by the
  1317. "pagenum" argument.
  1318.  
  1319. Only some combinations of video modes and hardware allow multiple
  1320. pages of graphics to exist.  When multiple pages are supported, the
  1321. active page may differ from the visual page.  The graphics information
  1322. in the visual page determines what is displayed upon the screen.
  1323. Animation may be accomplished by alternating the visual page.  A
  1324. graphics page can be constructed without affecting the screen by
  1325. setting the active page to be different than the visual page.
  1326.  
  1327. The number of available video pages can be determined by using the
  1328. _getvideoconfig function.  The default video page is 0.
  1329. ::::_SETBKCOLOR
  1330. #include \<graph.h>
  1331. long _FAR _setbkcolor( long color );
  1332.  
  1333. The _setbkcolor function sets the current background color to be that
  1334. of the "color" argument.  In text modes, the background color controls
  1335. the area behind each individual character.  In graphics modes, the
  1336. background refers to the entire screen.  The default background color
  1337. is 0.
  1338.  
  1339. When the current video mode is a graphics mode, any pixels with a zero
  1340. pixel value will change to the color of the "color" argument.  When
  1341. the current video mode is a text mode, nothing will immediately
  1342. change; only subsequent output is affected.
  1343. ::::_SETCHARSIZE
  1344. #include \<graph.h>
  1345. void _FAR _setcharsize( short height, short width );
  1346.  
  1347. void _FAR _setcharsize_w( double height, double width );
  1348.  
  1349. The _setcharsize functions set the character height and width to the
  1350. values specified by the arguments "height" and "width". For the
  1351. _setcharsize function, the arguments "height" and "width" represent a
  1352. number of pixels.  For the _setcharsize_w function, the arguments
  1353. "height" and "width" represent lengths along the y-axis and x-axis in
  1354. the window coordinate system.
  1355.  
  1356. These sizes are used when displaying text with the _grtext function.
  1357. The default character sizes are dependent on the graphics mode
  1358. selected, and can be determined by the _gettextsettings function.
  1359. ::::_SETCHARSIZE_W
  1360.  ->_SETCHARSIZE
  1361. ::::_SETCHARSPACING
  1362. #include \<graph.h>
  1363. void _FAR _setcharspacing( short space );
  1364.  
  1365. void _FAR _setcharspacing_w( double space );
  1366.  
  1367. The _setcharspacing functions set the current character spacing to
  1368. have the value of the argument "space". For the _setcharspacing
  1369. function, "space" represents a number of pixels.  For the
  1370. _setcharspacing_w function, "space" represents a length along the
  1371. x-axis in the window coordinate system.
  1372.  
  1373. The character spacing specifies the additional space to leave between
  1374. characters when a text string is displayed with the _grtext function.
  1375. A negative value can be specified to cause the characters to be drawn
  1376. closer together.  The default value of the character spacing is 0.
  1377. ::::_SETCHARSPACING_W
  1378.  ->_SETCHARSPACING
  1379. ::::_SETCLIPRGN
  1380. #include \<graph.h>
  1381. void _FAR _setcliprgn( short x1, short y1,
  1382.                short x2, short y2 );
  1383.  
  1384. The _setcliprgn function restricts the display of graphics output to
  1385. the clipping region.  This region is a rectangle whose opposite
  1386. corners are established by the physical points (x1,y1) and (x2,y2).
  1387.  
  1388. The _setcliprgn function does not affect text output using the
  1389. _outtext and _outmem functions.  To control the location of text
  1390. output, see the _settextwindow function.
  1391. ::::_SETCOLOR
  1392. #include \<graph.h>
  1393. short _FAR _setcolor( short pixval );
  1394.  
  1395. The _setcolor function sets the pixel value for the current color to
  1396. be that indicated by the "pixval" argument.  The current color is only
  1397. used by the functions that produce graphics output; text output with
  1398. _outtext uses the current text color (see the _settextcolor function).
  1399. The default color value is one less than the maximum number of colors
  1400. in the current video mode.
  1401. ::::_SETFILLMASK
  1402. #include \<graph.h>
  1403. void _FAR _setfillmask( char _FAR *mask );
  1404.  
  1405. The _setfillmask function sets the current fill mask to the value of
  1406. the argument "mask". When the value of the "mask" argument is NULL,
  1407. there will be no fill mask set.
  1408.  
  1409. The fill mask is an eight-byte array which is interpreted as a square
  1410. pattern (8 by 8) of 64 bits.  Each bit in the mask corresponds to a
  1411. pixel.    When a region is filled, each point in the region is mapped
  1412. onto the fill mask.  When a bit from the mask is one, the pixel value
  1413. of the corresponding point is set using the current plotting action
  1414. with the current color; when the bit is zero, the pixel value of that
  1415. point is not affected.
  1416.  
  1417. When the fill mask is not set, a fill operation will set all points in
  1418. the fill region to have a pixel value of the current color.  By
  1419. default, no fill mask is set.
  1420. ::::_SETFONT
  1421. #include \<graph.h>
  1422. short _FAR _setfont( char _FAR *opt );
  1423.  
  1424. The _setfont function selects a font from the list of registered fonts
  1425. (see the _registerfonts function).  The font selected becomes the
  1426. current font and is used whenever text is displayed with the _outgtext
  1427. function.  The function will fail if no fonts have been registered, or
  1428. if a font cannot be found that matches the given characteristics.
  1429.  
  1430. The argument "opt" is a string of characters specifying the
  1431. characteristics of the desired font.  These characteristics determine
  1432. which font is selected.  The options may be separated by blanks and
  1433. are not case-sensitive.  Any number of options may be specified and in
  1434. any order.  The available options are:
  1435.  
  1436. hX           character height X (in pixels)
  1437. wX           character width X (in pixels)
  1438. f           choose a fixed-width font
  1439. p           choose a proportional-width font
  1440. r           choose a raster (bit-mapped) font
  1441. v           choose a vector font
  1442. b           choose the font that best matches the options
  1443. nX           choose font number X (the number of fonts is returned
  1444.            by the _registerfonts function)
  1445. t'facename'    choose a font with specified facename
  1446.  
  1447. The facename option is specified as a "t" followed by a facename
  1448. enclosed in single quotes.  The available facenames are:
  1449.  
  1450. Courier        fixed-width raster font with serifs
  1451. Helv           proportional-width raster font without serifs
  1452. Tms Rmn        proportional-width raster font with serifs
  1453. Script           proportional-width vector font that appears similar to
  1454.            hand-writing
  1455. Modern           proportional-width vector font without serifs
  1456. Roman           proportional-width vector font with serifs
  1457.  
  1458. When "nX" is specified to select a particular font, the other options
  1459. are ignored.
  1460.  
  1461. If the best fit option ("b") is specified, _setfont will always be
  1462. able to select a font.    The font chosen will be the one that best
  1463. matches the options specified.    The following precedence is given to
  1464. the options when selecting a font:
  1465.  
  1466. 1.  Pixel height (higher precedence is given to heights less than the
  1467.     specified height)
  1468.  
  1469. 2.  Facename
  1470.  
  1471. 3.  Pixel width
  1472.  
  1473. 4.  Font type (fixed or proportional)
  1474.  
  1475. When a pixel height or width does not match exactly and a vector font
  1476. has been selected, the font will be stretched appropriately to match
  1477. the given size.
  1478. ::::_SETGTEXTVECTOR
  1479. #include \<graph.h>
  1480. struct xycoord _FAR _setgtextvector( short x, short y );
  1481.  
  1482. The _setgtextvector function sets the orientation for text output used
  1483. by the _outgtext function to the vector specified by the arguments
  1484. (x,y).    Each of the arguments can have a value of -1, 0 or 1, allowing
  1485. for text to be displayed at any multiple of a 45-degree angle.    The
  1486. default text orientation, for normal left-to-right text, is the vector
  1487. (1,0).
  1488. ::::_SETLINESTYLE
  1489. #include \<graph.h>
  1490. void _FAR _setlinestyle( unsigned short style );
  1491.  
  1492. The _setlinestyle function sets the current line-style mask to the
  1493. value of the "style" argument.
  1494.  
  1495. The line-style mask determines the style by which lines and arcs are
  1496. drawn.    The mask is treated as an array of 16 bits.  As a line is
  1497. drawn, a pixel at a time, the bits in this array are cyclically
  1498. tested.  When a bit in the array is 1, the pixel value for the current
  1499. point is set using the current color according to the current plotting
  1500. action; otherwise, the pixel value for the point is left unchanged.  A
  1501. solid line would result from a value of 0xFFFF and a dashed line would
  1502. result from a value of 0xF0F0
  1503.  
  1504. The default line style mask is 0xFFFF.
  1505. ::::_SETPIXEL
  1506. #include \<graph.h>
  1507. short _FAR _setpixel( short x, short y );
  1508.  
  1509. short _FAR _setpixel_w( double x, double y );
  1510.  
  1511. The _setpixel function sets the pixel value of the point (x,y) using
  1512. the current plotting action with the current color.  The _setpixel
  1513. function uses the view coordinate system.  The _setpixel_w function
  1514. uses the window coordinate system.
  1515.  
  1516. A pixel value is associated with each point.  The values range from 0
  1517. to the number of colors (less one) that can be represented in the
  1518. palette for the current video mode.  The color displayed at the point
  1519. is the color in the palette corresponding to the pixel number.    For
  1520. example, a pixel value of 3 causes the fourth color in the palette to
  1521. be displayed at the point in question.
  1522. ::::_SETPIXEL_W
  1523.  ->_SETPIXEL
  1524. ::::_SETPLOTACTION
  1525. #include \<graph.h>
  1526. short _FAR _setplotaction( short action );
  1527.  
  1528. The _setplotaction function sets the current plotting action to the
  1529. value of the "action" argument.
  1530.  
  1531. The drawing functions cause pixels to be set with a pixel value.  By
  1532. default, the value to be set is obtained by replacing the original
  1533. pixel value with the supplied pixel value.  Alternatively, the
  1534. replaced value may be computed as a function of the original and the
  1535. supplied pixel values.
  1536.  
  1537. The plotting action can have one of the following values:
  1538.  
  1539. _GPSET           replace the original screen pixel value with the
  1540.            supplied pixel value
  1541. _GAND           replace the original screen pixel value with the
  1542.            bitwise and of the original pixel value and the
  1543.            supplied pixel value
  1544. _GOR           replace the original screen pixel value with the
  1545.            bitwise or of the original pixel value and the supplied
  1546.            pixel value
  1547. _GXOR           replace the original screen pixel value with the
  1548.            bitwise exclusive-or of the original pixel value and
  1549.            the supplied pixel value.  Performing this operation
  1550.            twice will restore the original screen contents,
  1551.            providing an efficient method to produce animated
  1552.            effects.
  1553. ::::_SETTEXTALIGN
  1554. #include \<graph.h>
  1555. void _FAR _settextalign( short horiz, short vert );
  1556.  
  1557. The _settextalign function sets the current text alignment to the
  1558. values specified by the arguments "horiz" and "vert". When text is
  1559. displayed with the _grtext function, it is aligned (justified)
  1560. horizontally and vertically about the given point according to the
  1561. current text alignment settings.
  1562.  
  1563. The horizontal component of the alignment can have one of the
  1564. following values:
  1565.  
  1566. _NORMAL        use the default horizontal alignment for the current
  1567.            setting of the text path
  1568. _LEFT           the text string is left justified at the given point
  1569. _CENTER        the text string is centred horizontally about the given
  1570.            point
  1571. _RIGHT           the text string is right justified at the given point
  1572.  
  1573. The vertical component of the alignment can have one of the following
  1574. values:
  1575.  
  1576. _NORMAL        use the default vertical alignment for the current
  1577.            setting of the text path
  1578. _TOP           the top of the text string is aligned at the given
  1579.            point
  1580. _CAP           the cap line of the text string is aligned at the given
  1581.            point
  1582. _HALF           the text string is centred vertically about the given
  1583.            point
  1584. _BASE           the base line of the text string is aligned at the
  1585.            given point
  1586. _BOTTOM        the bottom of the text string is aligned at the given
  1587.            point
  1588.  
  1589. The default is to use _LEFT alignment for the horizontal component
  1590. unless the text path is _PATH_LEFT, in which case _RIGHT alignment is
  1591. used.  The default value for the vertical component is _TOP unless the
  1592. text path is _PATH_UP, in which case _BOTTOM alignment is used.
  1593. ::::_SETTEXTCOLOR
  1594. #include \<graph.h>
  1595. short _FAR _settextcolor( short pixval );
  1596.  
  1597. The _settextcolor function sets the current text color to be the color
  1598. indicated by the pixel value of the "pixval" argument.    This is the
  1599. color value used for displaying text with the _outtext and _outmem
  1600. functions.  Use the _setcolor function to change the color of graphics
  1601. output.  The default text color value is set to 7 whenever a new video
  1602. mode is selected.
  1603.  
  1604. The pixel value "pixval" is a number in the range 0-31.  Colors in the
  1605. range 0-15 are displayed normally.  In text modes, blinking colors are
  1606. specified by adding 16 to the normal color values.  The following
  1607. table specifies the default colors in color text modes.
  1608.  
  1609. Pixel       Color    Pixel       Color
  1610. value            value
  1611.  
  1612.   0      Black       8      Gray
  1613.   1      Blue          9      Light Blue
  1614.   2      Green      10      Light Green
  1615.   3      Cyan         11      Light Cyan
  1616.   4      Red         12      Light Red
  1617.   5      Magenta     13      Light Magenta
  1618.   6      Brown      14      Yellow
  1619.   7      White      15      Bright White
  1620. ::::_SETTEXTCURSOR
  1621. #include \<graph.h>
  1622. short _FAR _settextcursor( short cursor );
  1623.  
  1624. The _settextcursor function sets the attribute, or shape, of the
  1625. cursor in text modes.  The cursor shape is set using the BIOS Set
  1626. Cursor Size function.  The argument "cursor" specifies the new cursor
  1627. shape.    The cursor shape is selected by specifying the top and bottom
  1628. rows in the character matrix.  The high byte of "cursor" specifies the
  1629. top row of the cursor; the low byte specifies the bottom row.
  1630.  
  1631. Some typical values for "cursor" are:
  1632.  
  1633. Cursor        Shape
  1634.  
  1635. 0x0607        normal underline cursor
  1636. 0x0007        full block cursor
  1637. 0x0407        half-height block cursor
  1638. 0x2000        no cursor
  1639. ::::_SETTEXTORIENT
  1640. #include \<graph.h>
  1641. void _FAR _settextorient( short vecx, short vecy );
  1642.  
  1643. The _settextorient function sets the current text orientation to the
  1644. vector specified by the arguments (vecx,vecy).    The text orientation
  1645. specifies the direction of the base-line vector when a text string is
  1646. displayed with the _grtext function.  The default text orientation,
  1647. for normal left-to-right text, is the vector (1,0).
  1648. ::::_SETTEXTPATH
  1649. #include \<graph.h>
  1650. void _FAR _settextpath( short path );
  1651.  
  1652. The _settextpath function sets the current text path to have the value
  1653. of the "path" argument.  The text path specifies the writing direction
  1654. of the text displayed by the _grtext function.    The argument can have
  1655. one of the following values:
  1656.  
  1657. _PATH_RIGHT    subsequent characters are drawn to the right of the
  1658.            previous character
  1659. _PATH_LEFT     subsequent characters are drawn to the left of the
  1660.            previous character
  1661. _PATH_UP       subsequent characters are drawn above the previous
  1662.            character
  1663. _PATH_DOWN     subsequent characters are drawn below the previous
  1664.            character
  1665.  
  1666. The default value of the text path is _PATH_RIGHT.
  1667. ::::_SETTEXTPOSITION
  1668. #include \<graph.h>
  1669. struct rccoord _FAR _settextposition( short row,
  1670.                       short col );
  1671.  
  1672. The _settextposition function sets the current output position for
  1673. text to be (row,col) where this position is in terms of characters,
  1674. not pixels.
  1675.  
  1676. The text position is relative to the current text window.  It defaults
  1677. to the top left corner of the screen, (1,1), when a new video mode is
  1678. selected, or when a new text window is set.  The position is updated
  1679. as text is drawn with the _outtext and _outmem functions.
  1680.  
  1681. Note that the output position for graphics output differs from that
  1682. for text output.  The output position for graphics output can be set
  1683. by use of the _moveto function.
  1684. ::::_SETTEXTROWS
  1685. #include \<graph.h>
  1686. short _FAR _settextrows( short rows );
  1687.  
  1688. The _settextrows function selects the number of rows of text displayed
  1689. on the screen.    The number of rows is specified by the argument
  1690. "rows". Computers equipped with EGA, MCGA and VGA adapters can support
  1691. different numbers of text rows.  The number of rows that can be
  1692. selected depends on the current video mode and the type of monitor
  1693. attached.
  1694.  
  1695. If the argument "rows" has the value "_MAXTEXTROWS", the maximum
  1696. number of text rows will be selected for the current video mode and
  1697. hardware configuration.  In text modes the maximum number of rows is
  1698. 43 for EGA adapters, and 50 for MCGA and VGA adapters.    Some graphics
  1699. modes will support 43 rows for EGA adapters and 60 rows for MCGA and
  1700. VGA adapters.
  1701. ::::_SETTEXTWINDOW
  1702. #include \<graph.h>
  1703. void _FAR _settextwindow( short row1, short col1,
  1704.               short row2, short col2 );
  1705.  
  1706. The _settextwindow function sets the text window to be the rectangle
  1707. with a top left corner at (row1,col1) and a bottom right corner at
  1708. (row2,col2).  These coordinates are in terms of characters not pixels.
  1709.  
  1710. The initial text output position is (1,1).  Subsequent text positions
  1711. are reported (by the _gettextposition function) and set (by the
  1712. _outtext, _outmem and _settextposition functions) relative to this
  1713. rectangle.
  1714.  
  1715. Text is displayed from the current output position for text proceeding
  1716. along the current row and then downwards.  When the window is full,
  1717. the lines scroll upwards one line and then text is displayed on the
  1718. last line of the window.
  1719. ::::_SETVIDEOMODE
  1720. #include \<graph.h>
  1721. short _FAR _setvideomode( short mode );
  1722.  
  1723. The _setvideomode function sets the video mode according to the value
  1724. of the "mode" argument.  The value of "mode" can be one of the
  1725. following:
  1726.  
  1727. Mode           Type    Size    Colors     Adapter
  1728.  
  1729. _MAXRESMODE   (graphics mode with highest resolution)
  1730. _MAXCOLORMODE (graphics mode with most colors)
  1731. _DEFAULTMODE  (restores screen to original mode)
  1732. _TEXTBW40      M,T    40 x 25     16   MDPA,HGC,VGA,SVGA
  1733. _TEXTC40       C,T    40 x 25     16   CGA,EGA,MCGA,VGA,SVGA
  1734. _TEXTBW80      M,T    80 x 25     16   MDPA,HGC,VGA,SVGA
  1735. _TEXTC80       C,T    80 x 25     16   CGA,EGA,MCGA,VGA,SVGA
  1736. _MRES4COLOR    C,G   320 x 200      4   CGA,EGA,MCGA,VGA,SVGA
  1737. _MRESNOCOLOR   C,G   320 x 200      4   CGA,EGA,MCGA,VGA,SVGA
  1738. _HRESBW        C,G   640 x 200      2   CGA,EGA,MCGA,VGA,SVGA
  1739. _TEXTMONO      M,T    80 x 25     16   MDPA,HGC,VGA,SVGA
  1740. _HERCMONO      M,G   720 x 350      2   HGC
  1741. _MRES16COLOR   C,G   320 x 200     16   EGA,VGA,SVGA
  1742. _HRES16COLOR   C,G   640 x 200     16   EGA,VGA,SVGA
  1743. _ERESNOCOLOR   M,G   640 x 350      4   EGA,VGA,SVGA
  1744. _ERESCOLOR     C,G   640 x 350    4/16  EGA,VGA,SVGA
  1745. _VRES2COLOR    C,G   640 x 480      2   MCGA,VGA,SVGA
  1746. _VRES16COLOR   C,G   640 x 480     16   VGA,SVGA
  1747. _MRES256COLOR  C,G   320 x 200    256   MCGA,VGA,SVGA
  1748. _URES256COLOR  C,G   640 x 400    256   SVGA
  1749. _VRES256COLOR  C,G   640 x 480    256   SVGA
  1750. _SVRES16COLOR  C,G   800 x 600     16   SVGA
  1751. _SVRES256COLOR C,G   800 x 600    256   SVGA
  1752. _XRES16COLOR   C,G  1024 x 768     16   SVGA
  1753. _XRES256COLOR  C,G  1024 x 768    256   SVGA
  1754.  
  1755. In the preceding table, the Type column contains the following
  1756. letters:
  1757.  
  1758.     M          indicates monochrome; multiple colors are shades of grey
  1759.     C          indicates color
  1760.     G          indicates graphics mode; size is in pixels
  1761.     T          indicates text mode; size is in columns and rows of
  1762.           characters
  1763.  
  1764. The Adapter column contains the following codes:
  1765.  
  1766.     MDPA      IBM Monochrome Display/Printer Adapter
  1767.     CGA       IBM Color Graphics Adapter
  1768.     EGA       IBM Enhanced Graphics Adapter
  1769.     VGA       IBM Video Graphics Array
  1770.     MCGA      IBM Multi-Color Graphics Array
  1771.     HGC       Hercules Graphics Adapter
  1772.     SVGA      SuperVGA adapters
  1773.  
  1774. The modes _MAXRESMODE and _MAXCOLORMODE will select from among the
  1775. video modes supported by the current graphics adapter the one that has
  1776. the highest resolution or the greatest number of colors.  The video
  1777. mode will be selected from the standard modes, not including the
  1778. SuperVGA modes.
  1779.  
  1780. Selecting a new video mode resets the current output positions for
  1781. graphics and text to be the top left corner of the screen.  The
  1782. background color is reset to black and the default color value is set
  1783. to be one less than the number of colors in the selected mode.
  1784. ::::_SETVIDEOMODEROWS
  1785. #include \<graph.h>
  1786. short _FAR _setvideomoderows( short mode, short rows );
  1787.  
  1788. The _setvideomoderows function selects a video mode and the number of
  1789. rows of text displayed on the screen.  The video mode is specified by
  1790. the argument "mode" and is selected with the _setvideomode function.
  1791. The number of rows is specified by the argument "rows" and is selected
  1792. with the _settextrows function.
  1793.  
  1794. Computers equipped with EGA, MCGA and VGA adapters can support
  1795. different numbers of text rows.  The number of rows that can be
  1796. selected depends on the video mode and the type of monitor attached.
  1797. ::::_SETVIEWORG
  1798. #include \<graph.h>
  1799. struct xycoord _FAR _setvieworg( short x, short y );
  1800.  
  1801. The _setvieworg function sets the origin of the view coordinate
  1802. system, (0,0), to be located at the physical point (x,y).  This causes
  1803. subsequently drawn images to be translated by the amount (x,y).
  1804.  
  1805. Note:  In previous versions of the software, the _setvieworg function
  1806. was called _setlogorg.
  1807. ::::_SETVIEWPORT
  1808. #include \<graph.h>
  1809. void _FAR _setviewport( short x1, short y1,
  1810.             short x2, short y2 );
  1811.  
  1812. The _setviewport function restricts the display of graphics output to
  1813. the clipping region and then sets the origin of the view coordinate
  1814. system to be the top left corner of the region.  This region is a
  1815. rectangle whose opposite corners are established by the physical
  1816. points (x1,y1) and (x2,y2).
  1817.  
  1818. The _setviewport function does not affect text output using the
  1819. _outtext and _outmem functions.  To control the location of text
  1820. output, see the _settextwindow function.
  1821. ::::_SETVISUALPAGE
  1822. #include \<graph.h>
  1823. short _FAR _setvisualpage( short pagenum );
  1824.  
  1825. The _setvisualpage function selects the page (in memory) from which
  1826. graphics output is displayed.  The page to be selected is given by the
  1827. "pagenum" argument.
  1828.  
  1829. Only some combinations of video modes and hardware allow multiple
  1830. pages of graphics to exist.  When multiple pages are supported, the
  1831. active page may differ from the visual page.  The graphics information
  1832. in the visual page determines what is displayed upon the screen.
  1833. Animation may be accomplished by alternating the visual page.  A
  1834. graphics page can be constructed without affecting the screen by
  1835. setting the active page to be different than the visual page.
  1836.  
  1837. The number of available video pages can be determined by using the
  1838. _getvideoconfig function.  The default video page is 0.
  1839. ::::_SETWINDOW
  1840. #include \<graph.h>
  1841. short _FAR _setwindow( short invert,
  1842.                double x1, double y1,
  1843.                double x2, double y2 );
  1844.  
  1845. The _setwindow function defines a window for the window coordinate
  1846. system.  Window coordinates are specified as a user-defined range of
  1847. values.  This allows for consistent pictures regardless of the video
  1848. mode.
  1849.  
  1850. The window is defined as the region with opposite corners established
  1851. by the points (x1,y1) and (x2,y2).  The argument "invert" specifies
  1852. the direction of the y-axis.  If the value is non-zero, the y values
  1853. increase from the bottom of the screen to the top, otherwise, the y
  1854. values increase as you move down the screen.
  1855.  
  1856. The window defined by the _setwindow function is displayed in the
  1857. current viewport.  A viewport is defined by the _setviewport function.
  1858.  
  1859. By default, the window coordinate system is defined with the point
  1860. (0.0,0.0) located at the lower left corner of the screen, and the
  1861. point (1.0,1.0) at the upper right corner.
  1862. ::::_UNREGISTERFONTS
  1863. #include \<graph.h>
  1864. void _FAR _unregisterfonts( void );
  1865.  
  1866. The _unregisterfonts function frees the memory previously allocated by
  1867. the _registerfonts function.  The currently selected font is also
  1868. unloaded.
  1869.  
  1870. Attempting to use the _setfont function after calling _unregisterfonts
  1871. will result in an error.
  1872. ::::_WRAPON
  1873. #include \<graph.h>
  1874. short _FAR _wrapon( short wrap );
  1875.  
  1876. The _wrapon function is used to control the display of text when the
  1877. text output reaches the right side of the text window.    This is text
  1878. displayed with the _outtext and _outmem functions.  The "wrap"
  1879. argument can take one of the following values:
  1880.  
  1881. _GWRAPON       causes lines to wrap at the window border
  1882. _GWRAPOFF      causes lines to be truncated at the window border
  1883. ::::ANALYZE
  1884.               Analyze Functions
  1885.               ═════════════════
  1886.  
  1887. These functions calculate default values for chart elements without
  1888. actually displaying the chart.    The functions ending with ms analyze
  1889. multi-series charts; the others analyze single-series charts.
  1890.  
  1891. The following functions are defined:
  1892.  
  1893. <_pg_analyzechart>     analyze a bar, column or line chart
  1894. <_pg_analyzechartms>     analyze a multi-series bar, column or line
  1895.              chart
  1896. <_pg_analyzepie>     analyze a pie chart
  1897. <_pg_analyzescatter>     analyze a scatter chart
  1898. <_pg_analyzescatterms>     analyze a multi-series scatter chart
  1899. ::::ATTRIBUTE
  1900.              Attribute Functions
  1901.              ═══════════════════
  1902.  
  1903. These functions control the display of graphical images such as lines
  1904. and circles.  Lines and figures are drawn using the current color (see
  1905. the _setcolor function), the current line style (see the _setlinestyle
  1906. function), the current fill mask (see the _setfillmask function), and
  1907. the current plotting action (see the _setplotaction function).
  1908.  
  1909. The following functions are defined:
  1910.  
  1911. <_getarcinfo>         get the endpoints of the most recently drawn
  1912.              arc
  1913. <_getbkcolor>         get the background color
  1914. <_getcolor>         get the current color
  1915. <_getfillmask>         get the current fill mask
  1916. <_getlinestyle>      get the current line style
  1917. <_getplotaction>     get the current plotting action
  1918. <_remapallpalette>     assign colors for all pixel values
  1919. <_remappalette>      assign color for one pixel value
  1920. <_selectpalette>     select a palette
  1921. <_setbkcolor>         set the background color
  1922. <_setcolor>         set the current color
  1923. <_setfillmask>         set the current fill mask
  1924. <_setlinestyle>      set the current line style
  1925. <_setplotaction>     set the current plotting action
  1926. ::::COORDINATE_SYSTEM
  1927.              Coordinate System Functions
  1928.              ═══════════════════════════
  1929.  
  1930. These functions deal with coordinate systems and mapping coordinates
  1931. from one system to another.  The WATCOM C Graphics Library supports
  1932. three coordinate systems:
  1933.  
  1934. 1.  Physical coordinates
  1935.  
  1936. 2.  View coordinates
  1937.  
  1938. 3.  Window coordinates
  1939.  
  1940. Physical coordinates match the physical dimensions of the screen.  The
  1941. physical origin, denoted (0,0), is located at the top left corner of
  1942. the screen.  A pixel to the right of the origin has a positive
  1943. x-coordinate and a pixel below the origin will have a positive
  1944. y-coordinate.  The x- and y-coordinates will never be negative values.
  1945.  
  1946. The view coordinate system can be defined upon the physical coordinate
  1947. system by moving the origin from the top left corner of the screen to
  1948. any physical coordinate (see the _setvieworg function).  In the view
  1949. coordinate system, negative x- and y-coordinates are allowed.  The
  1950. scale of the view and physical coordinate systems is identical (both
  1951. are in terms of pixels).
  1952.  
  1953. The window coordinate system is defined in terms of a range of
  1954. user-specified values (see the _setwindow function).  These values are
  1955. scaled to map onto the physical coordinates of the screen.  This
  1956. allows for consistent pictures regardless of the resolution (number of
  1957. pixels) of the screen.
  1958.  
  1959. The following functions are defined:
  1960.  
  1961. <_getcliprgn>         get the boundary of the current clipping
  1962.              region
  1963. <_getphyscoord>      get the physical coordinates of a point in
  1964.              view coordinates
  1965. <_getviewcoord>      get the view coordinates of a point in
  1966.              physical coordinates
  1967. <_getviewcoord_w>     get the view coordinates of a point in window
  1968.              coordinates
  1969. <_getviewcoord_wxy>     get the view coordinates of a point in window
  1970.              coordinates
  1971. <_getwindowcoord>     get the window coordinates of a point in view
  1972.              coordinates
  1973. <_setcliprgn>         set the boundary of the clipping region
  1974. <_setvieworg>         set the position to be used as the origin of
  1975.              the view coordinate system
  1976. <_setviewport>         set the boundary of the clipping region and
  1977.              the origin of the view coordinate system
  1978. <_setwindow>         define the boundary of the window coordinate
  1979.              system
  1980. ::::DISPLAY
  1981.               Display Functions
  1982.               ═════════════════
  1983.  
  1984. These functions are for the initialization of the presentation
  1985. graphics system and the displaying of charts.  The _pg_initchart
  1986. function initializes the system and should be the first presentation
  1987. graphics function called.  The single-series functions display a
  1988. single set of data on a chart; the multi-series functions (those
  1989. ending with ms) display several sets of data on the same chart.
  1990.  
  1991. The following functions are defined:
  1992.  
  1993. <_pg_chart>         display a bar, column or line chart
  1994. <_pg_chartms>         display a multi-series bar, column or line
  1995.              chart
  1996. <_pg_chartpie>         display a pie chart
  1997. <_pg_chartscatter>     display a scatter chart
  1998. <_pg_chartscatterms>     display a multi-series scatter chart
  1999. <_pg_defaultchart>     initialize the chart environment for a
  2000.              specific chart type
  2001. <_pg_initchart>      initialize the presentation graphics system
  2002. ::::DRAWING
  2003.               Drawing Functions
  2004.               ═════════════════
  2005.  
  2006. These functions display graphical images such as lines and ellipses.
  2007. Functions exist to draw straight lines (see the _lineto functions),
  2008. rectangles (see the _rectangle functions), polygons (see the _polygon
  2009. functions), ellipses (see the _ellipse functions), elliptical arcs
  2010. (see the _arc functions) and pie-shaped wedges from ellipses (see the
  2011. _pie functions).
  2012.  
  2013. These figures are drawn using the attributes described in the previous
  2014. section.  The functions ending with _w or _wxy use the window
  2015. coordinate system; the others use the view coordinate system.
  2016.  
  2017. The following functions are defined:
  2018.  
  2019. <_arc>             draw an arc
  2020. <_arc_w>         draw an arc using window coordinates
  2021. <_arc_wxy>         draw an arc using window coordinates
  2022. <_clearscreen>         clear the screen and fill with the background
  2023.              color
  2024. <_ellipse>         draw an ellipse
  2025. <_ellipse_w>         draw an ellipse using window coordinates
  2026. <_ellipse_wxy>         draw an ellipse using window coordinates
  2027. <_floodfill>         fill an area of the screen with the current
  2028.              color
  2029. <_floodfill_w>         fill an area of the screen in window
  2030.              coordinates with the current color
  2031. <_getcurrentposition>     get the coordinates of the current output
  2032.              position
  2033. <_getcurrentposition_w>  get the window coordinates of the current
  2034.              output position
  2035. <_getpixel>         get the color of the pixel at the specified
  2036.              position
  2037. <_getpixel_w>         get the color of the pixel at the specified
  2038.              position in window coordinates
  2039. <_lineto>         draw a line from the current position to a
  2040.              specified position
  2041. <_lineto_w>         draw a line from the current position to a
  2042.              specified position in window coordinates
  2043. <_moveto>         set the current output position
  2044. <_moveto_w>         set the current output position using window
  2045.              coordinates
  2046. <_pie>             draw a wedge of a "pie"
  2047. <_pie_w>         draw a wedge of a "pie" using window
  2048.              coordinates
  2049. <_pie_wxy>         draw a wedge of a "pie" using window
  2050.              coordinates
  2051. <_polygon>         draw a polygon
  2052. <_polygon_w>         draw a polygon using window coordinates
  2053. <_polygon_wxy>         draw a polygon using window coordinates
  2054. <_rectangle>         draw a rectangle
  2055. <_rectangle_w>         draw a rectangle using window coordinates
  2056. <_rectangle_wxy>     draw a rectangle using window coordinates
  2057. <_setpixel>         set the color of the pixel at the specified
  2058.              position
  2059. <_setpixel_w>         set the color of the pixel at the specified
  2060.              position in window coordinates
  2061. ::::ENVIRONMENT
  2062.             Environment Functions
  2063.             ═════════════════════
  2064.  
  2065. These functions deal with the hardware environment. The
  2066. _getvideoconfig function returns information about the current video
  2067. mode and the hardware configuration.  The _setvideomode function
  2068. selects a new video mode.
  2069.  
  2070. Some video modes support multiple pages of screen memory.  The visual
  2071. page (the one displayed on the screen) may be different than the
  2072. active page (the one to which objects are being written).
  2073.  
  2074. The following functions are defined:
  2075.  
  2076. <_getactivepage>     get the number of the current active graphics
  2077.              page
  2078. <_getvideoconfig>     get information about the graphics
  2079.              configuration
  2080. <_getvisualpage>     get the number of the current visual graphics
  2081.              page
  2082. <_grstatus>         get the status of the most recently called
  2083.              graphics library function
  2084. <_setactivepage>     set the active graphics page (the page to
  2085.              which graphics objects are drawn)
  2086. <_settextrows>         set the number of rows of text displayed on
  2087.              the screen
  2088. <_setvideomode>      select the video mode to be used
  2089. <_setvideomoderows>     select the video mode and the number of text
  2090.              rows to be used
  2091. <_setvisualpage>     set the visual graphics page (the page
  2092.              displayed on the screen)
  2093. ::::FONT_MANIPULATION
  2094.              Font Manipulation Functions
  2095.              ═══════════════════════════
  2096.  
  2097. These functions are for the display of fonts compatible with Microsoft
  2098. Windows.  Fonts are contained in files with an extension of ".FON".
  2099. Before font based text can be displayed, the fonts must be registered
  2100. with the _registerfonts function, and a font must be selected with the
  2101. _setfont function.
  2102.  
  2103. The following functions are defined:
  2104.  
  2105. <_getfontinfo>         get information about the currently selected
  2106.              font
  2107. <_getgtextextent>     get the length in pixels of a text string
  2108. <_getgtextvector>     get the current value of the font text
  2109.              orientation vector
  2110. <_outgtext>         display a string of text in the current font
  2111. <_registerfonts>     initialize the font graphics system
  2112. <_setfont>         select a font from among the registered fonts
  2113. <_setgtextvector>     set the font text orientation vector
  2114. <_unregisterfonts>     frees memory allocated by the font graphics
  2115.              system
  2116. ::::GRAPHICS
  2117.               Graphics Functions
  2118.               ══════════════════
  2119.  
  2120. The WATCOM C Graphics Library consists of a large number of functions.
  2121. These functions are used to display graphical images such as lines and
  2122. circles upon the computer screen.  Functions are also provided for
  2123. displaying text along with the graphics output.
  2124.  
  2125. Support is provided for both color and monochrome screens which are
  2126. connected to the computer using any of the following graphics
  2127. adapters:
  2128.  
  2129.       IBM Monochrome Display/Printer Adapter (MDPA)
  2130.       IBM Color Graphics Adapter (CGA)
  2131.       IBM Enhanced Graphics Adapter (EGA)
  2132.       IBM Multi-Color Graphics Array (MCGA)
  2133.       IBM Video Graphics Array (VGA)
  2134.       Hercules Monochrome Adapter
  2135.       SuperVGA adapters (SVGA) supplied by various manufacturers
  2136.  
  2137. The functions in the WATCOM C Graphics Library can be organized into a
  2138. number of classes:
  2139.  
  2140. <Environment>         These functions deal with the hardware
  2141.              environment.
  2142. <Coordinate_System>     These functions deal with coordinate systems
  2143.              and mapping coordinates from one system to
  2144.              another.
  2145. <Attribute>         These functions control the display of
  2146.              graphical images.
  2147. <Drawing>         These functions display graphical images such
  2148.              as lines and ellipses.
  2149. <Text>             These functions deal with displaying text in
  2150.              both graphics and text modes.
  2151. <Graphics_Text>      These functions deal with displaying graphics
  2152.              text.
  2153. <Image_Manipulation>     These functions store and retrieve screen
  2154.              images.
  2155. <Font_Manipulation>     These functions deal with displaying font
  2156.              based text.
  2157. <Presentation_Graphics>  These functions deal with displaying
  2158.              presentation graphics elements such as bar
  2159.              charts and pie charts.
  2160. ::::GRAPHICS_TEXT
  2161.                Graphics Text Functions
  2162.                ═══════════════════════
  2163.  
  2164. These functions deal with displaying graphics text.  Graphics text is
  2165. displayed as a sequence of line segments, and can be drawn in
  2166. different sizes (see the _setcharsize function), with different
  2167. orientations (see the _settextorient function) and alignments (see the
  2168. _settextalign function).  The functions ending with _w use the window
  2169. coordinate system; the others use the view coordinate system.
  2170.  
  2171. The following functions are defined:
  2172.  
  2173. <_gettextextent>     get the bounding rectangle for a graphics
  2174.              text string
  2175. <_gettextsettings>     get information about the current settings
  2176.              used to display graphics text
  2177. <_grtext>         display graphics text
  2178. <_grtext_w>         display graphics text using window
  2179.              coordinates
  2180. <_setcharsize>         set the character size used to display
  2181.              graphics text
  2182. <_setcharsize_w>     set the character size in window coordinates
  2183.              used to display graphics text
  2184. <_setcharspacing>     set the character spacing used to display
  2185.              graphics text
  2186. <_setcharspacing_w>     set the character spacing in window
  2187.              coordinates used to display graphics text
  2188. <_settextalign>      set the alignment used to display graphics
  2189.              text
  2190. <_settextorient>     set the orientation used to display graphics
  2191.              text
  2192. <_settextpath>         set the path used to display graphics text
  2193. ::::IMAGE_MANIPULATION
  2194.              Image Manipulation Functions
  2195.              ════════════════════════════
  2196.  
  2197. These functions are used to transfer screen images.  The _getimage
  2198. function transfers a rectangular image from the screen into memory.
  2199. The _putimage function transfers an image from memory back onto the
  2200. screen.  The functions ending with _w or _wxy use the window
  2201. coordinate system; the others use the view coordinate system.
  2202.  
  2203. The following functions are defined:
  2204.  
  2205. <_getimage>         store an image of an area of the screen into
  2206.              memory
  2207. <_getimage_w>         store an image of an area of the screen in
  2208.              window coordinates into memory
  2209. <_getimage_wxy>      store an image of an area of the screen in
  2210.              window coordinates into memory
  2211. <_imagesize>         get the size of a screen area
  2212. <_imagesize_w>         get the size of a screen area in window
  2213.              coordinates
  2214. <_imagesize_wxy>     get the size of a screen area in window
  2215.              coordinates
  2216. <_putimage>         display an image from memory on the screen
  2217. <_putimage_w>         display an image from memory on the screen
  2218.              using window coordinates
  2219. ::::PRESENTATION_GRAPHICS
  2220.            Presentation Graphics Functions
  2221.            ═══════════════════════════════
  2222.  
  2223. These functions provide a system for displaying and manipulating
  2224. presentation graphics elements such as bar charts and pie charts.  The
  2225. presentation graphics functions can be further divided into three
  2226. classes:
  2227.  
  2228. <Display>         These functions are for the initialization of
  2229.              the presentation graphics system and the
  2230.              displaying of charts.
  2231. <Analyze>         These functions calculate default values for
  2232.              chart elements without actually displaying
  2233.              the chart.
  2234. <Utility>         These functions provide additional support to
  2235.              control the appearance of presentation
  2236.              graphics elements.
  2237. ::::TEXT
  2238.                 Text Functions
  2239.                 ══════════════
  2240.  
  2241. These functions deal with displaying text in both graphics and text
  2242. modes.    This type of text output uses the system BIOS functions and
  2243. can be displayed in only one size.
  2244.  
  2245. This text is displayed using the _outtext and _outmem functions.  The
  2246. output position for text follows the last text that was displayed or
  2247. can be reset (see the _settextposition function).  Text windows can be
  2248. created (see the _settextwindow function) in which the text will
  2249. scroll.  Text is displayed with the current text color (see the
  2250. _settextcolor function).
  2251.  
  2252. The following functions are defined:
  2253.  
  2254. <_clearscreen>         clear the screen and fill with the background
  2255.              color
  2256. <_displaycursor>     determine whether the cursor is to be
  2257.              displayed after a graphics function completes
  2258.              execution
  2259. <_getbkcolor>         get the background color
  2260. <_gettextcolor>      get the color used to display text
  2261. <_gettextcursor>     get the shape of the text cursor
  2262. <_gettextposition>     get the current output position for text
  2263. <_gettextwindow>     get the boundary of the current text window
  2264. <_outmem>         display a text string of a specified length
  2265. <_outtext>         display a text string
  2266. <_scrolltextwindow>     scroll the contents of the text window
  2267. <_setbkcolor>         set the background color
  2268. <_settextcolor>      set the color used to display text
  2269. <_settextcursor>     set the shape of the text cursor
  2270. <_settextposition>     set the output position for text
  2271. <_settextwindow>     set the boundary of the region used to
  2272.              display text
  2273. <_wrapon>         permit or disallow wrap-around of text in a
  2274.              text window
  2275. ::::UTILITY
  2276.               Utility Functions
  2277.               ═════════════════
  2278.  
  2279. These functions provide additional support to control the appearance
  2280. of presentation graphics elements.
  2281.  
  2282. The following functions are defined:
  2283.  
  2284. <_pg_getchardef>     get bit-map definition for a specific
  2285.              character
  2286. <_pg_getpalette>     get presentation graphics palette (colors,
  2287.              line styles, fill patterns and plot
  2288.              characters)
  2289. <_pg_getstyleset>     get presentation graphics style-set (line
  2290.              styles for window borders and grid lines)
  2291. <_pg_hlabelchart>     display text horizontally on a chart
  2292. <_pg_resetpalette>     reset presentation graphics palette to
  2293.              default values
  2294. <_pg_resetstyleset>     reset presentation graphics style-set to
  2295.              default values
  2296. <_pg_setchardef>     set bit-map definition for a specific
  2297.              character
  2298. <_pg_setpalette>     set presentation graphics palette (colors,
  2299.              line styles, fill patterns and plot
  2300.              characters)
  2301. <_pg_setstyleset>     set presentation graphics style-set (line
  2302.              styles for window borders and grid lines)
  2303. <_pg_vlabelchart>     display text vertically on a chart
  2304.