diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/Color.cc | 26 | ||||
-rw-r--r-- | src/FbTk/Color.hh | 8 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/FbTk/Color.cc b/src/FbTk/Color.cc index d969a43..8428954 100644 --- a/src/FbTk/Color.cc +++ b/src/FbTk/Color.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Color.cc,v 1.8 2004/01/09 21:36:21 fluxgen Exp $ | 22 | // $Id: Color.cc,v 1.9 2004/02/28 16:55:22 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Color.hh" | 24 | #include "Color.hh" |
25 | 25 | ||
@@ -105,16 +105,16 @@ bool Color::setFromString(const char *color_string, int screen) { | |||
105 | return true; | 105 | return true; |
106 | } | 106 | } |
107 | 107 | ||
108 | /* | ||
109 | Color &Color::Color::operator = (const Color &col_copy) { | ||
110 | // check for aliasing | ||
111 | if (this == &col_copy) | ||
112 | return *this; | ||
113 | 108 | ||
114 | copy(col_copy); | 109 | Color &Color::Color::operator = (const Color &col_copy) { |
115 | return *this; | 110 | // check for aliasing |
116 | } | 111 | if (this == &col_copy) |
117 | */ | 112 | return *this; |
113 | |||
114 | copy(col_copy); | ||
115 | return *this; | ||
116 | } | ||
117 | |||
118 | 118 | ||
119 | void Color::free() { | 119 | void Color::free() { |
120 | if (isAllocated()) { | 120 | if (isAllocated()) { |
@@ -137,9 +137,9 @@ void Color::copy(const Color &col_copy) { | |||
137 | 137 | ||
138 | free(); | 138 | free(); |
139 | 139 | ||
140 | allocate(col_copy.red(), | 140 | allocate(col_copy.red()*0xFF, |
141 | col_copy.green(), | 141 | col_copy.green()*0xFF, |
142 | col_copy.blue(), | 142 | col_copy.blue()*0xFF, |
143 | col_copy.m_screen); | 143 | col_copy.m_screen); |
144 | 144 | ||
145 | } | 145 | } |
diff --git a/src/FbTk/Color.hh b/src/FbTk/Color.hh index 1ab926b..5206790 100644 --- a/src/FbTk/Color.hh +++ b/src/FbTk/Color.hh | |||
@@ -1,5 +1,5 @@ | |||
1 | // Color.hh for Fluxbox Window Manager | 1 | // Color.hh for Fluxbox Window Manager |
2 | // Copyright (c) 2002 Henrik Kinnunen (fluxgen@users.sourceforge.net) | 2 | // Copyright (c) 2002-2004 Henrik Kinnunen (fluxgen@users.sourceforge.net) |
3 | // | 3 | // |
4 | // from Image.hh for Blackbox - an X11 Window manager | 4 | // from Image.hh for Blackbox - an X11 Window manager |
5 | // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) | 5 | // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) |
@@ -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.6 2003/12/16 17:06:49 fluxgen Exp $ | 25 | // $Id: Color.hh,v 1.7 2004/02/28 16:55:22 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef FBTK_COLOR_HH | 27 | #ifndef FBTK_COLOR_HH |
28 | #define FBTK_COLOR_HH | 28 | #define FBTK_COLOR_HH |
@@ -46,8 +46,8 @@ public: | |||
46 | bool setFromString(const char *color_string, int screen); | 46 | bool setFromString(const char *color_string, int screen); |
47 | /// TODO don't like this | 47 | /// TODO don't like this |
48 | void setPixel(unsigned long pixel) { m_pixel = pixel; } | 48 | void setPixel(unsigned long pixel) { m_pixel = pixel; } |
49 | // TODO | 49 | |
50 | //Color &operator = (const Color &col_copy); | 50 | Color &operator = (const Color &col_copy); |
51 | 51 | ||
52 | inline bool isAllocated() const { return m_allocated; } | 52 | inline bool isAllocated() const { return m_allocated; } |
53 | inline unsigned short red() const { return m_red; } | 53 | inline unsigned short red() const { return m_red; } |