Blender  V3.3
BPy_ReadMapPixelF0D.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "BPy_ReadMapPixelF0D.h"
8 
9 #include "../../../stroke/AdvancedFunctions0D.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 using namespace Freestyle;
16 
18 
19 //------------------------INSTANCE METHODS ----------------------------------
20 
21 static char ReadMapPixelF0D___doc__[] =
22  "Class hierarchy: :class:`freestyle.types.UnaryFunction0D` > "
23  ":class:`freestyle.types.UnaryFunction0DFloat` > :class:`ReadMapPixelF0D`\n"
24  "\n"
25  ".. method:: __init__(map_name, level)\n"
26  "\n"
27  " Builds a ReadMapPixelF0D object.\n"
28  "\n"
29  " :arg map_name: The name of the map to be read.\n"
30  " :type map_name: str\n"
31  " :arg level: The level of the pyramid from which the pixel must be\n"
32  " read.\n"
33  " :type level: int\n"
34  "\n"
35  ".. method:: __call__(it)\n"
36  "\n"
37  " Reads a pixel in a map.\n"
38  "\n"
39  " :arg it: An Interface0DIterator object.\n"
40  " :type it: :class:`freestyle.types.Interface0DIterator`\n"
41  " :return: A pixel in a map.\n"
42  " :rtype: float\n";
43 
44 static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, PyObject *kwds)
45 {
46  static const char *kwlist[] = {"map_name", "level", nullptr};
47  const char *s;
48  int i;
49 
50  if (!PyArg_ParseTupleAndKeywords(args, kwds, "si", (char **)kwlist, &s, &i)) {
51  return -1;
52  }
53  self->py_uf0D_float.uf0D_float = new Functions0D::ReadMapPixelF0D(s, i);
54  self->py_uf0D_float.uf0D_float->py_uf0D = (PyObject *)self;
55  return 0;
56 }
57 
58 /*-----------------------BPy_ReadMapPixelF0D type definition ------------------------------*/
59 
60 PyTypeObject ReadMapPixelF0D_Type = {
61  PyVarObject_HEAD_INIT(nullptr, 0) "ReadMapPixelF0D", /* tp_name */
62  sizeof(BPy_ReadMapPixelF0D), /* tp_basicsize */
63  0, /* tp_itemsize */
64  nullptr, /* tp_dealloc */
65  0, /* tp_vectorcall_offset */
66  nullptr, /* tp_getattr */
67  nullptr, /* tp_setattr */
68  nullptr, /* tp_reserved */
69  nullptr, /* tp_repr */
70  nullptr, /* tp_as_number */
71  nullptr, /* tp_as_sequence */
72  nullptr, /* tp_as_mapping */
73  nullptr, /* tp_hash */
74  nullptr, /* tp_call */
75  nullptr, /* tp_str */
76  nullptr, /* tp_getattro */
77  nullptr, /* tp_setattro */
78  nullptr, /* tp_as_buffer */
79  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
80  ReadMapPixelF0D___doc__, /* tp_doc */
81  nullptr, /* tp_traverse */
82  nullptr, /* tp_clear */
83  nullptr, /* tp_richcompare */
84  0, /* tp_weaklistoffset */
85  nullptr, /* tp_iter */
86  nullptr, /* tp_iternext */
87  nullptr, /* tp_methods */
88  nullptr, /* tp_members */
89  nullptr, /* tp_getset */
90  &UnaryFunction0DFloat_Type, /* tp_base */
91  nullptr, /* tp_dict */
92  nullptr, /* tp_descr_get */
93  nullptr, /* tp_descr_set */
94  0, /* tp_dictoffset */
95  (initproc)ReadMapPixelF0D___init__, /* tp_init */
96  nullptr, /* tp_alloc */
97  nullptr, /* tp_new */
98 };
99 
101 
102 #ifdef __cplusplus
103 }
104 #endif
PyTypeObject ReadMapPixelF0D_Type
static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D *self, PyObject *args, PyObject *kwds)
static char ReadMapPixelF0D___doc__[]
PyTypeObject UnaryFunction0DFloat_Type
inherits from class Rep
Definition: AppCanvas.cpp:18