GnomeCanvas question
- From: Ronald de Man <deman win tue nl>
- To: gnome-devel-list gnome org
- Subject: GnomeCanvas question
- Date: Mon, 23 Aug 1999 01:14:58 +0200
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);
This works well, except in situations where I had dragged the item
outside the canvas. In that case, sometimes it works, and sometimes
it doesn't. When it doesn't work, the xx and yy are equal to 'nan'.
I can probably hack around this by first moving the item
with gnome_canvas_item_move back to the canvas, and then performing the
above, but I don't think this problem should arise at all.
Or am I doing something wrong?
Ronald
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]