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

  1. /*
  2.    Copyright (c) 1986, 90 by Prolog Development Center
  3. */
  4.  
  5.  
  6. constants
  7. % To access your BGI drivers and fonts bgi_path may need to equal "..\\BGI".
  8.    bgi_path = ""
  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(detect, 0, GraphDriver,GraphMode, bgi_path),
  16.  
  17.    /* Draw a 90 degree arc with radius of 50 */
  18.    arc(150, 150, 0, 89, 50),
  19.  
  20.    /* Get the coordinates of the arc and connect ends */
  21.    getarccoords(X,Y,XStart,YStart,XEnd,YEnd),
  22.    line(XStart, YStart, XEnd, YEnd),
  23.  
  24.    /* Draw a circle */
  25.    circle(150, 150, 100),
  26.  
  27.    /* Draw an ellipse inside the circle */
  28.    ellipse(150, 150, 0, 359, 100, 50),
  29.  
  30.    /* Draw and fill a pieslice */
  31.    pieslice(100, 100, 0, 135, 49),
  32.    pieslice(100, 100, 135, 225, 49),
  33.    pieslice(100, 100, 225, 360, 49),
  34.  
  35.    closegraph.