Package: svgalibg1
Severity: normal

I received this message; it should probably be filed as a bug.

-- 
Colin Watson                                  [EMAIL PROTECTED]

----- Forwarded message from "Peter P. Eiserloh" <[EMAIL PROTECTED]> -----

Date: Tue, 4 Jun 2002 13:17:34 -0700
From: "Peter P. Eiserloh" <[EMAIL PROTECTED]>
To: Colin Watson <[EMAIL PROTECTED]>
Cc: Matan Ziv-Av <[EMAIL PROTECTED]>
Subject: SVGALib gl_expandcharacter() with 3 bytes per pixel
Reply-To: [EMAIL PROTECTED]
User-Agent: Mutt/1.3.28i
X-Operating-System: Linux eyes1.eiserloh.org 2.4.18 
X-Spam-Status: No, hits=0.0 required=5.0 tests= version=2.20

Hi Guy,

I was reading the source code to svgalib-1.4.3, specifically
the handing of text and fonts, when I noticed in routine
gl_expandcharacter() that the background color is handled
differently than expected when there are 3 bytes per pixel.

IMHO: The third byte should get the third byte of bg, rather
that the first (especially since everywhere else that is what
is done).

The code reads:

  case 3:
    *(ushort *) bitmap = bg;
    *(bitmap + 2) = bg;
    bitmap += 3;
    break;

I think it should be (minus the extra comment of course):

  case 3:
    *(ushort *) bitmap = bg;
    *(bitmap + 2) = bg >> 16;
    /*                ^^^^^^ */
    bitmap += 3;
    break;



-- 
+..................................................................+
| Peter P. Eiserloh                        http://www.eiserloh.org |
| Eiserloh Enterprises              http://www.eiserloh.org/~peter |
|                                        mailto:[EMAIL PROTECTED] |
| Linux, Modula-2/3, Compilers, Data Reduction, Esperanto,         |
| Physics, Science Fiction, Babylon-5, Taekwondo, Geneaology       |
+..................................................................+

----- End forwarded message -----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to