summaryrefslogtreecommitdiffstats
path: root/ue2/imgsynth2/cpixelformat.h
diff options
context:
space:
mode:
authormanuel <manuel@nc8430.lan>2009-05-01 14:54:45 +0200
committermanuel <manuel@nc8430.lan>2009-05-01 14:54:45 +0200
commitb22395ec4de60326eb629df882b4b8781dbca15c (patch)
treeb04e7a01d3e50c7d366059517fae249381c7540c /ue2/imgsynth2/cpixelformat.h
parentcfd4f77988cf12106e22e52fba6c1b5672a06162 (diff)
downloadooprog-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.h')
-rw-r--r--ue2/imgsynth2/cpixelformat.h43
1 files changed, 31 insertions, 12 deletions
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 @@
13#include <stdexcept> 13#include <stdexcept>
14 14
15class CBitmap; 15class CBitmap;
16#include "cbitmap.h" 16//#include "cbitmap.h"
17 17
18/** 18/**
19 * @class CPixelFormat 19 * @class CPixelFormat
@@ -72,9 +72,22 @@ class CPixelFormat
72 {}; 72 {};
73 73
74 /** 74 /**
75 * @method setPixel 75 * @brief RGB Pixel structure
76 * @brief Modifies pixel at coordinates x, y 76 */
77 * @param pixel pointer to new pixel data 77 typedef struct
78 {
79 /** red */
80 uint32_t red;
81 /** green */
82 uint32_t green;
83 /** blue */
84 uint32_t blue;
85 } RGBPIXEL;
86
87 /**
88 * @method getPixel
89 * @brief Get pixel at coordinates x, y
90 * @param pixel reference to pixel data
78 * @param x x-coordinate 91 * @param x x-coordinate
79 * @param y y-coordinate 92 * @param y y-coordinate
80 * @return - 93 * @return -
@@ -82,12 +95,12 @@ class CPixelFormat
82 * @exception PixelFormatError 95 * @exception PixelFormatError
83 * @conditions none 96 * @conditions none
84 */ 97 */
85 virtual void setPixel(const uint32_t *pixel, const uint32_t x, const uint32_t y) = 0; 98 virtual void getPixel(RGBPIXEL& pixel, const uint32_t x, const uint32_t y) = 0;
86 99
87 /** 100 /**
88 * @method getPixel 101 * @method setPixel
89 * @brief Get pixel at coordinates x, y 102 * @brief Modifies pixel at coordinates x, y
90 * @param pixel pointer to pixel data 103 * @param pixel reference to new pixel data
91 * @param x x-coordinate 104 * @param x x-coordinate
92 * @param y y-coordinate 105 * @param y y-coordinate
93 * @return - 106 * @return -
@@ -95,7 +108,7 @@ class CPixelFormat
95 * @exception PixelFormatError 108 * @exception PixelFormatError
96 * @conditions none 109 * @conditions none
97 */ 110 */
98 virtual void getPixel(uint32_t *pixel, const uint32_t x, const uint32_t y) = 0; 111 virtual void setPixel(const RGBPIXEL& pixel, const uint32_t x, const uint32_t y) = 0;
99 112
100 /** 113 /**
101 * @method getBitCount 114 * @method getBitCount
@@ -108,10 +121,16 @@ class CPixelFormat
108 */ 121 */
109 virtual uint32_t getBitCount() = 0; 122 virtual uint32_t getBitCount() = 0;
110 123
111 /* 124 /**
112 * TODO 125 * @method getMaxColor
126 * @brief Get maximum values for RGB pixel
127 * @param pixel reference to pixel struct
128 * @return -
129 * @globalvars none
130 * @exception none
131 * @conditions none
113 */ 132 */
114 virtual void getMaxColor(unsigned int *red, unsigned int *green, unsigned int *blue) = 0; 133 virtual void getMaxColor(RGBPIXEL& pixel) = 0;
115 134
116 protected: 135 protected:
117 /* members */ 136 /* members */