mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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
This commit is contained in:
parent
c66a66728c
commit
ca634a0ac0
2 changed files with 11 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue