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 draw a circle or fill a circle with a color

Author
Message
im not really here
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location: iowa
Posted: 7th Nov 2010 08:50
hello me again, i ran into a different problem. im trying to make a dart board game but im having trouble figuring out how to fill a circle with a color....the only thing i can come up with is making a loop that keeps drawing circles.....here is an example


as you can see , this draws circles and changes the color as count gets lower....but this wont work because the pixels are are not perfect....for my game to work the colors have to be solid....anyone have any idea?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Nov 2010 10:32
Here's code for a filled circle that I've just converted from some DBPro code I wrote years ago:


When you look for code on the forums, don't just limit yourself to searching in the GDK forum - it's surprisingly easy to convert code from DBPro to GDK, so it's worth searching further afield.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 7th Nov 2010 19:33
Here is another solution for filled circles and ellipses:

http://forum.thegamecreators.com/?m=forum_view&t=158250&b=22
im not really here
13
Years of Service
User Offline
Joined: 14th Oct 2010
Location: iowa
Posted: 7th Nov 2010 22:46
thanks for your guys' help i finally figured it out...took me a while to figure out that code ianM XD thats a tad advanced for me yet =P...and thanks mireben sure both these post will help me in the future

Login to post a reply

Server time is: 2024-06-30 10:27:44
Your offset time is: 2024-06-30 10:27:44