mirror of https://github.com/axmolengine/axmol.git
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:
commit
975f393a74
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue