From db7057e6f26a8d30a03d8c3a10fde3d21ac78b47 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 24 Mar 2014 16:54:16 +0800 Subject: [PATCH] closed #4529: Stroke size and shadow offset don't consider ContentScaleFactor --- cocos/2d/CCTexture2D.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos/2d/CCTexture2D.cpp b/cocos/2d/CCTexture2D.cpp index a43563d862..03a9187747 100644 --- a/cocos/2d/CCTexture2D.cpp +++ b/cocos/2d/CCTexture2D.cpp @@ -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;