diff options
| author | manuel <manuel@nc8430.lan> | 2009-04-27 00:25:16 +0200 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-04-27 00:25:16 +0200 |
| commit | aa139a7d2b3f26af7590edbf413df67195c5d900 (patch) | |
| tree | ba99ea3b2af9aa191386550f025520117f18f4f8 /ue2/imgsynth2/cpixelformat_bgr24.h | |
| parent | 384539f7cc9feaa7ef7cee385cce472c6966c843 (diff) | |
| download | ooprog-aa139a7d2b3f26af7590edbf413df67195c5d900.tar.gz ooprog-aa139a7d2b3f26af7590edbf413df67195c5d900.tar.bz2 ooprog-aa139a7d2b3f26af7590edbf413df67195c5d900.zip | |
Adding ue2
Diffstat (limited to 'ue2/imgsynth2/cpixelformat_bgr24.h')
| -rw-r--r-- | ue2/imgsynth2/cpixelformat_bgr24.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/ue2/imgsynth2/cpixelformat_bgr24.h b/ue2/imgsynth2/cpixelformat_bgr24.h new file mode 100644 index 0000000..c3e1b72 --- /dev/null +++ b/ue2/imgsynth2/cpixelformat_bgr24.h | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | /** | ||
| 2 | * @module cpixelformat_bgr24 | ||
| 3 | * @author Guenther Neuwirth (0626638), Manuel Mausz (0728348) | ||
| 4 | * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. | ||
| 5 | * @date 18.04.2009 | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef CPIXELFORMAT_BGR24_H | ||
| 9 | #define CPIXELFORMAT_BGR24_H | ||
| 10 | |||
| 11 | #include <fstream> | ||
| 12 | #include "cpixelformat.h" | ||
| 13 | |||
| 14 | /** | ||
| 15 | * @class CPixelFormat_BGR24 | ||
| 16 | * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. | ||
| 17 | * | ||
| 18 | * On error CPixelFormat::PixelFormatError is thrown. | ||
| 19 | */ | ||
| 20 | class CPixelFormat_BGR24 : public CPixelFormat | ||
| 21 | { | ||
| 22 | public: | ||
| 23 | /** | ||
| 24 | * @method CPixelFormat_BGR24 | ||
| 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_BGR24(CBitmap *bitmap) | ||
| 33 | : CPixelFormat(bitmap) | ||
| 34 | {} | ||
| 35 | |||
| 36 | /** | ||
| 37 | * @method ~CPixelFormat_BGR24 | ||
| 38 | * @brief Default dtor | ||
| 39 | * @param - | ||
| 40 | * @return - | ||
| 41 | * @globalvars none | ||
| 42 | * @exception none | ||
| 43 | * @conditions none | ||
| 44 | */ | ||
| 45 | ~CPixelFormat_BGR24() | ||
| 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 | /* TODO */ | ||
| 62 | void getPixel(uint32_t *pixel, uint32_t x, uint32_t y); | ||
| 63 | |||
| 64 | /** | ||
| 65 | * @method getBitCount | ||
| 66 | * @brief returns color bitcount supported by this class | ||
| 67 | * @param - | ||
| 68 | * @return color bitcount supported by this class | ||
| 69 | * @globalvars none | ||
| 70 | * @exception none | ||
| 71 | * @conditions none | ||
| 72 | */ | ||
| 73 | uint32_t getBitCount() | ||
| 74 | { | ||
| 75 | return 24; | ||
| 76 | } | ||
| 77 | |||
| 78 | /* | ||
| 79 | * TODO | ||
| 80 | */ | ||
| 81 | void getMaxColor(unsigned int *red, unsigned int *green, unsigned int *blue) | ||
| 82 | { | ||
| 83 | *red = *green = *blue = 255; /* 2^8 - 1 */ | ||
| 84 | } | ||
| 85 | }; | ||
| 86 | |||
| 87 | #endif | ||
| 88 | |||
| 89 | /* vim: set et sw=2 ts=2: */ | ||
