diff options
Diffstat (limited to 'src/FbTk/Color.hh')
-rw-r--r-- | src/FbTk/Color.hh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/FbTk/Color.hh b/src/FbTk/Color.hh index d96db8d..e54512c 100644 --- a/src/FbTk/Color.hh +++ b/src/FbTk/Color.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Color.hh,v 1.2 2002/12/01 13:42:14 rathnor Exp $ | 25 | // $Id: Color.hh,v 1.3 2003/02/23 01:09:02 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef FBTK_COLOR_HH | 27 | #ifndef FBTK_COLOR_HH |
28 | #define FBTK_COLOR_HH | 28 | #define FBTK_COLOR_HH |
@@ -38,7 +38,7 @@ public: | |||
38 | Color(); | 38 | Color(); |
39 | explicit Color(unsigned long pixel); | 39 | explicit Color(unsigned long pixel); |
40 | Color(const Color &col_copy); | 40 | Color(const Color &col_copy); |
41 | Color(unsigned char red, unsigned char green, unsigned char blue, int screen); | 41 | Color(unsigned short red, unsigned short green, unsigned short blue, int screen); |
42 | Color(const char *color_string, int screen); | 42 | Color(const char *color_string, int screen); |
43 | ~Color(); | 43 | ~Color(); |
44 | 44 | ||
@@ -49,20 +49,21 @@ public: | |||
49 | //Color &operator = (const Color &col_copy); | 49 | //Color &operator = (const Color &col_copy); |
50 | 50 | ||
51 | bool isAllocated() const { return m_allocated; } | 51 | bool isAllocated() const { return m_allocated; } |
52 | unsigned char red() const { return m_red; } | 52 | unsigned short red() const { return m_red; } |
53 | unsigned char green() const { return m_green; } | 53 | unsigned short green() const { return m_green; } |
54 | unsigned char blue() const { return m_blue; } | 54 | unsigned short blue() const { return m_blue; } |
55 | unsigned long pixel() const { return m_pixel; } | 55 | unsigned long pixel() const { return m_pixel; } |
56 | 56 | ||
57 | private: | 57 | private: |
58 | void free(); | 58 | void free(); |
59 | void copy(const Color &col); | 59 | void copy(const Color &col); |
60 | void allocate(unsigned char red, unsigned char green, unsigned char blue, int screen); | 60 | void allocate(unsigned short red, unsigned short green, |
61 | unsigned short blue, int screen); | ||
61 | inline void setAllocated(bool a) { m_allocated = a; } | 62 | inline void setAllocated(bool a) { m_allocated = a; } |
62 | void setRGB(unsigned char red, unsigned char green, unsigned char blue); | 63 | void setRGB(unsigned short red, unsigned short green, unsigned short blue); |
63 | 64 | ||
64 | 65 | ||
65 | unsigned char m_red, m_green, m_blue; | 66 | unsigned short m_red, m_green, m_blue; |
66 | unsigned long m_pixel; | 67 | unsigned long m_pixel; |
67 | bool m_allocated; | 68 | bool m_allocated; |
68 | int m_screen; | 69 | int m_screen; |