Blender  V2.93
BPy_ContourUP1D.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include "BPy_ContourUP1D.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 using namespace Freestyle;
28 
30 
31 //------------------------INSTANCE METHODS ----------------------------------
32 
33 static char ContourUP1D___doc__[] =
34  "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`ContourUP1D`\n"
35  "\n"
36  ".. method:: __call__(inter)\n"
37  "\n"
38  " Returns true if the Interface1D is a contour. An Interface1D is a\n"
39  " contour if it is bordered by a different shape on each of its sides.\n"
40  "\n"
41  " :arg inter: An Interface1D object.\n"
42  " :type inter: :class:`freestyle.types.Interface1D`\n"
43  " :return: True if the Interface1D is a contour, false otherwise.\n"
44  " :rtype: bool\n";
45 
46 static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject *kwds)
47 {
48  static const char *kwlist[] = {nullptr};
49 
50  if (!PyArg_ParseTupleAndKeywords(args, kwds, "", (char **)kwlist)) {
51  return -1;
52  }
53  self->py_up1D.up1D = new Predicates1D::ContourUP1D();
54  return 0;
55 }
56 
57 /*-----------------------BPy_ContourUP1D type definition ------------------------------*/
58 
59 PyTypeObject ContourUP1D_Type = {
60  PyVarObject_HEAD_INIT(nullptr, 0) "ContourUP1D", /* tp_name */
61  sizeof(BPy_ContourUP1D), /* tp_basicsize */
62  0, /* tp_itemsize */
63  nullptr, /* tp_dealloc */
64  0, /* tp_vectorcall_offset */
65  nullptr, /* tp_getattr */
66  nullptr, /* tp_setattr */
67  nullptr, /* tp_reserved */
68  nullptr, /* tp_repr */
69  nullptr, /* tp_as_number */
70  nullptr, /* tp_as_sequence */
71  nullptr, /* tp_as_mapping */
72  nullptr, /* tp_hash */
73  nullptr, /* tp_call */
74  nullptr, /* tp_str */
75  nullptr, /* tp_getattro */
76  nullptr, /* tp_setattro */
77  nullptr, /* tp_as_buffer */
78  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
79  ContourUP1D___doc__, /* tp_doc */
80  nullptr, /* tp_traverse */
81  nullptr, /* tp_clear */
82  nullptr, /* tp_richcompare */
83  0, /* tp_weaklistoffset */
84  nullptr, /* tp_iter */
85  nullptr, /* tp_iternext */
86  nullptr, /* tp_methods */
87  nullptr, /* tp_members */
88  nullptr, /* tp_getset */
89  &UnaryPredicate1D_Type, /* tp_base */
90  nullptr, /* tp_dict */
91  nullptr, /* tp_descr_get */
92  nullptr, /* tp_descr_set */
93  0, /* tp_dictoffset */
94  (initproc)ContourUP1D___init__, /* tp_init */
95  nullptr, /* tp_alloc */
96  nullptr, /* tp_new */
97 };
98 
100 
101 #ifdef __cplusplus
102 }
103 #endif
static char ContourUP1D___doc__[]
PyTypeObject ContourUP1D_Type
static int ContourUP1D___init__(BPy_ContourUP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject UnaryPredicate1D_Type
inherits from class Rep
Definition: AppCanvas.cpp:32