Example #1
0
static PyObject*
_outline_move(OutlineObject* self, PyObject* args)
{
    float x0, y0;
    if (!PyArg_ParseTuple(args, "ff", &x0, &y0))
	return NULL;

    ImagingOutlineMove(self->outline, x0, y0);

    Py_INCREF(Py_None);
    return Py_None;
}
Example #2
0
static PyObject*
_outline_move(OutlineObject* self, PyObject* args)
{
    float x0, y0;

    if (!PyArg_ParseTuple(args, "ff", &x0, &y0))
        return NULL;

    ImagingOutlineMove(self->outline, x0, y0);

    Py_RETURN_NONE;
}
Example #3
0
ImagingOutline
ImagingOutlineNew(void)
{
    ImagingOutline outline;

    outline = calloc(1, sizeof(struct ImagingOutlineInstance));
    if (!outline)
        return (ImagingOutline) ImagingError_MemoryError();

    outline->edges = NULL;
    outline->count = outline->size = 0;

    ImagingOutlineMove(outline, 0, 0);

    return outline;
}