Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Better Circles

Author
Message
Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 31st May 2012 23:46 Edited at: 1st Jun 2012 01:18
I found some old code for drawing better circles, with some editing we now have perfect hollow and filled circles and ellipses.


TheComet
12
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Jun 2012 15:02
(dots+.)

What does that do? I've never seen such syntax...

As to the functions themselves, nice! I like the fact that you use boxes to fill the circles, that's pretty efficient!

TheComet

Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 3rd Jun 2012 15:24 Edited at: 3rd Jun 2012 15:24
(dots+.) is the same as (dots+0.0); DB doesn't seem picky with zeros.
I needed "dots" to be a float for the division -- adding a float to an integer returns a float.

Thanks, I think this is about as efficient as it can get for DBC. I am working on a set of memblock-bitmap drawing functions that will allow super-fast drawing with more shapes and tools.

BN2 Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 3rd Jun 2012 18:00
Quote: "adding a float to an integer returns a float. "


Well you learn something new everyday. I always just multiply by 1.0 but I think I like this solution better (besides, it adds cryptic looking lines of code, and that's always fun).

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose

Login to post a reply

Server time is: 2020-08-05 02:37:52
Your offset time is: 2020-08-05 02:37:52