closed #4529: Stroke size and shadow offset don't consider ContentScaleFactor

This commit is contained in:
James Chen 2014-03-24 16:54:16 +08:00
parent 3af864a808
commit db7057e6f2
1 changed files with 4 additions and 0 deletions

View File

@ -1088,6 +1088,10 @@ bool Texture2D::initWithString(const char *text, const FontDefinition& textDefin
textDef._fontSize *= contentScaleFactor;
textDef._dimensions.width *= contentScaleFactor;
textDef._dimensions.height *= contentScaleFactor;
textDef._stroke._strokeSize *= contentScaleFactor;
textDef._shadow._shadowOffset.width *= contentScaleFactor;
textDef._shadow._shadowOffset.height *= contentScaleFactor;
Data outData = Device::getTextureDataForText(text,textDef,align,imageWidth,imageHeight);
if(outData.isNull())
return false;