home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume4 / quickplot / part2 / testprogs.d / dlined.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  475 b   |  30 lines

  1. /* with no args, gives dotted diagaonal line. one optional argument is
  2.  * permitted to change line mode.  permitted modes are:
  3.  *    solid
  4.  *    dotted
  5.  *  shortdashed
  6.  *  longdashed
  7.  *  dotdashed
  8.  */
  9. main(argc,argv)
  10. int argc;
  11. char **argv;
  12. {
  13.     int x0,x1,y0,y1;
  14.  
  15.     x0 = 0;
  16.     y0 = 0;
  17.     x1 = 2000;
  18.     y1 = 2000;
  19.     space(x0,y0,2000,2000);
  20.     if(argc > 1) linemod(argv[1]);
  21.     else linemod("dotted");
  22.     move(x0,y0);
  23.     label("+");
  24.     move(x1,y1);
  25.     label("+");
  26.     line(x0,y0,x1,y1);
  27.     erase();
  28.     exit(0);
  29. }
  30.