home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l210 / 1.ddi / EXAMPLES.ARC / CH17EX04.PRO < prev    next >
Encoding:
Text File  |  1988-06-21  |  1.0 KB  |  30 lines

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