/* call-seq: drawRect(x1, y1, x2, y2, color) Draws a rect on the screen. */ VALUE Graphics_drawRect(VALUE self, VALUE x1, VALUE y1, VALUE x2, VALUE y2, VALUE color) { OSL_COLOR c = hash2col(color); oslDrawRect(FIX2INT(x1), FIX2INT(y1), FIX2INT(x2), FIX2INT(y2), c); return Qnil; }
static PyObject* osl_drawRect(PyObject *self, PyObject *args, PyObject *kwargs) { int x1, y1, x2, y2; unsigned long color; if (!PyArg_ParseTuple(args, "iiiik:drawRect", &x1, &y1, &x2, &y2, &color)) return NULL; oslDrawRect(x1, y1, x2, y2, color); Py_INCREF(Py_None); return Py_None; }