Re: raise / lower API
- From: Damon Chaplin <damon karuna eclipse co uk>
- To: Bruno Coudoin <bruno coudoin free fr>
- Cc: goocanvas-list gnome org
- Subject: Re: raise / lower API
- Date: Thu, 18 Dec 2008 18:34:58 +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.
>
You should be able to do this fairly easily like this:
parent = goo_canvas_item_get_parent (item);
pos = goo_canvas_item_find_child (parent, item);
goo_canvas_item_move_child (item, pos + 1);
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]