aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2013-02-10 09:24:55 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2013-02-10 09:24:55 (GMT)
commit2e98d9ed0de32a60a1c105321fff88446e2473bf (patch)
tree9dd1c91da70958d0af9d46d8aa369212bea9cd10 /src/FbTk
parent34343bb20bdb3dc94fe426f69e5db16315353d57 (diff)
downloadfluxbox_pavel-2e98d9ed0de32a60a1c105321fff88446e2473bf.zip
fluxbox_pavel-2e98d9ed0de32a60a1c105321fff88446e2473bf.tar.bz2
More subtle brightening of textures
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/TextureRender.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index 68b98df..5429003 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -93,7 +93,7 @@ struct RGBA {
93 93
94const RGBA::colorFunc RGBA::pseudoInterlaceFuncs[3] = { 94const RGBA::colorFunc RGBA::pseudoInterlaceFuncs[3] = {
95 RGBA::noop, 95 RGBA::noop,
96 RGBA::brighten_4, 96 RGBA::brighten_8,
97 RGBA::darken 97 RGBA::darken
98}; 98};
99 99
@@ -291,13 +291,13 @@ void renderBevel1(bool interlaced,
291 // brighten top line and first pixel of the 291 // brighten top line and first pixel of the
292 // 2nd line 292 // 2nd line
293 for (i = 0; i < width + 1; ++i) { 293 for (i = 0; i < width + 1; ++i) {
294 FbTk::RGBA::brighten_4(rgba[i]); 294 FbTk::RGBA::brighten_8(rgba[i]);
295 } 295 }
296 296
297 // bright and darken left and right border 297 // bright and darken left and right border
298 for (i = 2 * width - 1; i < s - width; i += width) { 298 for (i = 2 * width - 1; i < s - width; i += width) {
299 FbTk::RGBA::darken(rgba[i]); // right border 299 FbTk::RGBA::darken(rgba[i]); // right border
300 FbTk::RGBA::brighten_4(rgba[i + 1]); // left border on the next line 300 FbTk::RGBA::brighten_8(rgba[i + 1]); // left border on the next line
301 } 301 }
302 302
303 // darken bottom line, except the first pixel 303 // darken bottom line, except the first pixel
@@ -335,14 +335,14 @@ void renderBevel2(bool interlaced,
335 335
336 // top line, but stop 2 pixels before right border 336 // top line, but stop 2 pixels before right border
337 for (i = (width + 1); i < ((2 * width) - 2); i++) { 337 for (i = (width + 1); i < ((2 * width) - 2); i++) {
338 FbTk::RGBA::brighten_4(rgba[i]); 338 FbTk::RGBA::brighten_8(rgba[i]);
339 } 339 }
340 340
341 // first darken the right border, then brighten the 341 // first darken the right border, then brighten the
342 // left border 342 // left border
343 for ( ; i < (s - (2 * width) - 1); i += width) { 343 for ( ; i < (s - (2 * width) - 1); i += width) {
344 FbTk::RGBA::darken(rgba[i]); 344 FbTk::RGBA::darken(rgba[i]);
345 FbTk::RGBA::brighten_4(rgba[i + 3]); 345 FbTk::RGBA::brighten_8(rgba[i + 3]);
346 } 346 }
347 347
348 // bottom line 348 // bottom line