diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2013-02-12 10:26:44 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2013-02-12 10:29:25 +0100 |
| commit | ca634a0ac0877c60417182d6415f159fefd6ad9d (patch) | |
| tree | 99525e3648b2766d18990f3bf9b45d1d695cd4a9 /apps | |
| parent | c66a66728c855456a465a57504344038b3224dd9 (diff) | |
| download | rockbox-ca634a0ac0877c60417182d6415f159fefd6ad9d.zip rockbox-ca634a0ac0877c60417182d6415f159fefd6ad9d.tar.gz rockbox-ca634a0ac0877c60417182d6415f159fefd6ad9d.tar.bz2 rockbox-ca634a0ac0877c60417182d6415f159fefd6ad9d.tar.xz | |
bitmap drawing: Negate alpha channel to match alpha information format of font files.
The comment about the format was actually incorrect. The alpha information
is now negated during conversion to native format, according to the
corrected comment.
Change-Id: Ifdb9ffdf9b55e39e64983eec2d9d60339e570bd9
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/recorder/bmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index 43afcc5..011a4d6 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c @@ -470,8 +470,9 @@ void output_row_8_native(uint32_t row, void * row_in, *dest = LCD_RGBPACK_LCD(r, g, b); dest += STRIDE_MAIN(1, ctx->bm->height); if (bm_alpha) { - /* pack alpha channel for 2 pixels into 1 byte */ - unsigned alpha = qp->alpha; + /* pack alpha channel for 2 pixels into 1 byte and negate + * according to the interal alpha channel format */ + uint8_t alpha = ~qp->alpha; if (col%2) *bm_alpha++ |= alpha&0xf0; else |