Blender V5.0
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
8
10
11using namespace Freestyle;
12
14
15//------------------------INSTANCE METHODS ----------------------------------
16
18 /* Wrap. */
19 WithinImageBoundaryUP1D___doc__,
20 "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > "
21 ":class:`WithinImageBoundaryUP1D`\n"
22 "\n"
23 ".. method:: __init__(xmin, ymin, xmax, ymax)\n"
24 "\n"
25 " Builds an WithinImageBoundaryUP1D object.\n"
26 "\n"
27 " :arg xmin: X lower bound of the image boundary.\n"
28 " :type xmin: float\n"
29 " :arg ymin: Y lower bound of the image boundary.\n"
30 " :type ymin: float\n"
31 " :arg xmax: X upper bound of the image boundary.\n"
32 " :type xmax: float\n"
33 " :arg ymax: Y upper bound of the image boundary.\n"
34 " :type ymax: float\n"
35 "\n"
36 ".. method:: __call__(inter)\n"
37 "\n"
38 " Returns true if the Interface1D intersects with image boundary.\n");
40 PyObject *args,
41 PyObject *kwds)
42{
43 static const char *kwlist[] = {"xmin", "ymin", "xmax", "ymax", nullptr};
44 double xmin, ymin, xmax, ymax;
45
46 if (!PyArg_ParseTupleAndKeywords(
47 args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax))
48 {
49 return -1;
50 }
51 self->py_up1D.up1D = new Predicates1D::WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax);
52 return 0;
53}
54
55/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
56
58 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
59 /*tp_name*/ "WithinImageBoundaryUP1D",
60 /*tp_basicsize*/ sizeof(BPy_WithinImageBoundaryUP1D),
61 /*tp_itemsize*/ 0,
62 /*tp_dealloc*/ nullptr,
63 /*tp_vectorcall_offset*/ 0,
64 /*tp_getattr*/ nullptr,
65 /*tp_setattr*/ nullptr,
66 /*tp_as_async*/ nullptr,
67 /*tp_repr*/ nullptr,
68 /*tp_as_number*/ nullptr,
69 /*tp_as_sequence*/ nullptr,
70 /*tp_as_mapping*/ nullptr,
71 /*tp_hash*/ nullptr,
72 /*tp_call*/ nullptr,
73 /*tp_str*/ nullptr,
74 /*tp_getattro*/ nullptr,
75 /*tp_setattro*/ nullptr,
76 /*tp_as_buffer*/ nullptr,
77 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
78 /*tp_doc*/ WithinImageBoundaryUP1D___doc__,
79 /*tp_traverse*/ nullptr,
80 /*tp_clear*/ nullptr,
81 /*tp_richcompare*/ nullptr,
82 /*tp_weaklistoffset*/ 0,
83 /*tp_iter*/ nullptr,
84 /*tp_iternext*/ nullptr,
85 /*tp_methods*/ nullptr,
86 /*tp_members*/ nullptr,
87 /*tp_getset*/ nullptr,
88 /*tp_base*/ &UnaryPredicate1D_Type,
89 /*tp_dict*/ nullptr,
90 /*tp_descr_get*/ nullptr,
91 /*tp_descr_set*/ nullptr,
92 /*tp_dictoffset*/ 0,
93 /*tp_init*/ (initproc)WithinImageBoundaryUP1D___init__,
94 /*tp_alloc*/ nullptr,
95 /*tp_new*/ nullptr,
96};
97
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