mirror of https://github.com/axmolengine/axmol.git
closed #4529: Stroke size and shadow offset don't consider ContentScaleFactor
This commit is contained in:
parent
3af864a808
commit
db7057e6f2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue