Re: How to move a GnomeCanvasGroup?
- From: Lauris Kaplinski <lauris helixcode com>
- To: Arturo Tena <arturo directmail org>
- Cc: gnome-devel-list gnome org
- Subject: Re: How to move a GnomeCanvasGroup?
- Date: Thu, 27 Jul 2000 22:28:19 +0200 (CEST)
You can always mess with affine transformations directly:
gdouble x, y;
gdouble affine[6];
GnomeCanvasItem * citem = your_item;
art_affine_translate (affine, x, y);
gnome_canvas_item_affine_absolute (citem, affine);
Regards,
Lauris Kaplinski
On Thu, 27 Jul 2000, Arturo Tena wrote:
> Hello!
>
> I want to move a GnomeCanvasGroup to the coordenates (x,y), but using the
> following code doesn't rerender its children on the canvas:
>
>
> GnomeCanvasItem *citem; /* This is a GnomeCanvasGroup */
> double x, y;
> /* ... */
> gnome_canvas_item_set (citem, "x", x, "y", y, NULL);
>
>
> (I have had used gtk_object_set, but I remember that GnomeCanvasItem doesn't
> watch for argument changes, which I was told is a bug that will be corrected
> soon). I have to use the following code instead:
>
>
> GnomeCanvasItem *citem; /* This is a GnomeCanvasGroup */
> double x, y;
> double old_x, old_y;
> /* ... */
> gtk_object_get (citem, "x", &old_x, "y", &old_y, NULL);
> gnome_canvas_item_move (citem, -old_x, -old_y);
> gnome_canvas_item_move (citem, x, y);
>
>
> My questions are:
>
> 1. Is this a bug or a feature?
> 2. Is there any chance to get a gnome_canvas_item_move_absolute call, instead
> the relative gnome_canvas_item_move?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]