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

  1. #include <stdio.h>
  2. #include "vogle.h"
  3.  
  4. /*
  5.  * the basic test program for a driver if we can draw a line and do
  6.  * hardware text we are almost there!
  7.  */
  8. main(argc, argv)
  9.     int    argc;
  10.     char    **argv;
  11. {
  12.     vinit("mswin");
  13.  
  14.     if (argc == 2)
  15.         font(argv[1]);        /* set font to argument */
  16.     else
  17.         font("large");        /* set font to hardware text large */
  18.  
  19.     color(BLACK);            /* we want to clear in black */
  20.     clear();            /* clear to current color */
  21.  
  22.     color(GREEN);            /* set current color to green */
  23.  
  24.     move2(-1.0, 0.0);        /* draw a horizontal line at y = 0 */
  25.     draw2(1.0, 0.0);
  26.  
  27.     getkey();            /* pause for some input */
  28.  
  29.     move2(0.0, 0.0);        /* draw a line along x = 0 */
  30.     draw2(0.0, 1.0);
  31.  
  32.     move2(0.0, 0.0);        /* move to the middle of the screen */
  33.     drawstr("Hello");        /* draw "Hello" starting at the origin */
  34.  
  35.     getkey();            /* pause again */
  36.  
  37.     vexit();            /* set screen back to original state */
  38. }
  39.