Hi,

I am still unclear on what should I do :)

I tried around with Layer[] and setLayer(Layer[])..

Assuming I am able to detect which Layer[] I wish to delete.
But when it comes to setLayer(Layer[]), I have to redraw all the layer
again.

Even if I set the selected Layer[] to Color.white, I still hav to redraw all
the layer again :(
Did I miss out anything in the API?

Please advice. Thank you.

Best regards,
Calvin


----- Original Message -----
From: "Jay Goodman" <[EMAIL PROTECTED]>
To: "kaiwen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, September 27, 2003 1:11 AM
Subject: Re: [JAVA2D] deleting Layers


> I'm going to need this functionality very soon.   I'll probably just
modify
> the GLF to add the needed removeLayer method and fuctionality in the
> Composite classes (as well as adding functionality of Layer shuffling
> and visibility)
>
> But one thing you can do without modifying the GLF
> is to use the setLayers method (i think that's what it's called).  It
> takes a
> array of Layers so you can keep a seperate model of all your layers in
> a custom class and retrive them as an array to use with the
> setLayers(Layer[])
> method.
>
>
>
> kaiwen wrote:
>
> > Hi,
> >
> > I just started reading on java2d and glf (Graphics Layered Framework).
> >
> > I am very keen on learning glf, I hope to achieve layered graphics
> > like those in Photoshop drawing.
> > What I wanted is to draw each Shape in seperate Layer, and modify a
> > particular Layer and redraw that modified Layer WITHOUT redrawing the
> > whole canvas. Can I do this with glf?
> >
> > I tried a few example from sun.com, I cannot find a method
> > Layer.remove(Layer). Or there is another way doing this?
> >
> > I used to keep all Shape drawn in a Vector and later search for the
> > Shape I want to modify, modify it and draw the whole Vector on Canvas
> > again. Yes, it is very slow.
> >
> > What is a better way of doing this? Please advice.
> >
> > Best ragards,
> > Calvin Kuan
> >
===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body of the message "signoff JAVA2D-INTEREST". For general help, send
> > email to [EMAIL PROTECTED] and include in the body of the message
> > "help".
>
>
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to