Blender V4.3
BPy_WithinImageBoundaryUP1D.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15using namespace Freestyle;
16
18
19//------------------------INSTANCE METHODS ----------------------------------
20
22 /* Wrap. */
23 WithinImageBoundaryUP1D___doc__,
24 "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > "
25 ":class:`WithinImageBoundaryUP1D`\n"
26 "\n"
27 ".. method:: __init__(xmin, ymin, xmax, ymax)\n"
28 "\n"
29 " Builds an WithinImageBoundaryUP1D object.\n"
30 "\n"
31 " :arg xmin: X lower bound of the image boundary.\n"
32 " :type xmin: float\n"
33 " :arg ymin: Y lower bound of the image boundary.\n"
34 " :type ymin: float\n"
35 " :arg xmax: X upper bound of the image boundary.\n"
36 " :type xmax: float\n"
37 " :arg ymax: Y upper bound of the image boundary.\n"
38 " :type ymax: float\n"
39 "\n"
40 ".. method:: __call__(inter)\n"
41 "\n"
42 " Returns true if the Interface1D intersects with image boundary.\n");
43
45 PyObject *args,
46 PyObject *kwds)
47{
48 static const char *kwlist[] = {"xmin", "ymin", "xmax", "ymax", nullptr};
49 double xmin, ymin, xmax, ymax;
50
51 if (!PyArg_ParseTupleAndKeywords(
52 args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax))
53 {
54 return -1;
55 }
56 self->py_up1D.up1D = new Predicates1D::WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax);
57 return 0;
58}
59
60/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
61
63 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
64 /*tp_name*/ "WithinImageBoundaryUP1D",
65 /*tp_basicsize*/ sizeof(BPy_WithinImageBoundaryUP1D),
66 /*tp_itemsize*/ 0,
67 /*tp_dealloc*/ nullptr,
68 /*tp_vectorcall_offset*/ 0,
69 /*tp_getattr*/ nullptr,
70 /*tp_setattr*/ nullptr,
71 /*tp_as_async*/ nullptr,
72 /*tp_repr*/ nullptr,
73 /*tp_as_number*/ nullptr,
74 /*tp_as_sequence*/ nullptr,
75 /*tp_as_mapping*/ nullptr,
76 /*tp_hash*/ nullptr,
77 /*tp_call*/ nullptr,
78 /*tp_str*/ nullptr,
79 /*tp_getattro*/ nullptr,
80 /*tp_setattro*/ nullptr,
81 /*tp_as_buffer*/ nullptr,
82 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
83 /*tp_doc*/ WithinImageBoundaryUP1D___doc__,
84 /*tp_traverse*/ nullptr,
85 /*tp_clear*/ nullptr,
86 /*tp_richcompare*/ nullptr,
87 /*tp_weaklistoffset*/ 0,
88 /*tp_iter*/ nullptr,
89 /*tp_iternext*/ nullptr,
90 /*tp_methods*/ nullptr,
91 /*tp_members*/ nullptr,
92 /*tp_getset*/ nullptr,
93 /*tp_base*/ &UnaryPredicate1D_Type,
94 /*tp_dict*/ nullptr,
95 /*tp_descr_get*/ nullptr,
96 /*tp_descr_set*/ nullptr,
97 /*tp_dictoffset*/ 0,
98 /*tp_init*/ (initproc)WithinImageBoundaryUP1D___init__,
99 /*tp_alloc*/ nullptr,
100 /*tp_new*/ nullptr,
101};
102
104
105#ifdef __cplusplus
106}
107#endif
PyTypeObject UnaryPredicate1D_Type
static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject WithinImageBoundaryUP1D_Type
PyDoc_STRVAR(WithinImageBoundaryUP1D___doc__, "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > " ":class:`WithinImageBoundaryUP1D`\n" "\n" ".. method:: __init__(xmin, ymin, xmax, ymax)\n" "\n" " Builds an WithinImageBoundaryUP1D object.\n" "\n" " :arg xmin: X lower bound of the image boundary.\n" " :type xmin: float\n" " :arg ymin: Y lower bound of the image boundary.\n" " :type ymin: float\n" " :arg xmax: X upper bound of the image boundary.\n" " :type xmax: float\n" " :arg ymax: Y upper bound of the image boundary.\n" " :type ymax: float\n" "\n" ".. method:: __call__(inter)\n" "\n" " Returns true if the Interface1D intersects with image boundary.\n")
PyObject * self
inherits from class Rep
Definition AppCanvas.cpp:20