From ec435f9141fe14ffb0d91ea1d5d556b1562e68d0 Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 6 Jun 2004 14:25:36 +0000 Subject: [PATCH] added new constructor for bbox. --- lib/python/primitives.c | 7 +++++++ lib/python/primitives.h | 1 + 2 files changed, 8 insertions(+) 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); -- 1.7.10.4