diff options
Diffstat (limited to 'ue2/imgsynth2/cpixelformat_indexed8.h')
| -rw-r--r-- | ue2/imgsynth2/cpixelformat_indexed8.h | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/ue2/imgsynth2/cpixelformat_indexed8.h b/ue2/imgsynth2/cpixelformat_indexed8.h index ff95840..2e2fc01 100644 --- a/ue2/imgsynth2/cpixelformat_indexed8.h +++ b/ue2/imgsynth2/cpixelformat_indexed8.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <fstream> | 11 | #include <fstream> |
| 12 | #include "cpixelformat.h" | 12 | #include "cpixelformat.h" |
| 13 | #include "cpixmap.h" | 13 | #include "cpixmap.h" |
| 14 | |||
| 14 | /** | 15 | /** |
| 15 | * @class CPixelFormat_Indexed8 | 16 | * @class CPixelFormat_Indexed8 |
| 16 | * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. | 17 | * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps. |
| @@ -46,9 +47,22 @@ class CPixelFormat_Indexed8 : public CPixelFormat | |||
| 46 | {} | 47 | {} |
| 47 | 48 | ||
| 48 | /** | 49 | /** |
| 50 | * @method getPixel | ||
| 51 | * @brief Get pixel at coordinates x, y | ||
| 52 | * @param pixel reference to pixel data | ||
| 53 | * @param x x-coordinate | ||
| 54 | * @param y y-coordinate | ||
| 55 | * @return - | ||
| 56 | * @globalvars none | ||
| 57 | * @exception PixelFormatError | ||
| 58 | * @conditions none | ||
| 59 | */ | ||
| 60 | void getPixel(RGBPIXEL& pixel, uint32_t x, uint32_t y); | ||
| 61 | |||
| 62 | /** | ||
| 49 | * @method setPixel | 63 | * @method setPixel |
| 50 | * @brief Modifies pixel at coordinates x, y | 64 | * @brief Modifies pixel at coordinates x, y |
| 51 | * @param pixel pointer to new pixel data | 65 | * @param pixel reference to new pixel data |
| 52 | * @param x x-coordinate | 66 | * @param x x-coordinate |
| 53 | * @param y y-coordinate | 67 | * @param y y-coordinate |
| 54 | * @return - | 68 | * @return - |
| @@ -56,10 +70,7 @@ class CPixelFormat_Indexed8 : public CPixelFormat | |||
| 56 | * @exception PixelFormatError | 70 | * @exception PixelFormatError |
| 57 | * @conditions none | 71 | * @conditions none |
| 58 | */ | 72 | */ |
| 59 | void setPixel(const uint32_t *pixel, uint32_t x, uint32_t y); | 73 | void setPixel(const RGBPIXEL& pixel, uint32_t x, uint32_t y); |
| 60 | |||
| 61 | /* TODO */ | ||
| 62 | void getPixel(uint32_t *pixel, uint32_t x, uint32_t y); | ||
| 63 | 74 | ||
| 64 | /** | 75 | /** |
| 65 | * @method getBitCount | 76 | * @method getBitCount |
| @@ -74,7 +85,7 @@ class CPixelFormat_Indexed8 : public CPixelFormat | |||
| 74 | { | 85 | { |
| 75 | return 8; | 86 | return 8; |
| 76 | } | 87 | } |
| 77 | 88 | ||
| 78 | /** | 89 | /** |
| 79 | * @method getColorMode | 90 | * @method getColorMode |
| 80 | * @brief returns the color mode supported by this class | 91 | * @brief returns the color mode supported by this class |
| @@ -84,16 +95,24 @@ class CPixelFormat_Indexed8 : public CPixelFormat | |||
| 84 | * @exception none | 95 | * @exception none |
| 85 | * @conditions none | 96 | * @conditions none |
| 86 | */ | 97 | */ |
| 87 | std::string getColorMode() | 98 | const std::string getColorMode() |
| 88 | { | 99 | { |
| 89 | return "c"; | 100 | return "c"; |
| 90 | } | 101 | } |
| 91 | /* | 102 | |
| 92 | * TODO | 103 | /** |
| 104 | * @method getMaxColor | ||
| 105 | * @brief Get maximum values for RGB pixel | ||
| 106 | * @param pixel reference to pixel struct | ||
| 107 | * @return - | ||
| 108 | * @globalvars none | ||
| 109 | * @exception none | ||
| 110 | * @conditions none | ||
| 93 | */ | 111 | */ |
| 94 | void getMaxColor(unsigned int *red, unsigned int *green, unsigned int *blue) | 112 | void getMaxColor(RGBPIXEL& pixel) |
| 95 | { | 113 | { |
| 96 | *red = *green = *blue = 255; /* 2^8 - 1 */ | 114 | /* value = 2^8 - 1 */ |
| 115 | pixel.red = pixel.green = pixel.blue = 255; | ||
| 97 | } | 116 | } |
| 98 | }; | 117 | }; |
| 99 | 118 | ||
