Hello list,
I have tried to figure out how to call the w2c and c2w functions of gnome.canvas.Canvas().
In the C-api reference it is declared as: gnome_canvas_w2c(double wx, double wy, int *cx, int *cy)
If I try to call canvas_variable.w2c(wx, wy, cx, cy) it fails saying it only takes two arguments, not four.
So my question is how do i get the result from the function?
Have you tried this? cx, cy = canvas.w2c(wx, wy)
The cx and cy arguments in the C API are "out" args, which Python does not support. The common idiom in Python is to return multiple values (using a tuple).
James.
-- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
