Merge pull request #6925 from Dhilan007/v3

[hot fixed]issue#4999:fixed label is unsharp if it's created by smaller font.
This commit is contained in:
minggo 2014-05-29 11:23:59 +08:00
commit 975f393a74
1 changed files with 3 additions and 1 deletions

View File

@ -1121,7 +1121,8 @@ bool Texture2D::initWithString(const char *text, const FontDefinition& textDefin
textDef._stroke._strokeSize *= contentScaleFactor;
textDef._shadow._shadowEnabled = false;
Data outData = Device::getTextureDataForText(text, textDef, align, imageWidth, imageHeight, _hasPremultipliedAlpha);
bool hasPremultipliedAlpha;
Data outData = Device::getTextureDataForText(text, textDef, align, imageWidth, imageHeight, hasPremultipliedAlpha);
if(outData.isNull())
{
return false;
@ -1136,6 +1137,7 @@ bool Texture2D::initWithString(const char *text, const FontDefinition& textDefin
{
free(outTempData);
}
_hasPremultipliedAlpha = hasPremultipliedAlpha;
return ret;
}