Blender V2.61 - r43446

ImageBuff.h

Go to the documentation of this file.
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 IMAGEBUFF_H
00028 #define IMAGEBUFF_H
00029 
00030 
00031 #include "Common.h"
00032 
00033 #include "ImageBase.h"
00034 
00035 struct ImBuf;
00036 
00038 class ImageBuff : public ImageBase
00039 {
00040 private:
00041     struct ImBuf* m_imbuf;      // temporary structure for buffer manipulation
00042 public:
00044     ImageBuff (void) : ImageBase(true), m_imbuf(NULL) {}
00045 
00047     virtual ~ImageBuff (void);
00048 
00050     void load (unsigned char * img, short width, short height);
00052     void clear (short width, short height, unsigned char color);
00053 
00055     void plot (unsigned char * img, short width, short height, short x, short y, short mode);
00057     void plot (ImageBuff* img, short x, short y, short mode);
00058 
00060     virtual void refresh (void) {}
00061 };
00062 
00063 
00064 #endif
00065