Tam Hanna wrote:
Hi, you could either play around with the roundness attribute of some PalmOS rectangle drawing functions(if you pass a square and the right values, the square becomes a circle), or you could play around with sin and cos trigonometry!
Well, you don't REALLY need trig to draw circles. You just need Pythagoras as applied by Bresenham. You can use the Bresenham circle generator, and then you only have to do a few left-shifts, adds, and branches. http://www.gamedev.net/reference/articles/article767.asp Essentially, you have a starting point at the NORTH end of the circle, and an endpoint where x = y (the rest of the circle can then be filled out by symmetry). You can get from point N to point N+1 along the circumference by shifts, adds, and compares. The algorithm figures out which among the EAST or SOUTHEAST points is healthier to jump to.
Subject: draw Graphics From: cesar gomez <[EMAIL PROTECTED]> Date: Thu, 22 Dec 2005 16:36:51 +0100 (CET) X-Message-Number: 7 Hello, As I can make a circle? and to refill it with some color. with code.
-- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
