[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
canvas coordinates in guile-gnome-platform 2.7.96
From: |
Greg Troxel |
Subject: |
canvas coordinates in guile-gnome-platform 2.7.96 |
Date: |
19 Jan 2005 17:02:12 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
I have created a canvas and placed items. I didn't set up any
canvas/world/pixel mappings explicitly. I think that means that
world (0,0) is center of canvas, and 1 pixel/canvas unit.
I tried to use functions to convert world to canvas. I was able to
find the generic world-to-window and ask for methods:
guile> (generic-function-methods world-to-window)
(#<<method> (<gnome-canvas> <top> <top> <top> <top>) 8437f50>)
I didn't grasp why this took 5, not 3, but I passsed 0
(world-to-window *canvas* 10 20 0 0)
and got wrong type arg.
#f doesn't error, but no value is returned.
Reading the gnomecanvas header files, it seems the c library procedure
takes two doubles and two 'double *', which are "obviously" output
parameters.
I tried passing variables with values, hoping they'd mutate, and then
the symbols for the variable, but all of these lost with type errors.
Does anyone know how can I use this function from Scheme?
--
Greg Troxel <address@hidden>