Search the web
Sign In
New User? Sign Up
jurtle-users · Jurtle Users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
fill different colors in Flower.java   Message List  
Reply | Forward Message #93 of 119 |
Re: [jurtle-users] fill different colors in Flower.java

That's going to be a bit tricky to do. Turtle Graphics is designed
mainly for line drawing, not for filing areas. You would probably be
better off replacing the arcRight and arcLeft methods in Flower with
the fillArc method of java.awt.Graphics. You can get the Graphics
object using the Turtle method getGraphics().


On Jun 28, 2005, at 12:44 PM, chander2010 wrote:

> Hi All
>
> I need to fill in each petal with different colors in Flower.java
> example. i can draw each petal with different colors, but I couldn't
> able to fill colors. any body can help me.
>
> thanks in advance
> chander
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

--
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com





Tue Jun 28, 2005 7:31 pm

btschumy
Offline Offline
Send Email Send Email

Forward
Message #93 of 119 |
Expand Messages Author Sort by Date

Hi All I need to fill in each petal with different colors in Flower.java example. i can draw each petal with different colors, but I couldn't able to fill...
chander2010
Offline Send Email
Jun 28, 2005
6:28 pm

That's going to be a bit tricky to do. Turtle Graphics is designed mainly for line drawing, not for filing areas. You would probably be better off replacing...
Bill Tschumy
btschumy
Offline Send Email
Jun 28, 2005
7:32 pm

I tried to do same way in arcRight() or arcLeft() but I couldnot able to find the X, Y positions and width & height, can you help me how to figure out the...
chander2010
Offline Send Email
Jun 29, 2005
3:23 pm

Chander, I haven't done much of any graphics programming outside of Jurtle's Turtle methods, but you can get the coordinates of the current Turtle's position...
John Kirkilis
johnkirkilis
Offline Send Email
Jun 29, 2005
10:03 pm

Jhon I used this fillArc method in arcRight() or arcLeft() , this works, but the problem is it over rides each petal at same positions of X, Y. I need it...
chander2010
Offline Send Email
Jun 30, 2005
2:12 pm

Chander, I gave you bad advice on using fillArc. This method doesn't do what I thought. It will draw a pie shaped wedge rather than a 1/2 a petal like I...
Bill Tschumy
btschumy
Offline Send Email
Jun 30, 2005
3:24 pm

Hi all at last fixed my self, to fill the different colors to petals in Flower.java, just I replaced petal method with this code. private void petal( double...
chander2010
Offline Send Email
Jul 7, 2005
5:36 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help