[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: canvas coordinates in guile-gnome-platform 2.7.96
From: |
Greg Troxel |
Subject: |
Re: canvas coordinates in guile-gnome-platform 2.7.96 |
Date: |
26 Jan 2005 15:59:45 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Try the patch below. You should be able run this wtw.scm
With the patch I can use world-to-window. Thanks for sending it, and
I hope it gets in the real sources once the annual arch archive
confusion subsides :-)
I think my real problem is that canvas won't do quite what I want.
I'd like to set a more complex transform matrix for world-to-canvas
than scale + translate. It seems I can do that for a group, and I did
this for the root group:
(affine-absolute canvas-root 1 0 .1 1 0 0)
which skewed my vertical column out nicely, and more aggressive
transform worked too:
(affine-absolute canvas-root 0 4 4 0 0 0)
But window-to-world seems to work on canvas, and not canvas groups, so
it isn't immediately apparent how to go from world to canvas
coordinates for this item.
Is there a way to set the matrix for the whole canvas? In C one get
get an array with 6 values, and it's not the least bit clear from the
developer api docs if those are r/w or read-only values.
Other random observations:
It seems that gnome_canvas_get_item_at was not wrapped, but I can't
figure out why. It's not in the override list to ignore, and
arguments are pretty vanilla. I would like to get a buttonpress event
(which I have), and a) interpret that in my coordinate system (set
above in root group, since I apparently can't set a matrix for canvas
itself) and b) find which item was clicked.
The delete event doesn't seem to get mapped to a symbol by
gdk-event:type. I see the debug message pointing me to
gtk/gnome/gw/gdk-support.c..
gdk-event-button:x fails on a 2button-press event, but thre is no
gdk-event-2button:x
I can't set tooltips on canvas items. The set-tip function seems to
want a GtkWidget, and canvas items aren't widgets. I think this is a
missing feature in gnomecanvas, not a wrapper deficiency.
--
Greg Troxel <address@hidden>