scaling color values so that they have the right intensity
markt markt
2 files changed,
9 insertions(+),
9 deletions(-)
M
src/FbTk/Color.cc
→
src/FbTk/Color.cc
@@ -148,9 +148,9 @@ setPixel(col_copy.pixel());
return; } - allocate(col_copy.red()*0xFF, - col_copy.green()*0xFF, - col_copy.blue()*0xFF, + allocate(col_copy.red()*0x101, + col_copy.green()*0x101, + col_copy.blue()*0x101, col_copy.m_screen); }
M
src/FbTk/Texture.cc
→
src/FbTk/Texture.cc
@@ -118,15 +118,15 @@
xcol.red = (unsigned int) (m_color.red() + (m_color.red() >> 1)); if (xcol.red >= 0xff) xcol.red = 0xffff; - else xcol.red *= 0xff; + else xcol.red *= 0x101; xcol.green = (unsigned int) (m_color.green() + (m_color.green() >> 1)); if (xcol.green >= 0xff) xcol.green = 0xffff; - else xcol.green *= 0xff; + else xcol.green *= 0x101; xcol.blue = (unsigned int) (m_color.blue() + (m_color.blue() >> 1)); if (xcol.blue >= 0xff) xcol.blue = 0xffff; - else xcol.blue *= 0xff; + else xcol.blue *= 0x101; if (! XAllocColor(disp, colm, &xcol)) xcol.pixel = 0;@@ -135,13 +135,13 @@ m_hicolor.setPixel(xcol.pixel);
xcol.red = (unsigned int) ((m_color.red() >> 2) + - (m_color.red() >> 1)) * 0xff; + (m_color.red() >> 1)) * 0x101; xcol.green = (unsigned int) ((m_color.green() >> 2) + - (m_color.green() >> 1)) * 0xff; + (m_color.green() >> 1)) * 0x101; xcol.blue = (unsigned int) ((m_color.blue() >> 2) + - (m_color.blue() >> 1)) * 0xff; + (m_color.blue() >> 1)) * 0x101; if (! XAllocColor(disp, colm, &xcol)) xcol.pixel = 0;