git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
99fdfae
)
added getter for matrix entries.
author
kramm
<kramm>
Thu, 30 Dec 2004 20:00:53 +0000
(20:00 +0000)
committer
kramm
<kramm>
Thu, 30 Dec 2004 20:00:53 +0000
(20:00 +0000)
lib/python/primitives.c
patch
|
blob
|
history
diff --git
a/lib/python/primitives.c
b/lib/python/primitives.c
index
cbd2442
..
008c84a
100644
(file)
--- 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);
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)
return NULL;
}
static int matrix_setattr(PyObject * self, char* a, PyObject* o)