static PyObject *Py_convert_path_to_polygons(PyObject *self, PyObject *args, PyObject *kwds) { py::PathIterator path; agg::trans_affine trans; double width = 0.0, height = 0.0; int closed_only = 1; std::vector<Polygon> result; const char *names[] = { "path", "transform", "width", "height", "closed_only", NULL }; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&O&|ddi:convert_path_to_polygons", (char **)names, &convert_path, &path, &convert_trans_affine, &trans, &width, &height, &closed_only)) { return NULL; } CALL_CPP("convert_path_to_polygons", (convert_path_to_polygons(path, trans, width, height, closed_only, result))); return convert_polygon_vector(result); }
static PyObject *Py_clip_path_to_rect(PyObject *self, PyObject *args, PyObject *kwds) { py::PathIterator path; agg::rect_d rect; int inside; std::vector<Polygon> result; if (!PyArg_ParseTuple(args, "O&O&i:clip_path_to_rect", &convert_path, &path, &convert_rect, &rect, &inside)) { return NULL; } CALL_CPP("clip_path_to_rect", (clip_path_to_rect(path, rect, inside, result))); return convert_polygon_vector(result); }
static PyObject *Py_convert_path_to_polygons(PyObject *self, PyObject *args, PyObject *kwds) { py::PathIterator path; agg::trans_affine trans; double width = 0.0, height = 0.0; std::vector<Polygon> result; if (!PyArg_ParseTuple(args, "O&O&|dd:convert_path_to_polygons", &convert_path, &path, &convert_trans_affine, &trans, &width, &height)) { return NULL; } CALL_CPP("convert_path_to_polygons", (convert_path_to_polygons(path, trans, width, height, result))); return convert_polygon_vector(result); }