-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Milestone
Description
Note
This issue is migrated from here. It was created at 2014/05/02 16:13:45 +0000
Description
cocos2d-x 3.0
file: cocos/2d/platform/ios/CCDevice.mm, Device::getTextureDataForText
//line: 469-471
info.strokeColorR = textDefinition._stroke._strokeColor.r;
info.strokeColorG = textDefinition._stroke._strokeColor.g;
info.strokeColorB = textDefinition._stroke._strokeColor.b;
//line: 473-475
info.tintColorR = textDefinition._fontFillColor.r;
info.tintColorG = textDefinition._fontFillColor.g;
info.tintColorB = textDefinition._fontFillColor.b;
should fix as following:
//line: 469-471
info.strokeColorR = textDefinition._stroke._strokeColor.r / 255.0f;
info.strokeColorG = textDefinition._stroke._strokeColor.g / 255.0f;
info.strokeColorB = textDefinition._stroke._strokeColor.b / 255.0f;
//line: 473-475
info.tintColorR = textDefinition._fontFillColor.r / 255.0f;
info.tintColorG = textDefinition._fontFillColor.g / 255.0f;
info.tintColorB = textDefinition._fontFillColor.b / 255.0f;
textDefinition._stroke._strokeColor/_fontFillColor datatype is Color3B, as (0~255)
but info.strokeColorR/G/B is float, as (0 ~ 1.0), so need to convert it... original code seems missing.
Thanks.
- macbearchen added comment:
cocos2d-x 3.2
[FIX] Label: color can not be set correctly if using system font on iOS
BUT NOT FIXED "STROKE COLOR" in info.strokeColorRGB....
My suggestion could fixed it, BUT not be noticed.... :(
-
macbearchen added comment:
BUT NOT FIXED "STROKE COLOR" in info.strokeColorRGB....
cocos2d-x 3.2
[FIX] Label: color can not be set correctly if using system font on iOS
My suggestion could fixed it, BUT not be noticed.... :(