Re: GnomeCanvas question (never mind)

On Mon, Aug 23, 1999 at 01:14:58AM +0200, Ronald de Man wrote:
> Hello,
> I'm playing a bit with the (non-AA) canvas. At the moment I can drag items
> around, and everything is fine until I want to return an item to
> a certain fixed position. What I do to move 'item' to (dest_x, dest_y) is:
> double xx, yy;
> gnome_canvas_item_i2w(item, &xx, &yy);
> gnome_canvas_item_set(item, "x", dest_x - xx, "y", dest_y - yy, NULL);

So I hadn't really looked at what gnome_canvas_item_i2w is actually
doing. It converts (xx,yy) from coordinates relative to 'item' into
world coordinates. So I fail to initialize them, and therefore get
bogus answers (although it somehow worked most of the time).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]