home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / voglew.zip / GETSTR.C < prev    next >
C/C++ Source or Header  |  1993-05-28  |  668b  |  49 lines

  1. #include "vogle.h"
  2. #include <stdio.h>
  3.  
  4. /*
  5.  * Test the getting of strings in graphics mode.
  6.  */
  7.  
  8. main(argc, argv)
  9.     int    argc;
  10.     char    **argv;
  11. {
  12.     char    *p;
  13.     float    cw, ch;
  14.     int    i, n;
  15.     char    buf[10][128];
  16.  
  17.     vinit("mswin");
  18.  
  19.     if (argc > 1)
  20.         font(argv[1]);
  21.  
  22.     clipping(0);
  23.  
  24.     window(-1.0, 1.0, -1.0, 1.0, 1.0, -1.0);
  25.     lookat(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0);
  26.  
  27.     textsize(0.1, 0.25);
  28.  
  29.  
  30.     rotate(30.0, 'x');
  31.     rotate(30.0, 'z');
  32.     rotate(60.0, 'y');
  33.  
  34.     color(BLACK);
  35.     clear();
  36.     color(YELLOW);
  37.  
  38.     rect(-0.5, -0.5, 0.5, 0.5);
  39.     move2(-0.5, 0.0);
  40.  
  41.     color(GREEN);
  42.  
  43.     n = 0;
  44.     while ((i = getstring(BLACK, buf[n]) && n < 10))
  45.         n++;
  46.  
  47.     vexit();
  48. }
  49.