From: kramm Date: Sun, 6 Jun 2004 14:25:36 +0000 (+0000) Subject: added new constructor for bbox. X-Git-Tag: release-0-6-0~133 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=ec435f9141fe14ffb0d91ea1d5d556b1562e68d0 added new constructor for bbox. --- diff --git a/lib/python/primitives.c b/lib/python/primitives.c index f473749..e70f28d 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; diff --git a/lib/python/primitives.h b/lib/python/primitives.h index f4361f1..ac62828 100644 --- a/lib/python/primitives.h +++ b/lib/python/primitives.h @@ -39,6 +39,7 @@ PyObject* f_Color(PyObject* self, PyObject* args, PyObject* kwargs); PyObject* f_ColorTransform(PyObject* self, PyObject* args, PyObject* kwargs); PyObject* f_Gradient(PyObject* self, PyObject* args, PyObject* kwargs); PyObject* f_BBox(PyObject* self, PyObject* args, PyObject* kwargs); +PyObject* f_BBox2(SRECT bbox); PyObject* f_Matrix(PyObject* self, PyObject* args, PyObject* kwargs); RGBA color_getRGBA(PyObject*self);