Re: Starting to code with gnome-libs and ???



>  I looked at GnomeCanvas and decided that this is what I shall move
>  to.

If what you want to do is plot a large number of points, you may want
to consider writing your own canvas item.  You could base it on the
scatter plot item used for Guppi (it uses tiling to be efficient).

>  	1. First of all, I can't compile gnome-libs on my Ultra 10. It says it
>  	   wants Berkeley db. Where do I get one? I looked at my RH6.0 box
>  	   and could not find one either.

You can get it from http://www.sleepycat.com.

>  	2. A programming question. Reading the headers and a little
>  	   development doc, I think, I got a more-or-less clear idea on
>  	   how to code with GnomeCanvas. There is one thing, though, that
>  	   I can't understand. How does one group the GnomeCanvasItem's?
>  	   As far as I understand, one has to create a group before doing
>  	   gnome_canvas_item_new().

You have to create a group and then put items inside it.  For example,

	GnomeCanvasItem *my_group;
	GnomeCanvasItem *my_item;

	my_group = gnome_canvas_item_new (gnome_canvas_root (my_canvas),
					  gnome_canvas_group_get_type (),
					  "x", 10.0,
					  "y", 20.0,
					  NULL);

	my_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP (my_group),
					 gnome_canvas_rect_get_type (),
					 "x1", 0.0,
					 "y1", 0.0,
					 "x2", 10.0,
					 "y2", 10.0,
					 "fill_color", "blue",
					 NULL);

Good luck,

  Federico



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