elcircle - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7) +---- Thread: elcircle (/showthread.php?tid=1997) |
elcircle - James D Jarvis - 09-14-2023 elcircle is a pretty quick subroutine to draw filled ellipses (and circles) that doesn't have the problems using Paint does. It's not a fast as fcircle but it's speedy and it can do ellipses. Code: (Select All)
RE: elcircle - SMcNeill - 09-14-2023 Reminder we also have these: https://qb64phoenix.com/forum/showthread.php?tid=1806 RE: elcircle - bplus - 09-14-2023 Yes and those have gone through the ringer of Pete, STx and bplus testing ;-)) But as with Charlie it is good to know how to do these on your own for customized effects (they will cost you speed probably). For example: ```Screen _NewImage(400, 400, 32) cx = _Width / 2: cy = _Height / 2 r = 100 While r > 0 x = 0: y = r 'reset While x < y Color _RGB32(x * 3, 255 - 6 * x, 0) y = Sqr(r * r - x * x) PSet (cx - x, cy - y) PSet (cx + x, cy - y) PSet (cx - x, cy + y) PSet (cx + x, cy + y) PSet (cx - y, cy - x) PSet (cx + y, cy - x) PSet (cx - y, cy + x) PSet (cx + y, cy + x) x = x + .25 Wend r = r - .5 Wend``` RE: elcircle - James D Jarvis - 09-14-2023 I have to master the search feature here, not that I wouldn't have done this anyway, but I might have posted it somewhere else if I had seen some of those other ellipse routines in my search this morning. RE: elcircle - Dav - 09-15-2023 Thanks for sharing it anyway, James. It's interesting seeing different approaches to things, and kudos for rolling your own functions. - Dav |