X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpython%2Fprimitives.c;h=9abc42df17c911a9c8e056ab6f50e0b1869f7da1;hb=d9e7b27c4c906d5962d53cc00b060c48ddb1b5e3;hp=f4737491ce486eb14fd27967f48f320e8330f886;hpb=f81fba28e708944d0368867c87b291364c6c15da;p=swftools.git diff --git a/lib/python/primitives.c b/lib/python/primitives.c index f473749..9abc42d 100644 --- a/lib/python/primitives.c +++ b/lib/python/primitives.c @@ -140,6 +140,13 @@ PyObject* f_BBox(PyObject* self, PyObject* args, PyObject* kwargs) bbox->bbox = box; return (PyObject*)bbox; } +PyObject* f_BBox2(SRECT box) +{ + BBoxObject* bbox; + bbox = PyObject_New(BBoxObject, &BBoxClass); + bbox->bbox = box; + return (PyObject*)bbox; +} static PyObject* bbox_getattr(PyObject * self, char* a) { BBoxObject*bbox = (BBoxObject*)self; @@ -223,7 +230,7 @@ PyObject* f_Matrix(PyObject* _self, PyObject* args, PyObject* kwargs) MatrixObject*matrix = (MatrixObject*)self; mylog("+%08x(%d) f_Matrix", self, self->ob_refcnt); static char *kwlist[] = {"x", "y", "scale", "rotate", "pivotx", "pivoty", NULL}; - float x=0,y=0,scale=1.0,rotate=0,pivotx,pivoty; + float x=0,y=0,scale=1.0,rotate=0,pivotx=0,pivoty=0; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ffffff", kwlist, &x,&y,&scale,&rotate,&pivotx,&pivoty)) return NULL; mylog(" %08x(%d) f_Matrix: x=%f y=%f scale=%f rotate=%f", self, self->ob_refcnt, x,y,scale,rotate);