diff options
| author | manuel <manuel@nc8430.lan> | 2009-05-01 14:54:45 +0200 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-05-01 14:54:45 +0200 |
| commit | b22395ec4de60326eb629df882b4b8781dbca15c (patch) | |
| tree | b04e7a01d3e50c7d366059517fae249381c7540c /ue2/imgsynth2/cpixelformat_bgr555.h | |
| parent | cfd4f77988cf12106e22e52fba6c1b5672a06162 (diff) | |
| download | ooprog-b22395ec4de60326eb629df882b4b8781dbca15c.tar.gz ooprog-b22395ec4de60326eb629df882b4b8781dbca15c.tar.bz2 ooprog-b22395ec4de60326eb629df882b4b8781dbca15c.zip | |
- removed runtime generated output files
- implemented brightness()
- implemented invert()
- implemented getPixel in CPixelFormat_BGR24 and CPixelFormat_BGR555
Diffstat (limited to 'ue2/imgsynth2/cpixelformat_bgr555.h')
| -rw-r--r-- | ue2/imgsynth2/cpixelformat_bgr555.h | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/ue2/imgsynth2/cpixelformat_bgr555.h b/ue2/imgsynth2/cpixelformat_bgr555.h index b04e4be..f131214 100644 --- a/ue2/imgsynth2/cpixelformat_bgr555.h +++ b/ue2/imgsynth2/cpixelformat_bgr555.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <fstream> | 12 | #include <fstream> |
| 13 | #include "cpixelformat.h" | 13 | #include "cpixelformat.h" |
| 14 | 14 | ||
| 15 | /* TODO */ | 15 | /* to (un-)pack pixel values */ |
| 16 | #define BGR555_RED_SHIFT 10 | 16 | #define BGR555_RED_SHIFT 10 |
| 17 | #define BGR555_GREEN_SHIFT 5 | 17 | #define BGR555_GREEN_SHIFT 5 |
| 18 | #define BGR555_BLUE_SHIFT 0 | 18 | #define BGR555_BLUE_SHIFT 0 |
| @@ -55,13 +55,23 @@ class CPixelFormat_BGR555 : public CPixelFormat | |||
| 55 | ~CPixelFormat_BGR555() | 55 | ~CPixelFormat_BGR555() |
| 56 | {} | 56 | {} |
| 57 | 57 | ||
| 58 | /* TODO */ | 58 | /** |
| 59 | void getPixel(uint32_t *pixel, uint32_t x, uint32_t y); | 59 | * @method getPixel |
| 60 | * @brief Get pixel at coordinates x, y | ||
| 61 | * @param pixel reference to pixel data | ||
| 62 | * @param x x-coordinate | ||
| 63 | * @param y y-coordinate | ||
| 64 | * @return - | ||
| 65 | * @globalvars none | ||
| 66 | * @exception PixelFormatError | ||
| 67 | * @conditions none | ||
| 68 | */ | ||
| 69 | void getPixel(RGBPIXEL& pixel, uint32_t x, uint32_t y); | ||
| 60 | 70 | ||
| 61 | /** | 71 | /** |
| 62 | * @method setPixel | 72 | * @method setPixel |
| 63 | * @brief Modifies pixel at coordinates x, y | 73 | * @brief Modifies pixel at coordinates x, y |
| 64 | * @param pixel pointer to new pixel data | 74 | * @param pixel reference to new pixel data |
| 65 | * @param x x-coordinate | 75 | * @param x x-coordinate |
| 66 | * @param y y-coordinate | 76 | * @param y y-coordinate |
| 67 | * @return - | 77 | * @return - |
| @@ -69,7 +79,7 @@ class CPixelFormat_BGR555 : public CPixelFormat | |||
| 69 | * @exception PixelFormatError | 79 | * @exception PixelFormatError |
| 70 | * @conditions none | 80 | * @conditions none |
| 71 | */ | 81 | */ |
| 72 | void setPixel(const uint32_t *pixel, uint32_t x, uint32_t y); | 82 | void setPixel(const RGBPIXEL& pixel, uint32_t x, uint32_t y); |
| 73 | 83 | ||
| 74 | /** | 84 | /** |
| 75 | * @method getBitCount | 85 | * @method getBitCount |
| @@ -85,12 +95,19 @@ class CPixelFormat_BGR555 : public CPixelFormat | |||
| 85 | return 16; | 95 | return 16; |
| 86 | } | 96 | } |
| 87 | 97 | ||
| 88 | /* | 98 | /** |
| 89 | * TODO | 99 | * @method getMaxColor |
| 100 | * @brief Get maximum values for RGB pixel | ||
| 101 | * @param pixel reference to pixel struct | ||
| 102 | * @return - | ||
| 103 | * @globalvars none | ||
| 104 | * @exception none | ||
| 105 | * @conditions none | ||
| 90 | */ | 106 | */ |
| 91 | void getMaxColor(unsigned int *red, unsigned int *green, unsigned int *blue) | 107 | void getMaxColor(RGBPIXEL& pixel) |
| 92 | { | 108 | { |
| 93 | *red = *green = *blue = 31; /* 2^5 -1 */ | 109 | /* value = 2^5 - 1 */ |
| 110 | pixel.red = pixel.green = pixel.blue = 31; | ||
| 94 | } | 111 | } |
| 95 | }; | 112 | }; |
| 96 | 113 | ||
