home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / EXAMPLES / CH18EX04.PRO < prev    next >
Encoding:
Text File  |  1990-03-26  |  970 b   |  27 lines

  1. /*
  2.    Copyright (c) 1986, 90 by Prolog Development Center
  3. */
  4.  
  5. constants
  6. % To access your BGI drivers and fonts bgi_path may need to equal "..\\BGI".
  7.    bgi_path = ""
  8.    gray50 = [$aa, $55, $aa, $55, $aa, $55, $aa, $55 ]
  9.  
  10. % To access the GRAPDECL.PRO file you may need to add a path: 
  11. % include "..\\programs\\GRAPDECL.PRO" 
  12. include "GRAPDECL.PRO" 
  13.  
  14. goal
  15.    initgraph(0, 0, GraphDriver, GraphMode, bgi_path),
  16.  
  17.    getfillsettings(SavePat,SaveColor),         /* retrieve current settings */
  18.    getfillpattern(SavePatternList),         /* save user fill pattern */
  19.    setfillstyle(slash_FILL, blue),         /* change fill style */
  20.    bar(0, 0, 100, 100),             /* draw slash-filled blue bar */
  21.    setfillpattern(gray50, yellow),         /* custom fill pattern */
  22.    bar(100, 100, 200, 200),             /* draw customized yellow bar */
  23.    setfillpattern(SavePatternList,SaveColor),    /* restore user fill pattern */
  24.    setfillstyle(SavePat, SaveColor),
  25.    readchar(_),
  26.    closegraph.
  27.