[cairo] PyCairo, make a copy of a Matrix

Steve stevech1097 at yahoo.com.au
Wed May 5 19:21:32 PDT 2010


On Wed, 2010-05-05 at 09:35 -0700, Stuart Axon <stuaxo2 at yahoo.com>
wrote:

> How do I make a copy of a Matrix in pycairo ?
> 
>  S++

>>> import cairo
>>> m1=cairo.Matrix(xx=1.0,yx=2.0,xy=3.0,yy=4.0,x0=5.0,y0=6.0)
>>> xx, yx, xy, yy, x0, y0 = m1
>>> m2=cairo.Matrix(xx, yx, xy, yy, x0, y0)
or
>>> m3=cairo.Matrix(*m1)


m4=cairo.Matrix(m1)
Does not work. But it might be useful to add it for consistency with the
way that Python list, dict, int work.

Steve




More information about the cairo mailing list