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.h | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'ue2/imgsynth2/cpixelformat.h') diff --git a/ue2/imgsynth2/cpixelformat.h b/ue2/imgsynth2/cpixelformat.h index 911a141..a9e1e26 100644 --- a/ue2/imgsynth2/cpixelformat.h +++ b/ue2/imgsynth2/cpixelformat.h @@ -13,7 +13,7 @@ #include class CBitmap; -#include "cbitmap.h" +//#include "cbitmap.h" /** * @class CPixelFormat @@ -72,9 +72,22 @@ class CPixelFormat {}; /** - * @method setPixel - * @brief Modifies pixel at coordinates x, y - * @param pixel pointer to new pixel data + * @brief RGB Pixel structure + */ + typedef struct + { + /** red */ + uint32_t red; + /** green */ + uint32_t green; + /** blue */ + uint32_t blue; + } RGBPIXEL; + + /** + * @method getPixel + * @brief Get pixel at coordinates x, y + * @param pixel reference to pixel data * @param x x-coordinate * @param y y-coordinate * @return - @@ -82,12 +95,12 @@ class CPixelFormat * @exception PixelFormatError * @conditions none */ - virtual void setPixel(const uint32_t *pixel, const uint32_t x, const uint32_t y) = 0; + virtual void getPixel(RGBPIXEL& pixel, const uint32_t x, const uint32_t y) = 0; /** - * @method getPixel - * @brief Get pixel at coordinates x, y - * @param pixel pointer to pixel data + * @method setPixel + * @brief Modifies pixel at coordinates x, y + * @param pixel reference to new pixel data * @param x x-coordinate * @param y y-coordinate * @return - @@ -95,7 +108,7 @@ class CPixelFormat * @exception PixelFormatError * @conditions none */ - virtual void getPixel(uint32_t *pixel, const uint32_t x, const uint32_t y) = 0; + virtual void setPixel(const RGBPIXEL& pixel, const uint32_t x, const uint32_t y) = 0; /** * @method getBitCount @@ -108,10 +121,16 @@ class CPixelFormat */ virtual uint32_t getBitCount() = 0; - /* - * TODO + /** + * @method getMaxColor + * @brief Get maximum values for RGB pixel + * @param pixel reference to pixel struct + * @return - + * @globalvars none + * @exception none + * @conditions none */ - virtual void getMaxColor(unsigned int *red, unsigned int *green, unsigned int *blue) = 0; + virtual void getMaxColor(RGBPIXEL& pixel) = 0; protected: /* members */ -- cgit v1.2.3