void Circle(int x, int y, int r)
{

int i, j, x1, y1, r, p, a ;




x1 = 0 ;

y1 = r ;



p = 3 - 2 * r ;



while ( x1 < y1 )

{

plotcircle ( x, y, x1, y1 ) ;



if ( p < 0 )

p = p + 4 * x1 + 6 ;

else

{

p = p + 4 * ( x1 - y1 ) + 10 ;

y1 = y1 - 1 ;

}

x1 = x1 + 1 ;

}

if ( x1 == y1 )

plotcircle ( x, y, x1, y1 ) ;



}



void plotcircle ( int x, int y, int x1, int y1 )

{

WinDrawPixel ( x + x1, y + y1 ) ;

WinDrawPixel ( x - x1, y + y1  ) ;

WinDrawPixel ( x + x1, y - y1  ) ;

WinDrawPixel ( x - x1, y - y1  ) ;

WinDrawPixel ( x + y1, y + x1  ) ;

WinDrawPixel ( x - y1, y + x1  ) ;

WinDrawPixel ( x + y1, y - x1  ) ;

WinDrawPixel ( x - y1, y - x1  ) ;

}







Manish Jaggi
Developer
Geovision Inc
H-13 Chittranjan marg
phone 91-141-364129 , 373696 , 653251
Fax 317125


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to