home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / video / 11 / 11_5.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  484 b   |  21 lines

  1. /* Listing 11-5 */
  2.  
  3. main()
  4. {
  5.     int    xc    = 400;        /* center of circle */
  6.     int    yc    = 125;
  7.     int    a,b;            /* semimajor and semiminor axes */
  8.     int    n = 12;            /* pixel value */
  9.     int    i;
  10.     float    ScaleFactor = 1.37;    /* for 640x350 16-color mode */
  11.  
  12.  
  13.     for( i=0; i<10; i++ )
  14.       for( a=0; a<100; a++ )
  15.       {
  16.         b = (float) a / ScaleFactor;    /* scale semiminor axis */
  17.         Ellipse10( xc, yc, a, b, n );    /* draw a circle */
  18.         Ellipse10( xc, yc, a, b, n );    /* draw it again */
  19.       }
  20. }
  21.