diff options
| author | manuel <manuel@nc8430.lan> | 2009-04-27 00:24:16 +0200 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-04-27 00:24:16 +0200 |
| commit | 384539f7cc9feaa7ef7cee385cce472c6966c843 (patch) | |
| tree | 42d3cbc96d44087c0b6bbe8d41710e5c5f1efced /ue1/imgsynth/cpixelformat_24.h | |
| download | ooprog-384539f7cc9feaa7ef7cee385cce472c6966c843.tar.gz ooprog-384539f7cc9feaa7ef7cee385cce472c6966c843.tar.bz2 ooprog-384539f7cc9feaa7ef7cee385cce472c6966c843.zip | |
Adding ue1
Diffstat (limited to 'ue1/imgsynth/cpixelformat_24.h')
| -rw-r--r-- | ue1/imgsynth/cpixelformat_24.h | 78 |
1 files changed, 78 insertions, 0 deletions
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 @@ | |||
| 1 | /** | ||
| 2 | * @module cpixelformat_24 | ||
| 3 | * @author Manuel Mausz, 0728348 | ||
| 4 | * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. | ||
| 5 | * @date 18.04.2009 | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef CPIXELFORMAT_24_H | ||
| 9 | #define CPIXELFORMAT_24_H | ||
| 10 | |||
| 11 | #include <fstream> | ||
| 12 | #include "cpixelformat.h" | ||
| 13 | |||
| 14 | /** | ||
| 15 | * @class CPixelFormat_24 | ||
| 16 | * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. | ||
| 17 | * | ||
| 18 | * On error CPixelFormat::PixelFormatError is thrown. | ||
| 19 | */ | ||
| 20 | class CPixelFormat_24 : public CPixelFormat | ||
| 21 | { | ||
| 22 | public: | ||
| 23 | /** | ||
| 24 | * @method CPixelFormat_24 | ||
| 25 | * @brief Default ctor | ||
| 26 | * @param bitmap pointer to CBitmap instance | ||
| 27 | * @return - | ||
| 28 | * @globalvars none | ||
| 29 | * @exception none | ||
| 30 | * @conditions none | ||
| 31 | */ | ||
| 32 | CPixelFormat_24(CBitmap *bitmap) | ||
| 33 | : CPixelFormat(bitmap) | ||
| 34 | {} | ||
| 35 | |||
| 36 | /** | ||
| 37 | * @method ~CPixelFormat_24 | ||
| 38 | * @brief Default dtor | ||
| 39 | * @param - | ||
| 40 | * @return - | ||
| 41 | * @globalvars none | ||
| 42 | * @exception none | ||
| 43 | * @conditions none | ||
| 44 | */ | ||
| 45 | ~CPixelFormat_24() | ||
| 46 | {} | ||
| 47 | |||
| 48 | /** | ||
| 49 | * @method setPixel | ||
| 50 | * @brief Modifies pixel at coordinates x, y | ||
| 51 | * @param pixel pointer to new pixel data | ||
| 52 | * @param x x-coordinate | ||
| 53 | * @param y y-coordinate | ||
| 54 | * @return - | ||
| 55 | * @globalvars none | ||
| 56 | * @exception PixelFormatError | ||
| 57 | * @conditions none | ||
| 58 | */ | ||
| 59 | void setPixel(const uint32_t *pixel, uint32_t x, uint32_t y); | ||
| 60 | |||
| 61 | /** | ||
| 62 | * @method getBitCount | ||
| 63 | * @brief returns color bitcount supported by this class | ||
| 64 | * @param - | ||
| 65 | * @return color bitcount supported by this class | ||
| 66 | * @globalvars none | ||
| 67 | * @exception none | ||
| 68 | * @conditions none | ||
| 69 | */ | ||
| 70 | uint32_t getBitCount() | ||
| 71 | { | ||
| 72 | return 24; | ||
| 73 | } | ||
| 74 | }; | ||
| 75 | |||
| 76 | #endif | ||
| 77 | |||
| 78 | /* vim: set et sw=2 ts=2: */ | ||
