00001 /* 00002 * Image buffer ubyte header 00003 * 00004 * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by Lukas Hermanns) 00005 * See "SoftPixelEngine.hpp" for license information. 00006 */ 00007 00008 #ifndef __SP_VIDEO_IMAGEBUFFER_UBYTE_H__ 00009 #define __SP_VIDEO_IMAGEBUFFER_UBYTE_H__ 00010 00011 00012 #include "Base/spStandard.hpp" 00013 #include "Base/spImageBufferContainer.hpp" 00014 00015 00016 namespace sp 00017 { 00018 namespace video 00019 { 00020 00021 00022 class ImageBufferUByte : public ImageBufferContainer<u8, 255> 00023 { 00024 00025 public: 00026 00027 ImageBufferUByte(); 00028 ImageBufferUByte( 00029 const EPixelFormats Format, const dim::size2di &Size, u32 Depth = 1, const u8* InitBuffer = 0 00030 ); 00031 ImageBufferUByte(const ImageBufferUByte* Original); 00032 ~ImageBufferUByte(); 00033 00034 /* === Functions === */ 00035 00036 ImageBuffer* copy() const; 00037 void copy(const ImageBuffer* Other); 00038 00039 void setBuffer(const void* ImageBuffer, const dim::point2di &Pos, const dim::size2di &Size); 00040 void getBuffer(void* ImageBuffer, const dim::point2di &Pos, const dim::size2di &Size) const; 00041 00042 void setColorKey(const video::color &Color, u8 Tolerance); 00043 00044 }; 00045 00046 00047 } // /namespace video 00048 00049 } // /namespace sp 00050 00051 00052 #endif 00053 00054 00055 00056 // ================================================================================