From b22395ec4de60326eb629df882b4b8781dbca15c Mon Sep 17 00:00:00 2001 From: manuel Date: Fri, 1 May 2009 14:54:45 +0200 Subject: - removed runtime generated output files - implemented brightness() - implemented invert() - implemented getPixel in CPixelFormat_BGR24 and CPixelFormat_BGR555 --- ue2/imgsynth2/cpixelformat_bgr24.h | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'ue2/imgsynth2/cpixelformat_bgr24.h') diff --git a/ue2/imgsynth2/cpixelformat_bgr24.h b/ue2/imgsynth2/cpixelformat_bgr24.h index 73f22c1..242eadf 100644 --- a/ue2/imgsynth2/cpixelformat_bgr24.h +++ b/ue2/imgsynth2/cpixelformat_bgr24.h @@ -45,13 +45,23 @@ class CPixelFormat_BGR24 : public CPixelFormat ~CPixelFormat_BGR24() {} - /* TODO */ - void getPixel(uint32_t *pixel, uint32_t x, uint32_t y); + /** + * @method getPixel + * @brief Get pixel at coordinates x, y + * @param pixel reference to pixel data + * @param x x-coordinate + * @param y y-coordinate + * @return - + * @globalvars none + * @exception PixelFormatError + * @conditions none + */ + void getPixel(RGBPIXEL& pixel, uint32_t x, uint32_t y); /** * @method setPixel * @brief Modifies pixel at coordinates x, y - * @param pixel pointer to new pixel data + * @param pixel reference to new pixel data * @param x x-coordinate * @param y y-coordinate * @return - @@ -59,7 +69,7 @@ class CPixelFormat_BGR24 : public CPixelFormat * @exception PixelFormatError * @conditions none */ - void setPixel(const uint32_t *pixel, uint32_t x, uint32_t y); + void setPixel(const RGBPIXEL& pixel, uint32_t x, uint32_t y); /** * @method getBitCount @@ -75,12 +85,19 @@ class CPixelFormat_BGR24 : public CPixelFormat return 24; } - /* - * TODO + /** + * @method getMaxColor + * @brief Get maximum values for RGB pixel + * @param pixel reference to pixel struct + * @return - + * @globalvars none + * @exception none + * @conditions none */ - void getMaxColor(unsigned int *red, unsigned int *green, unsigned int *blue) + void getMaxColor(RGBPIXEL& pixel) { - *red = *green = *blue = 255; /* 2^8 - 1 */ + /* value = 2^8 - 1 */ + pixel.red = pixel.green = pixel.blue = 255; } }; -- cgit v1.2.3