Blender V5.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
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 " :param xmin: X lower bound of the image boundary.\n"
28 " :type xmin: float\n"
29 " :param ymin: Y lower bound of the image boundary.\n"
30 " :type ymin: float\n"
31 " :param xmax: X upper bound of the image boundary.\n"
32 " :type xmax: float\n"
33 " :param 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"
39 "\n"
40 " :param inter: The Interface1D to test.\n"
41 " :type inter: :class:`freestyle.types.Interface1D`\n"
42 " :rtype: bool\n");
44 PyObject *args,
45 PyObject *kwds)
46{
47 static const char *kwlist[] = {"xmin", "ymin", "xmax", "ymax", nullptr};
48 double xmin, ymin, xmax, ymax;
49
50 if (!PyArg_ParseTupleAndKeywords(args,
51 kwds,
52 "d" /* `xmin` */
53 "d" /* `ymin` */
54 "d" /* `xmax` */
55 "d" /* `ymax` */
56 ":__init__",
57 (char **)kwlist,
58 &xmin,
59 &ymin,
60 &xmax,
61 &ymax))
62 {
63 return -1;
64 }
65 self->py_up1D.up1D = new Predicates1D::WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax);
66 return 0;
67}
68
69/*-----------------------BPy_TrueUP1D type definition ------------------------------*/
70
72 /*ob_base*/ PyVarObject_HEAD_INIT(nullptr, 0)
73 /*tp_name*/ "WithinImageBoundaryUP1D",
74 /*tp_basicsize*/ sizeof(BPy_WithinImageBoundaryUP1D),
75 /*tp_itemsize*/ 0,
76 /*tp_dealloc*/ nullptr,
77 /*tp_vectorcall_offset*/ 0,
78 /*tp_getattr*/ nullptr,
79 /*tp_setattr*/ nullptr,
80 /*tp_as_async*/ nullptr,
81 /*tp_repr*/ nullptr,
82 /*tp_as_number*/ nullptr,
83 /*tp_as_sequence*/ nullptr,
84 /*tp_as_mapping*/ nullptr,
85 /*tp_hash*/ nullptr,
86 /*tp_call*/ nullptr,
87 /*tp_str*/ nullptr,
88 /*tp_getattro*/ nullptr,
89 /*tp_setattro*/ nullptr,
90 /*tp_as_buffer*/ nullptr,
91 /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
92 /*tp_doc*/ WithinImageBoundaryUP1D___doc__,
93 /*tp_traverse*/ nullptr,
94 /*tp_clear*/ nullptr,
95 /*tp_richcompare*/ nullptr,
96 /*tp_weaklistoffset*/ 0,
97 /*tp_iter*/ nullptr,
98 /*tp_iternext*/ nullptr,
99 /*tp_methods*/ nullptr,
100 /*tp_members*/ nullptr,
101 /*tp_getset*/ nullptr,
102 /*tp_base*/ &UnaryPredicate1D_Type,
103 /*tp_dict*/ nullptr,
104 /*tp_descr_get*/ nullptr,
105 /*tp_descr_set*/ nullptr,
106 /*tp_dictoffset*/ 0,
107 /*tp_init*/ (initproc)WithinImageBoundaryUP1D___init__,
108 /*tp_alloc*/ nullptr,
109 /*tp_new*/ nullptr,
110};
111
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")
PyTypeObject UnaryPredicate1D_Type
static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self, PyObject *args, PyObject *kwds)
PyTypeObject WithinImageBoundaryUP1D_Type
inherits from class Rep
Definition AppCanvas.cpp:20
PyObject_HEAD Freestyle::UnaryPredicate1D * up1D