|
|
|
@ -1108,6 +1108,8 @@ void plFont::IRenderChar8To32AlphaPremShadow( const plFont::plCharacter &c )
|
|
|
|
|
xstart = -2; |
|
|
|
|
|
|
|
|
|
srcA = (uint8_t)(( fRenderInfo.fColor >> 24 ) & 0x000000ff); |
|
|
|
|
if (srcA == 0) |
|
|
|
|
return; |
|
|
|
|
srcR = (uint8_t)(( fRenderInfo.fColor >> 16 ) & 0x000000ff); |
|
|
|
|
srcG = (uint8_t)(( fRenderInfo.fColor >> 8 ) & 0x000000ff); |
|
|
|
|
srcB = (uint8_t)(( fRenderInfo.fColor ) & 0x000000ff); |
|
|
|
@ -1149,7 +1151,10 @@ void plFont::IRenderChar8To32AlphaPremShadow( const plFont::plCharacter &c )
|
|
|
|
|
sa = clamp; |
|
|
|
|
uint32_t a = IGetCharPixel(c, x, y); |
|
|
|
|
if (srcA != 0xff) |
|
|
|
|
{ |
|
|
|
|
a = (srcA * a + 127) / 255; |
|
|
|
|
sa = (srcA * sa + 127) / 255; |
|
|
|
|
} |
|
|
|
|
uint32_t ta = a + sa - ((a*sa + 127) / 255); |
|
|
|
|
if (ta > (destPtr[ x ] >> 24)) |
|
|
|
|
destPtr[ x ] = ( ta << 24 ) | (((srcR * a + 127) / 255) << 16) | |
|
|
|
|