Getting window coordinates of a GnomeCanvasItem
- From: Marc Mulcahy <marc mulcahy sun com>
- To: gnome-libs-devel gnome org
- Subject: Getting window coordinates of a GnomeCanvasItem
- Date: Fri, 02 Nov 2001 23:40:11 -0700
I am about half way through implementing accessibility support on
libgnomecanvas, such that an assistive technology could at least traverse
the higherarky of canvas items and get useful information from
GnomeCanvasRichText, GnomeCanvasText, GnomeCanvasPixbuf, and
GnomeCanvasWidget items.
What is the appropriate way to get the window-based and screen-based
geometry of a GnomeCanvasItem derivative. the correct approach appears to be:
gdouble world_x1, world_y1, world_x2, world_y2;
gdouble win_x1, win_y1, win_x2, win_y2;
GnomeCanvasItem *item;
...
gnome_canvas_item_get_bounds (item,
&world_x1, &world_y1,
&world_x2, &world_y2);
gnome_canvas_world_to_window (item->canvas,
world_x1, world_y1,
&win_x1, &win_y1);
...
Am I even close?
Our accessibility API returns geometry information as gints-- can win_x1
and win_y1 be safely cast to gints?
Thanks,
Marc
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]