From 384539f7cc9feaa7ef7cee385cce472c6966c843 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 27 Apr 2009 00:24:16 +0200 Subject: Adding ue1 --- ue1/imgsynth/cpixelformat_24.h | 78 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 ue1/imgsynth/cpixelformat_24.h (limited to 'ue1/imgsynth/cpixelformat_24.h') diff --git a/ue1/imgsynth/cpixelformat_24.h b/ue1/imgsynth/cpixelformat_24.h new file mode 100644 index 0000000..e4fcc41 --- /dev/null +++ b/ue1/imgsynth/cpixelformat_24.h @@ -0,0 +1,78 @@ +/** + * @module cpixelformat_24 + * @author Manuel Mausz, 0728348 + * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. + * @date 18.04.2009 + */ + +#ifndef CPIXELFORMAT_24_H +#define CPIXELFORMAT_24_H + +#include +#include "cpixelformat.h" + +/** + * @class CPixelFormat_24 + * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. + * + * On error CPixelFormat::PixelFormatError is thrown. + */ +class CPixelFormat_24 : public CPixelFormat +{ + public: + /** + * @method CPixelFormat_24 + * @brief Default ctor + * @param bitmap pointer to CBitmap instance + * @return - + * @globalvars none + * @exception none + * @conditions none + */ + CPixelFormat_24(CBitmap *bitmap) + : CPixelFormat(bitmap) + {} + + /** + * @method ~CPixelFormat_24 + * @brief Default dtor + * @param - + * @return - + * @globalvars none + * @exception none + * @conditions none + */ + ~CPixelFormat_24() + {} + + /** + * @method setPixel + * @brief Modifies pixel at coordinates x, y + * @param pixel pointer to new pixel data + * @param x x-coordinate + * @param y y-coordinate + * @return - + * @globalvars none + * @exception PixelFormatError + * @conditions none + */ + void setPixel(const uint32_t *pixel, uint32_t x, uint32_t y); + + /** + * @method getBitCount + * @brief returns color bitcount supported by this class + * @param - + * @return color bitcount supported by this class + * @globalvars none + * @exception none + * @conditions none + */ + uint32_t getBitCount() + { + return 24; + } +}; + +#endif + +/* vim: set et sw=2 ts=2: */ -- cgit v1.2.3