Re: how to know the offset of a canvas




 Damon> I don't think there is a specific function.

 Damon> I think you'll have to use the adjustments to get the position and then
 Damon> goo_canvas_convert_from_pixels() to convert to canvas coordinates.

 Damon> e.g. maybe something like this:

 double x = gtk_adjustment_get_value (canvas->hadjustment)
 double y = gtk_adjustment_get_value (canvas->yadjustment)
 goo_canvas_convert_from_pixels (canvas, &x, &y);


Thanks Damon, that was exactly what I needed.

---daniel

--
Daniel M. German                  "Much of my work has come
   John W. Backus ->               from being lazy"
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 


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