aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Color.cc6
-rw-r--r--src/FbTk/Texture.cc12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/FbTk/Color.cc b/src/FbTk/Color.cc
index 8e5c8ef..263d34f 100644
--- a/src/FbTk/Color.cc
+++ b/src/FbTk/Color.cc
@@ -148,9 +148,9 @@ void Color::copy(const Color &col_copy) {
148 return; 148 return;
149 } 149 }
150 150
151 allocate(col_copy.red()*0xFF, 151 allocate(col_copy.red()*0x101,
152 col_copy.green()*0xFF, 152 col_copy.green()*0x101,
153 col_copy.blue()*0xFF, 153 col_copy.blue()*0x101,
154 col_copy.m_screen); 154 col_copy.m_screen);
155 155
156} 156}
diff --git a/src/FbTk/Texture.cc b/src/FbTk/Texture.cc
index 04f5eb7..a0a3b27 100644
--- a/src/FbTk/Texture.cc
+++ b/src/FbTk/Texture.cc
@@ -118,15 +118,15 @@ void Texture::calcHiLoColors(int screen_num) {
118 xcol.red = (unsigned int) (m_color.red() + 118 xcol.red = (unsigned int) (m_color.red() +
119 (m_color.red() >> 1)); 119 (m_color.red() >> 1));
120 if (xcol.red >= 0xff) xcol.red = 0xffff; 120 if (xcol.red >= 0xff) xcol.red = 0xffff;
121 else xcol.red *= 0xff; 121 else xcol.red *= 0x101;
122 xcol.green = (unsigned int) (m_color.green() + 122 xcol.green = (unsigned int) (m_color.green() +
123 (m_color.green() >> 1)); 123 (m_color.green() >> 1));
124 if (xcol.green >= 0xff) xcol.green = 0xffff; 124 if (xcol.green >= 0xff) xcol.green = 0xffff;
125 else xcol.green *= 0xff; 125 else xcol.green *= 0x101;
126 xcol.blue = (unsigned int) (m_color.blue() + 126 xcol.blue = (unsigned int) (m_color.blue() +
127 (m_color.blue() >> 1)); 127 (m_color.blue() >> 1));
128 if (xcol.blue >= 0xff) xcol.blue = 0xffff; 128 if (xcol.blue >= 0xff) xcol.blue = 0xffff;
129 else xcol.blue *= 0xff; 129 else xcol.blue *= 0x101;
130 130
131 if (! XAllocColor(disp, colm, &xcol)) 131 if (! XAllocColor(disp, colm, &xcol))
132 xcol.pixel = 0; 132 xcol.pixel = 0;
@@ -135,13 +135,13 @@ void Texture::calcHiLoColors(int screen_num) {
135 135
136 xcol.red = 136 xcol.red =
137 (unsigned int) ((m_color.red() >> 2) + 137 (unsigned int) ((m_color.red() >> 2) +
138 (m_color.red() >> 1)) * 0xff; 138 (m_color.red() >> 1)) * 0x101;
139 xcol.green = 139 xcol.green =
140 (unsigned int) ((m_color.green() >> 2) + 140 (unsigned int) ((m_color.green() >> 2) +
141 (m_color.green() >> 1)) * 0xff; 141 (m_color.green() >> 1)) * 0x101;
142 xcol.blue = 142 xcol.blue =
143 (unsigned int) ((m_color.blue() >> 2) + 143 (unsigned int) ((m_color.blue() >> 2) +
144 (m_color.blue() >> 1)) * 0xff; 144 (m_color.blue() >> 1)) * 0x101;
145 145
146 if (! XAllocColor(disp, colm, &xcol)) 146 if (! XAllocColor(disp, colm, &xcol))
147 xcol.pixel = 0; 147 xcol.pixel = 0;