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 in the graphic's context by calling the getPosition method
which returns an object of type Dimension if memory serves me correctly.
I would hope that the Java2D or AWT arcRight / arcLeft methods use the
same coordinate system, but perhaps not.
Bill will be able to give you a more definite answer, but I thought I'd
throw in my 2 cents anyway.
Good luck,
John
chander2010 wrote:
> 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 positions to fill the colors.
>
> this is very urgent, please help me.
>
> thanks
> Chander
>
>
> --- In jurtle-users@yahoogroups.com, Bill Tschumy <bill@o...> wrote:
> > 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
>
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> * Visit your group "jurtle-users
> <http://groups.yahoo.com/group/jurtle-users>" on the web.
>
> * To unsubscribe from this group, send an email to:
> jurtle-users-unsubscribe@yahoogroups.com
> <mailto:jurtle-users-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>