Re: Gnome canvas issues
- From: Simon Kagedal <simon sdf se>
- To: Michael Fulbright <msf redhat com>
- Cc: gnome-devel-list gnome org
- Subject: Re: Gnome canvas issues
- Date: Sat, 10 Jul 1999 18:18:55 +0200
Hi Michael,
I'm also a Canvas newbie, so sorry if this is "well duhh" to you. But
it seems to work if you do gnome_canvas_item_move instead of
setting "x" and "y", like this:
--- gglobe/gglobe-canvas.c Sat Jul 10 00:38:56 1999
+++ gglobe-simon/gglobe-canvas.c Sat Jul 10 18:01:44 1999
@@ -239,7 +239,7 @@
double new_x, new_y;
double item_x, item_y;
double selx, sely;
- double oldselx, oldsely;
+ static double oldselx, oldsely;
int nearlong, nearest;
GnomeCanvasPoints *points;
@@ -306,7 +306,8 @@
"x2", selx+5.0, "y2", sely+5.0,
NULL);
*/
- gnome_canvas_item_set ( curmarker, "x", selx, "y", sely, NULL);
+/* gnome_canvas_item_set ( curmarker, "x", selx, "y", sely, NULL); */
+ gnome_canvas_item_move (curmarker, selx-oldselx, sely-oldsely);
}
gnome_canvas_points_free (points);
@@ -318,6 +319,9 @@
NULL);
gnome_canvas_item_raise_to_top ( curmarker );
curselection = nearest;
+
+ oldselx = selx;
+ oldsely = sely;
break;
case 2:
@@ -370,7 +374,7 @@
default:
break;
}
-
+
return FALSE;
}
The question why it doesn't work as well with setting "x" and "y" is
something I'd like to hear the answer to as well.
Best wishes,
--
Simon Kågedal <simon@sdf.se> - Homepage: http://www.sdf.se/~simon/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]