Re: how to know the offset of a canvas
- From: D M German <dmg uvic ca>
- To: Damon Chaplin <damonachaplin gmail com>
- Cc: goocanvas-list <goocanvas-list gnome org>
- Subject: Re: how to know the offset of a canvas
- Date: Mon, 30 Sep 2013 14:42:59 -0400
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]