Changeset 136 for ttyvaders/trunk/libee/conic.c
 Timestamp:
 Nov 10, 2003, 7:29:04 PM (17 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

ttyvaders/trunk/libee/conic.c
r132 r136 27 27 #include "ee.h" 28 28 29 static void ellipsepoints(int, int, int, int, char); 30 29 31 void ee_draw_circle(int x, int y, int r, char c) 30 32 { … … 34 36 for(test = 0, dx = 0, dy = r ; dx <= dy ; dx++) 35 37 { 36 ee_putcharTO(x + dx, y + dy / 2, c); 37 ee_putcharTO(x  dx, y + dy / 2, c); 38 ee_putcharTO(x + dx, y  dy / 2, c); 39 ee_putcharTO(x  dx, y  dy / 2, c); 40 41 ee_putcharTO(x + dy, y + dx / 2, c); 42 ee_putcharTO(x  dy, y + dx / 2, c); 43 ee_putcharTO(x + dy, y  dx / 2, c); 44 ee_putcharTO(x  dy, y  dx / 2, c); 38 ellipsepoints(x, y, dx, dy, c); 39 ellipsepoints(x, y, dy, dx, c); 45 40 46 41 test += test > 0 ? dx  dy : dx; 47 42 } 48 }49 50 static void ellipsepoints(int xo, int yo, int x, int y, char c)51 {52 ee_putcharTO(xo + x, yo + y, c);53 ee_putcharTO(xo  x, yo + y, c);54 ee_putcharTO(xo + x, yo  y, c);55 ee_putcharTO(xo  x, yo  y, c);56 43 } 57 44 … … 98 85 } 99 86 87 static void ellipsepoints(int xo, int yo, int x, int y, char c) 88 { 89 ee_putcharTO(xo + x, yo + y, c); 90 ee_putcharTO(xo  x, yo + y, c); 91 ee_putcharTO(xo + x, yo  y, c); 92 ee_putcharTO(xo  x, yo  y, c); 93 } 94
Note: See TracChangeset
for help on using the changeset viewer.