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 ".. function:: get_canvas_width()\n"
41 " Returns the canvas width.\n"
43 " :return: The canvas width.\n"
52 ContextFunctions_get_canvas_height___doc__,
53 ".. function:: get_canvas_height()\n"
55 " Returns the canvas height.\n"
57 " :return: The canvas height.\n"
66 ContextFunctions_get_border___doc__,
67 ".. function:: 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 " :param file_name: The name of the image file.\n"
93 " :type file_name: str\n"
94 " :param map_name: The name that will be used to access this image.\n"
95 " :type map_name: str\n"
96 " :param 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 " :param 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(args,
131 ContextFunctions_read_map_pixel___doc__,
132 ".. function:: read_map_pixel(map_name, level, x, y)\n"
134 " Reads a pixel in a user-defined map.\n"
136 " :param map_name: The name of the map.\n"
137 " :type map_name: str\n"
138 " :param level: The level of the pyramid in which we wish to read the\n"
140 " :type level: int\n"
141 " :param x: The x coordinate of the pixel we wish to read. The origin\n"
142 " is in the lower-left corner.\n"
144 " :param y: The y coordinate of the pixel we wish to read. The origin\n"
145 " is in the lower-left corner.\n"
147 " :return: The floating-point value stored for that pixel.\n"
153 static const char *kwlist[] = {
"map_name",
"level",
"x",
"y",
nullptr};
158 if (!PyArg_ParseTupleAndKeywords(args,
178 ContextFunctions_read_complete_view_map_pixel___doc__,
179 ".. function:: read_complete_view_map_pixel(level, x, y)\n"
181 " Reads a pixel in the complete view map.\n"
183 " :param level: The level of the pyramid in which we wish to read the\n"
185 " :type level: int\n"
186 " :param x: The x coordinate of the pixel we wish to read. The origin\n"
187 " is in the lower-left corner.\n"
189 " :param y: The y coordinate of the pixel we wish to read. The origin\n"
190 " is in the lower-left corner.\n"
192 " :return: The floating-point value stored for that pixel.\n"
198 static const char *kwlist[] = {
"level",
"x",
"y",
nullptr};
202 if (!PyArg_ParseTupleAndKeywords(args,
207 ":read_complete_view_map_pixel",
220 ContextFunctions_read_directional_view_map_pixel___doc__,
221 ".. function:: read_directional_view_map_pixel(orientation, level, x, y)\n"
223 " Reads a pixel in one of the oriented view map images.\n"
225 " :param orientation: The number telling which orientation we want to\n"
227 " :type orientation: int\n"
228 " :param level: The level of the pyramid in which we wish to read the\n"
230 " :type level: int\n"
231 " :param x: The x coordinate of the pixel we wish to read. The origin\n"
232 " is in the lower-left corner.\n"
234 " :param y: The y coordinate of the pixel we wish to read. The origin\n"
235 " is in the lower-left corner.\n"
237 " :return: The floating-point value stored for that pixel.\n"
243 static const char *kwlist[] = {
"orientation",
"level",
"x",
"y",
nullptr};
244 int orientation, level;
247 if (!PyArg_ParseTupleAndKeywords(args,
253 ":read_directional_view_map_pixel",
262 return PyFloat_FromDouble(
268 ContextFunctions_get_selected_fedge___doc__,
269 ".. function:: get_selected_fedge()\n"
271 " Returns the selected FEdge.\n"
273 " :return: The selected FEdge.\n"
274 " :rtype: :class:`FEdge`\n");
289 "The Blender Freestyle.ContextFunctions submodule\n"
295# pragma clang diagnostic push
296# pragma clang diagnostic ignored "-Wcast-function-type"
298# pragma GCC diagnostic push
299# pragma GCC diagnostic ignored "-Wcast-function-type"
307 ContextFunctions_get_time_stamp___doc__},
311 ContextFunctions_get_canvas_width___doc__},
312 {
"get_canvas_height",
315 ContextFunctions_get_canvas_height___doc__},
319 ContextFunctions_get_border___doc__},
322 METH_VARARGS | METH_KEYWORDS,
323 ContextFunctions_load_map___doc__},
326 METH_VARARGS | METH_KEYWORDS,
327 ContextFunctions_read_map_pixel___doc__},
328 {
"read_complete_view_map_pixel",
330 METH_VARARGS | METH_KEYWORDS,
331 ContextFunctions_read_complete_view_map_pixel___doc__},
332 {
"read_directional_view_map_pixel",
334 METH_VARARGS | METH_KEYWORDS,
335 ContextFunctions_read_directional_view_map_pixel___doc__},
336 {
"get_selected_fedge",
339 ContextFunctions_get_selected_fedge___doc__},
340 {
nullptr,
nullptr, 0,
nullptr},
345# pragma clang diagnostic pop
347# pragma GCC diagnostic pop
355 "Freestyle.ContextFunctions",
371 if (module ==
nullptr) {
379 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 *)
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)
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :param inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :param inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
Functions related to context queries.
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()
#define PyTuple_SET_ITEMS(op_arg,...)