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.

Dark GDK / How do I fill a circle or box with color?

Author
Message
Scope 51791
16
Years of Service
User Offline
Joined: 25th Jul 2008
Location:
Posted: 11th Aug 2008 00:57
If I do dbCirlce it makes a circle but it doesn't fill the circle with a color. All i want is white. How would I do this?
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 11th Aug 2008 03:13
Not easily. I tried this once by using drawing multiple circles from radius 1 up to the radius I wanted. Unfortunately, due to precision issues there were some pixels that never got drawn. You might try a blur on the bitmap but that really takes CPU cycles. Or used dbDot() to fill it in.

Ultimately I covered the issue by creating my own Image class which directly manipulates the Direct X image and wrote my own circle and ellipse routines that optionally fill the primitive.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Scope 51791
16
Years of Service
User Offline
Joined: 25th Jul 2008
Location:
Posted: 11th Aug 2008 03:16
oh, that sux.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 11th Aug 2008 03:45
I'd recommend filling in with dbDot()

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 11th Aug 2008 08:06
Or, loop through the diameter of your sphere and draw horizontal lines at each step, but change the width of each line base on sin(currentYPercentage(0-1 range)*PI2).

Login to post a reply

Server time is: 2024-11-20 17:40:20
Your offset time is: 2024-11-20 17:40:20