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