home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / pcgraphc.zip / PENDEMO.C < prev    next >
C/C++ Source or Header  |  1988-12-26  |  1KB  |  51 lines

  1. #include <stdio.h>
  2. #include "graph.h"
  3.  
  4. main()
  5.     {
  6.     int mode, stat;
  7.     double x, y;
  8.     mode  = CGA_640x200;    /* CGA 640x200 BW */
  9.     g_init (mode);
  10.     frame ();            /* frame hard clip limit */
  11.     locate (10.0, 95.0, 10.0, 80.0 );    /* units in gdu's */
  12.     frame ();            /* frame locate window */
  13.     show (0, 80.0, 0, 80.0);    /* isotropic scaling */
  14.                     /* changes from gdu's to udu's */
  15.     move (25.5, 35.0);
  16.     line_type (6,0);
  17.     pdir(0);            /* set plotting direction for */
  18.     iplot (30, 0, -3);        /* incremental and relative plots */
  19.     iplot (0, 30, -3);
  20.     iplot (-30, 0, -3);
  21.     iplot (0, -30, -3);
  22.     move (20, 20);
  23.     line_type (10,0);
  24.     pdir (60);            /* now tilt by 60 deg. */
  25.     iplot (30, 0, -3);        /* draw same figure */
  26.     iplot (0, 30, -3);
  27.     iplot (-30, 0, -3);
  28.     iplot (0, -30, -3);
  29.     move (5,10);
  30.     line_type (1,0);
  31.     labelf ("Press <cr> to\nundraw the boxes");
  32.     while (getch () != '\r') ;
  33.     pen (-1);
  34.     move (25.5, 35.0);
  35.     line_type (6,0);
  36.     pdir(0);            /* set plotting direction for */
  37.     iplot (30, 0, -3);        /* incremental and relative plots */
  38.     iplot (0, 30, -3);
  39.     iplot (-30, 0, -3);
  40.     iplot (0, -30, -3);
  41.     move (20, 20);
  42.     line_type (10,0);
  43.     pdir (60);            /* now tilt by 60 deg. */
  44.     iplot (30, 0, -3);        /* draw same figure */
  45.     iplot (0, 30, -3);
  46.     iplot (-30, 0, -3);
  47.     iplot (0, -30, -3);
  48.     exit(0);
  49.     }
  50.  
  51.