Blender V2.61 - r43446
|
00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of VideoTexture library 00004 00005 Copyright (c) 2007 The Zdeno Ash Miklas 00006 00007 This program is free software; you can redistribute it and/or modify it under 00008 the terms of the GNU Lesser General Public License as published by the Free Software 00009 Foundation; either version 2 of the License, or (at your option) any later 00010 version. 00011 00012 This program is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00014 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public License along with 00017 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00018 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00019 http://www.gnu.org/copyleft/lesser.txt. 00020 ----------------------------------------------------------------------------- 00021 */ 00022 00027 #if !defined IMAGEVIEWPORT_H 00028 #define IMAGEVIEWPORT_H 00029 00030 00031 #include "Common.h" 00032 00033 #include "ImageBase.h" 00034 00035 00037 class ImageViewport : public ImageBase 00038 { 00039 public: 00041 ImageViewport (void); 00042 00044 virtual ~ImageViewport (void); 00045 00047 bool getWhole (void) { return m_whole; } 00049 void setWhole (bool whole); 00050 00052 bool getAlpha (void) { return m_alpha; } 00054 void setAlpha (bool alpha) { m_alpha = alpha; } 00055 00057 short * getCaptureSize (void) { return m_capSize; } 00059 void setCaptureSize (short * size = NULL); 00060 00062 GLint * getPosition (void) { return m_position; } 00064 void setPosition (GLint * pos = NULL); 00065 00066 protected: 00068 GLint m_viewport[4]; 00069 00071 short m_capSize[2]; 00073 bool m_whole; 00075 bool m_alpha; 00076 00078 GLint m_position[2]; 00080 GLint m_upLeft[2]; 00081 00083 BYTE * m_viewportImage; 00085 bool m_texInit; 00086 00088 virtual void calcImage (unsigned int texId, double ts); 00089 00091 GLint * getViewportSize (void) { return m_viewport + 2; } 00092 }; 00093 00094 PyObject * ImageViewport_getCaptureSize (PyImage * self, void * closure); 00095 int ImageViewport_setCaptureSize (PyImage * self, PyObject * value, void * closure); 00096 PyObject * ImageViewport_getWhole (PyImage * self, void * closure); 00097 int ImageViewport_setWhole (PyImage * self, PyObject * value, void * closure); 00098 PyObject * ImageViewport_getAlpha (PyImage * self, void * closure); 00099 int ImageViewport_setAlpha (PyImage * self, PyObject * value, void * closure); 00100 00101 #endif 00102