upiwin/src/ep_graphics.c

14 lines
282 B
C
Raw Normal View History

#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "wintype.h"
#include "gfxtype.h"
PyObject *Epython_rgb(PyObject *self, PyObject *args)
{
UINT32 r, g, b;
if (!PyArg_ParseTuple(args, "kkk", &r, &g, &b))
return NULL;
return PyLong_FromUnsignedLong(RGB(r, g, b));
}