24 ContextFunctions_get_time_stamp___doc__,
25 ".. function:: get_time_stamp()\n"
27 " Returns the system time stamp.\n"
29 " :return: The system time stamp.\n"
38 ContextFunctions_get_canvas_width___doc__,
39 ".. method:: get_canvas_width()\n"
41 " Returns the canvas width.\n"
43 " :return: The canvas width.\n"
52 ContextFunctions_get_canvas_height___doc__,
53 ".. method:: get_canvas_height()\n"
55 " Returns the canvas height.\n"
57 " :return: The canvas height.\n"
66 ContextFunctions_get_border___doc__,
67 ".. method:: get_border()\n"
69 " Returns the border.\n"
71 " :return: A tuple of 4 numbers (xmin, ymin, xmax, ymax).\n"
72 " :rtype: tuple[int, int, int, int]\n");
76 PyObject *
v = PyTuple_New(4);
78 PyLong_FromLong(border.
getMin().x()),
79 PyLong_FromLong(border.
getMin().y()),
80 PyLong_FromLong(border.
getMax().x()),
81 PyLong_FromLong(border.
getMax().y()));
87 ContextFunctions_load_map___doc__,
88 ".. function:: load_map(file_name, map_name, num_levels=4, sigma=1.0)\n"
90 " Loads an image map for further reading.\n"
92 " :arg file_name: The name of the image file.\n"
93 " :type file_name: str\n"
94 " :arg map_name: The name that will be used to access this image.\n"
95 " :type map_name: str\n"
96 " :arg num_levels: The number of levels in the map pyramid\n"
97 " (default = 4). If num_levels == 0, the complete pyramid is\n"
99 " :type num_levels: int\n"
100 " :arg sigma: The sigma value of the gaussian function.\n"
101 " :type sigma: float\n");
104 static const char *kwlist[] = {
"file_name",
"map_name",
"num_levels",
"sigma",
nullptr};
105 char *fileName, *mapName;
109 if (!PyArg_ParseTupleAndKeywords(
110 args, kwds,
"ss|If", (
char **)kwlist, &fileName, &mapName, &nbLevels, &sigma))
120 ContextFunctions_read_map_pixel___doc__,
121 ".. function:: read_map_pixel(map_name, level, x, y)\n"
123 " Reads a pixel in a user-defined map.\n"
125 " :arg map_name: The name of the map.\n"
126 " :type map_name: str\n"
127 " :arg level: The level of the pyramid in which we wish to read the\n"
129 " :type level: int\n"
130 " :arg x: The x coordinate of the pixel we wish to read. The origin\n"
131 " is in the lower-left corner.\n"
133 " :arg y: The y coordinate of the pixel we wish to read. The origin\n"
134 " is in the lower-left corner.\n"
136 " :return: The floating-point value stored for that pixel.\n"
142 static const char *kwlist[] = {
"map_name",
"level",
"x",
"y",
nullptr};
147 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"siII", (
char **)kwlist, &mapName, &level, &
x, &
y))
156 ContextFunctions_read_complete_view_map_pixel___doc__,
157 ".. function:: read_complete_view_map_pixel(level, x, y)\n"
159 " Reads a pixel in the complete view map.\n"
161 " :arg level: The level of the pyramid in which we wish to read the\n"
163 " :type level: int\n"
164 " :arg x: The x coordinate of the pixel we wish to read. The origin\n"
165 " is in the lower-left corner.\n"
167 " :arg y: The y coordinate of the pixel we wish to read. The origin\n"
168 " is in the lower-left corner.\n"
170 " :return: The floating-point value stored for that pixel.\n"
176 static const char *kwlist[] = {
"level",
"x",
"y",
nullptr};
180 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"iII", (
char **)kwlist, &level, &
x, &
y)) {
188 ContextFunctions_read_directional_view_map_pixel___doc__,
189 ".. function:: read_directional_view_map_pixel(orientation, level, x, y)\n"
191 " Reads a pixel in one of the oriented view map images.\n"
193 " :arg orientation: The number telling which orientation we want to\n"
195 " :type orientation: int\n"
196 " :arg level: The level of the pyramid in which we wish to read the\n"
198 " :type level: int\n"
199 " :arg x: The x coordinate of the pixel we wish to read. The origin\n"
200 " is in the lower-left corner.\n"
202 " :arg y: The y coordinate of the pixel we wish to read. The origin\n"
203 " is in the lower-left corner.\n"
205 " :return: The floating-point value stored for that pixel.\n"
211 static const char *kwlist[] = {
"orientation",
"level",
"x",
"y",
nullptr};
212 int orientation, level;
215 if (!PyArg_ParseTupleAndKeywords(
216 args, kwds,
"iiII", (
char **)kwlist, &orientation, &level, &
x, &
y))
220 return PyFloat_FromDouble(
226 ContextFunctions_get_selected_fedge___doc__,
227 ".. function:: get_selected_fedge()\n"
229 " Returns the selected FEdge.\n"
231 " :return: The selected FEdge.\n"
232 " :rtype: :class:`FEdge`\n");
247 "The Blender Freestyle.ContextFunctions submodule\n"
253# pragma clang diagnostic push
254# pragma clang diagnostic ignored "-Wcast-function-type"
256# pragma GCC diagnostic push
257# pragma GCC diagnostic ignored "-Wcast-function-type"
265 ContextFunctions_get_time_stamp___doc__},
269 ContextFunctions_get_canvas_width___doc__},
270 {
"get_canvas_height",
273 ContextFunctions_get_canvas_height___doc__},
277 ContextFunctions_get_border___doc__},
280 METH_VARARGS | METH_KEYWORDS,
281 ContextFunctions_load_map___doc__},
284 METH_VARARGS | METH_KEYWORDS,
285 ContextFunctions_read_map_pixel___doc__},
286 {
"read_complete_view_map_pixel",
288 METH_VARARGS | METH_KEYWORDS,
289 ContextFunctions_read_complete_view_map_pixel___doc__},
290 {
"read_directional_view_map_pixel",
292 METH_VARARGS | METH_KEYWORDS,
293 ContextFunctions_read_directional_view_map_pixel___doc__},
294 {
"get_selected_fedge",
297 ContextFunctions_get_selected_fedge___doc__},
298 {
nullptr,
nullptr, 0,
nullptr},
303# pragma clang diagnostic pop
305# pragma GCC diagnostic pop
313 "Freestyle.ContextFunctions",
337 PyModule_AddObjectRef(
module,
"ContextFunctions", m);
static PyObject * ContextFunctions_get_canvas_height(PyObject *)
static PyObject * ContextFunctions_load_map(PyObject *, PyObject *args, PyObject *kwds)
static PyObject * ContextFunctions_read_directional_view_map_pixel(PyObject *, PyObject *args, PyObject *kwds)
static PyObject * ContextFunctions_read_map_pixel(PyObject *, PyObject *args, PyObject *kwds)
static PyObject * ContextFunctions_get_border(PyObject *)
static PyModuleDef module_definition
static PyObject * ContextFunctions_get_canvas_width(PyObject *)
PyDoc_STRVAR(ContextFunctions_get_time_stamp___doc__, ".. function:: get_time_stamp()\n" "\n" " Returns the system time stamp.\n" "\n" " :return: The system time stamp.\n" " :rtype: int\n")
static PyObject * ContextFunctions_get_time_stamp(PyObject *)
static PyObject * ContextFunctions_get_selected_fedge(PyObject *)
static PyObject * ContextFunctions_read_complete_view_map_pixel(PyObject *, PyObject *args, PyObject *kwds)
int ContextFunctions_Init(PyObject *module)
static PyMethodDef module_functions[]
PyObject * Any_BPy_FEdge_from_FEdge(FEdge &fe)
Functions related to context queries.
ATTR_WARN_UNUSED_RESULT const BMVert * v
const Point & getMin() const
const Point & getMax() const
void LoadMapCF(const char *iFileName, const char *iMapName, uint iNbLevels, float iSigma)
FEdge * GetSelectedFEdgeCF()
float ReadDirectionalViewMapPixelCF(int iOrientation, int level, uint x, uint y)
float ReadCompleteViewMapPixelCF(int level, uint x, uint y)
float ReadMapPixelCF(const char *iMapName, int level, uint x, uint y)
BBox< Vec2i > GetBorderCF()
static struct PyModuleDef module
#define PyTuple_SET_ITEMS(op_arg,...)