Re: canvas



On Wed, Feb 02, 2000 at 04:12:06PM +0100, Jens Finke wrote:
> Martin Oberzalek wrote:
> > 
> > #include <gnome.h>
> > 
> > GtkWidget *canvas;
> > GnomeCanvasItem *item, *bg;
> > 
> > int x=0;
> > 
> > int timefunc( gpointer data)
> > {
> >   x = x + 10;
> > 
> >   gnome_canvas_item_move( item, x, 100 );
> > 
> >   return TRUE;
> > }
> 
> I think the problem is that you move the item out of the visible area.
> Consider that gnome_canvas_item_move adds the x and y parameter to the
> current position of the item. I think you want to move the item
> horizontal 10 units per function call. Then use this:
> gnome_canvas_item_move(item, 10, 0);

Hell you are right!
The function uses the relative position of the item.
I thought it uses absolute coordinates.

thx

-- 
Fahrt wohl, wo auch immer Ihr hinfahrt,
bis Ihr am Ende Eurer Reise wieder wohlbehalten in Euren Horsten landet.



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