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"
39 ContextFunctions_get_canvas_width___doc__,
40 ".. method:: get_canvas_width()\n"
42 " Returns the canvas width.\n"
44 " :return: The canvas width.\n"
54 ContextFunctions_get_canvas_height___doc__,
55 ".. method:: get_canvas_height()\n"
57 " Returns the canvas height.\n"
59 " :return: The canvas height.\n"
69 ContextFunctions_get_border___doc__,
70 ".. method:: get_border()\n"
72 " Returns the border.\n"
74 " :return: A tuple of 4 numbers (xmin, ymin, xmax, ymax).\n"
75 " :rtype: tuple[int, int, int, int]\n");
80 PyObject *
v = PyTuple_New(4);
82 PyLong_FromLong(border.
getMin().x()),
83 PyLong_FromLong(border.
getMin().y()),
84 PyLong_FromLong(border.
getMax().x()),
85 PyLong_FromLong(border.
getMax().y()));
91 ContextFunctions_load_map___doc__,
92 ".. function:: load_map(file_name, map_name, num_levels=4, sigma=1.0)\n"
94 " Loads an image map for further reading.\n"
96 " :arg file_name: The name of the image file.\n"
97 " :type file_name: str\n"
98 " :arg map_name: The name that will be used to access this image.\n"
99 " :type map_name: str\n"
100 " :arg num_levels: The number of levels in the map pyramid\n"
101 " (default = 4). If num_levels == 0, the complete pyramid is\n"
103 " :type num_levels: int\n"
104 " :arg sigma: The sigma value of the gaussian function.\n"
105 " :type sigma: float\n");
109 static const char *kwlist[] = {
"file_name",
"map_name",
"num_levels",
"sigma",
nullptr};
110 char *fileName, *mapName;
114 if (!PyArg_ParseTupleAndKeywords(
115 args, kwds,
"ss|If", (
char **)kwlist, &fileName, &mapName, &nbLevels, &sigma))
125 ContextFunctions_read_map_pixel___doc__,
126 ".. function:: read_map_pixel(map_name, level, x, y)\n"
128 " Reads a pixel in a user-defined map.\n"
130 " :arg map_name: The name of the map.\n"
131 " :type map_name: str\n"
132 " :arg level: The level of the pyramid in which we wish to read the\n"
134 " :type level: int\n"
135 " :arg x: The x coordinate of the pixel we wish to read. The origin\n"
136 " is in the lower-left corner.\n"
138 " :arg y: The y coordinate of the pixel we wish to read. The origin\n"
139 " is in the lower-left corner.\n"
141 " :return: The floating-point value stored for that pixel.\n"
148 static const char *kwlist[] = {
"map_name",
"level",
"x",
"y",
nullptr};
153 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"siII", (
char **)kwlist, &mapName, &level, &
x, &
y))
162 ContextFunctions_read_complete_view_map_pixel___doc__,
163 ".. function:: read_complete_view_map_pixel(level, x, y)\n"
165 " Reads a pixel in the complete view map.\n"
167 " :arg level: The level of the pyramid in which we wish to read the\n"
169 " :type level: int\n"
170 " :arg x: The x coordinate of the pixel we wish to read. The origin\n"
171 " is in the lower-left corner.\n"
173 " :arg y: The y coordinate of the pixel we wish to read. The origin\n"
174 " is in the lower-left corner.\n"
176 " :return: The floating-point value stored for that pixel.\n"
183 static const char *kwlist[] = {
"level",
"x",
"y",
nullptr};
187 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"iII", (
char **)kwlist, &level, &
x, &
y)) {
195 ContextFunctions_read_directional_view_map_pixel___doc__,
196 ".. function:: read_directional_view_map_pixel(orientation, level, x, y)\n"
198 " Reads a pixel in one of the oriented view map images.\n"
200 " :arg orientation: The number telling which orientation we want to\n"
202 " :type orientation: int\n"
203 " :arg level: The level of the pyramid in which we wish to read the\n"
205 " :type level: int\n"
206 " :arg x: The x coordinate of the pixel we wish to read. The origin\n"
207 " is in the lower-left corner.\n"
209 " :arg y: The y coordinate of the pixel we wish to read. The origin\n"
210 " is in the lower-left corner.\n"
212 " :return: The floating-point value stored for that pixel.\n"
219 static const char *kwlist[] = {
"orientation",
"level",
"x",
"y",
nullptr};
220 int orientation, level;
223 if (!PyArg_ParseTupleAndKeywords(
224 args, kwds,
"iiII", (
char **)kwlist, &orientation, &level, &
x, &
y))
228 return PyFloat_FromDouble(
234 ContextFunctions_get_selected_fedge___doc__,
235 ".. function:: get_selected_fedge()\n"
237 " Returns the selected FEdge.\n"
239 " :return: The selected FEdge.\n"
240 " :rtype: :class:`FEdge`\n");
256 "The Blender Freestyle.ContextFunctions submodule\n"
263# pragma clang diagnostic push
264# pragma clang diagnostic ignored "-Wcast-function-type"
266# pragma GCC diagnostic push
267# pragma GCC diagnostic ignored "-Wcast-function-type"
275 ContextFunctions_get_time_stamp___doc__},
279 ContextFunctions_get_canvas_width___doc__},
280 {
"get_canvas_height",
283 ContextFunctions_get_canvas_height___doc__},
287 ContextFunctions_get_border___doc__},
290 METH_VARARGS | METH_KEYWORDS,
291 ContextFunctions_load_map___doc__},
294 METH_VARARGS | METH_KEYWORDS,
295 ContextFunctions_read_map_pixel___doc__},
296 {
"read_complete_view_map_pixel",
298 METH_VARARGS | METH_KEYWORDS,
299 ContextFunctions_read_complete_view_map_pixel___doc__},
300 {
"read_directional_view_map_pixel",
302 METH_VARARGS | METH_KEYWORDS,
303 ContextFunctions_read_directional_view_map_pixel___doc__},
304 {
"get_selected_fedge",
307 ContextFunctions_get_selected_fedge___doc__},
308 {
nullptr,
nullptr, 0,
nullptr},
313# pragma clang diagnostic pop
315# pragma GCC diagnostic pop
323 "Freestyle.ContextFunctions",
347 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,...)