[linux] fixed font rendering artifacts

This patch fixes the black pixels
around fonts when rendered using
CCLabelTTF.

see http://www.cocos2d-x.org/issues/706
This fix is for linux only, but may
be applied to other platforms as well
This commit is contained in:
Andre Rudlaff 2012-09-17 02:31:05 +02:00
parent 44ccc40269
commit 394b64d61f
1 changed files with 1 additions and 3 deletions

View File

@ -359,9 +359,7 @@ public:
// m_pData[(iY * iMaxLineWidth + iX) * 4 + 0] =
// bitmap.buffer[i * bitmap.width + j];//B
int iTemp = 0;
iTemp |= (cTemp ? 0xff : 0)<<24;
iTemp |= cTemp << 16 | cTemp << 8 | cTemp;
int iTemp = cTemp << 24 | cTemp << 16 | cTemp << 8 | cTemp;
*(int*) &m_pData[(iY * iMaxLineWidth + iX) * 4 + 0] = iTemp;
}
}