Re: raise / lower API
- From: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- To: Bruno Coudoin <bruno coudoin free fr>
- Cc: goocanvas-list gnome org
- Subject: Re: raise / lower API
- Date: Thu, 18 Dec 2008 10:54:57 +0000
On Thu, 2008-12-18 at 08:32 +0100, Bruno Coudoin wrote:
> Le mercredi 17 décembre 2008 à 17:31 -0500, Donny Viszneki a écrit :
> > On Wed, Dec 17, 2008 at 4:59 PM, Bruno Coudoin <bruno coudoin free fr> wrote:
> > > I know and I already use this feature. It is used to raise to top or
> > > lower to bottom an item. This was also present in the gnomecanvas. But
> > > we still miss a raise/lower by one z increment.
> >
> > There may in fact be no real Z value, except for one which you might
> > notionally derive from comparing the relative Z positions of each
> > item.
>
> Sure, I suppose there is no real Z value but a painting order.
>
> > A better approach, and the one you should use, is to create a canvas
> > item which represent each notional layer of your organization, and use
> > that as a reference point for setting the Z order you want.
>
> Ouch, seems overly complex or I don't understand. What do you mean by
> "create a canvas item" ?
>
> What I would expect is to let the user change the painting order. It
> means moving up / down the given item in the list of items to draw.
What I usually do is create a goocanvas.Group for each "conceptual
layer". Then I create my visible items with one of the groups as
parent, instead of using Canvas.get_root_item() as parent. Finally, the
groups can be reordered easily or shown/hidden, and that affects all
items inside them.
--
Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
"The universe is always one step beyond logic" -- Frank Herbert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]