[cairo] Change the coordinate system for drawing

Tobias Hoffmann lcairo-list at thax.hardliners.org
Fri Oct 21 03:25:09 PDT 2011


craf wrote:
> Conclusion
> ----------
> I tried to use the methods, translated, rotated, transformed, but only
> take effect what I want to draw, for example a curve or a line.
>   
AFAIUI you want the coordinate-transformation to apply also to any 
input-events your DrawinArea receives?
This is not handled by cairo.
Any transformation you set in cairo only applies to outputs you make. 
You'll have to transform the input coordinates yourself.
I've seen cairo_user_to_device() and cairo_device_to_user() in the C 
API, which could be of help to you; there are certainly Python bindings 
for them. 

  Tobias


More information about the cairo mailing list