X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpython%2Fprimitives.c;h=7a8a717e5e9842d78ee1dc14d139b534222cf3c4;hb=419089c30d9ee015ee1a7949dbc87c1380cdb240;hp=cbd2442ac5b3cc3d6b518809e58177fa8ed3a15c;hpb=99fdfae36ca02e0da16690b3eeb2904f906180ba;p=swftools.git diff --git a/lib/python/primitives.c b/lib/python/primitives.c index cbd2442..7a8a717 100644 --- a/lib/python/primitives.c +++ b/lib/python/primitives.c @@ -294,6 +294,17 @@ PyObject* f_Matrix(PyObject* _self, PyObject* args, PyObject* kwargs) static PyObject* matrix_getattr(PyObject * self, char* a) { PY_ASSERT_TYPE(self,&MatrixClass); + MatrixObject*matrix = (MatrixObject*)self; + if(!strcmp(a, "entries")) { + return Py_BuildValue("(ffffff)", + matrix->matrix.sx/65536.0, + matrix->matrix.r0/65536.0, + matrix->matrix.r1/65536.0, + matrix->matrix.sy/65536.0, + matrix->matrix.tx/20.0, + matrix->matrix.ty/20.0 + ); + } return NULL; } static int matrix_setattr(PyObject * self, char* a, PyObject* o) @@ -620,6 +631,8 @@ PyMethodDef* primitive_getMethods() CXFormClass.ob_type = &PyType_Type; BBoxClass.ob_type = &PyType_Type; MatrixClass.ob_type = &PyType_Type; + FillStyleClass.ob_type = &PyType_Type; + LineStyleClass.ob_type = &PyType_Type; return primitive_methods; }