diff options
Diffstat (limited to 'x11/bbapm/patches/patch-ac')
-rw-r--r-- | x11/bbapm/patches/patch-ac | 72 |
1 files changed, 69 insertions, 3 deletions
diff --git a/x11/bbapm/patches/patch-ac b/x11/bbapm/patches/patch-ac index 86a2e3fe46e..98969287067 100644 --- a/x11/bbapm/patches/patch-ac +++ b/x11/bbapm/patches/patch-ac @@ -1,7 +1,7 @@ -$NetBSD: patch-ac,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $ +$NetBSD: patch-ac,v 1.2 2003/12/03 17:41:21 gson Exp $ ---- Image.cc.orig Sun Aug 15 07:43:55 1999 -+++ Image.cc Sat Aug 4 20:52:40 2001 +--- Image.cc.orig 1999-08-15 07:43:55.000000000 -0700 ++++ Image.cc @@ -50,6 +50,17 @@ BImage::BImage(BImageControl *c, unsigned int w, unsigned int h) { control = c; @@ -20,6 +20,72 @@ $NetBSD: patch-ac,v 1.1.1.1 2002/09/07 20:22:54 jschauma Exp $ width = ((signed) w > 0) ? w : 1; height = ((signed) h > 0) ? h : 1; +@@ -225,12 +236,12 @@ + } + + if (control->doDither()) { +- short er, eg, eb, *or, *og, *ob, *nor, *nog, *nob, *por, *pog, *pob; ++ short er, eg, eb, *oR, *og, *ob, *nor, *nog, *nob, *por, *pog, *pob; + unsigned short *ort, *ogt, *obt; + +- control->getDitherBuffers(width + 2, &or, &og, &ob, &nor, &nog, &nob, ++ control->getDitherBuffers(width + 2, &oR, &og, &ob, &nor, &nog, &nob, + &ort, &ogt, &obt); +- if ((! or) || (! og) || (! ob) || (! nor) || (! nog) || (! nob) || ++ if ((! oR) || (! og) || (! ob) || (! nor) || (! nog) || (! nob) || + (! ort) || (! ogt) || (! obt)) { + fprintf(stderr, + "BImage::renderXImage: error getting dither information\n"); +@@ -240,7 +251,7 @@ + + x = width; + +- por = or; ++ por = oR; + pog = og; + pob = ob; + +@@ -271,14 +282,14 @@ + } + + for (x = 0; x < width; x++) { +- if (*(or + x) > 255) *(or + x) = 255; +- else if (*(or + x) < 0) *(or + x) = 0; ++ if (*(oR + x) > 255) *(oR + x) = 255; ++ else if (*(oR + x) < 0) *(oR + x) = 0; + if (*(og + x) > 255) *(og + x) = 255; + else if (*(og + x) < 0) *(og + x) = 0; + if (*(ob + x) > 255) *(ob + x) = 255; + else if (*(ob + x) < 0) *(ob + x) = 0; + +- r = *(tr + *(or + x)); ++ r = *(tr + *(oR + x)); + g = *(tg + *(og + x)); + b = *(tb + *(ob + x)); + +@@ -340,11 +351,11 @@ + return 0; + } + +- er = *(or + x) - *(ort + *(or + x)); ++ er = *(oR + x) - *(ort + *(oR + x)); + eg = *(og + x) - *(ogt + *(og + x)); + eb = *(ob + x) - *(obt + *(ob + x)); + +- *(or + x + 1) += er; ++ *(oR + x + 1) += er; + *(og + x + 1) += eg; + *(ob + x + 1) += eb; + +@@ -360,7 +371,7 @@ + off += image->width; + idata = (pd += image->bytes_per_line); + +- por = or; or = nor; nor = por; ++ por = oR; oR = nor; nor = por; + pog = og; og = nog; nog = pog; + pob = ob; ob = nob; nob = pob; + } @@ -843,7 +854,14 @@ window = blackbox->getRootWindow(); screen_number = blackbox->getScreenNumber(); |