Re: Get current canvas position



Hi,

Am Montag 13 Oktober 2008 schrieb Till Harbaum / Lists:
> Which private variables are you referring to? I only see the gtkadjustments
> which return values that don't seem to be directly related to the scroll

I have to correct myself. The gtkadjustemts _do_ relate directly to the
scroll offset. This might be what the initial post in this thread was asking for.
This:

  GtkAdjustment *hadj = ((struct _GooCanvas*)map->canvas)->hadjustment;
  GtkAdjustment *vadj = ((struct _GooCanvas*)map->canvas)->vadjustment;
  gdouble hs, vs;
  hs = gtk_adjustment_get_value(hadj);
  vs = gtk_adjustment_get_value(vadj);
  goo_canvas_convert_from_pixels(GOO_CANVAS(map->canvas), &hs, &vs);

seems to return the current scroll position in hs and vs. 

Till


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