2
-----------------------------------------------------------------------------
3
This source file is part of VideoTexture library
5
Copyright (c) 2007 The Zdeno Ash Miklas
7
This program is free software; you can redistribute it and/or modify it under
8
the terms of the GNU Lesser General Public License as published by the Free Software
9
Foundation; either version 2 of the License, or (at your option) any later
12
This program is distributed in the hope that it will be useful, but WITHOUT
13
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
You should have received a copy of the GNU Lesser General Public License along with
17
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
19
http://www.gnu.org/copyleft/lesser.txt.
20
-----------------------------------------------------------------------------
2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Copyright (c) 2007 The Zdeno Ash Miklas
20
* This source file is part of VideoTexture library
24
* ***** END GPL LICENSE BLOCK *****
23
27
/** \file gameengine/VideoTexture/FilterBase.cpp
24
28
* \ingroup bgevideotex
92
96
// object allocation
93
PyObject * Filter_allocNew (PyTypeObject * type, PyObject * args, PyObject * kwds)
97
PyObject *Filter_allocNew (PyTypeObject *type, PyObject *args, PyObject *kwds)
96
PyFilter * self = reinterpret_cast<PyFilter*>(type->tp_alloc(type, 0));
100
PyFilter *self = reinterpret_cast<PyFilter*>(type->tp_alloc(type, 0));
97
101
// initialize object structure
98
102
self->m_filter = NULL;
99
103
// return allocated object
116
120
// get previous pixel filter object
117
PyObject * Filter_getPrevious (PyFilter * self, void * closure)
121
PyObject *Filter_getPrevious (PyFilter *self, void *closure)
119
123
// if filter object is available
120
124
if (self->m_filter != NULL)
137
141
// set previous pixel filter object
138
int Filter_setPrevious (PyFilter * self, PyObject * value, void * closure)
142
int Filter_setPrevious (PyFilter *self, PyObject *value, void *closure)
140
144
// if filter object is available
141
145
if (self->m_filter != NULL)