mirror of https://github.com/axmolengine/axmol.git
fixed can's set outline color for system font correctly on IOS.
This commit is contained in:
parent
7b378cd7e1
commit
9da4ba14f5
|
@ -348,7 +348,7 @@ static bool _initWithString(const char * text, cocos2d::Device::TextAlign align,
|
||||||
}
|
}
|
||||||
|
|
||||||
// text color
|
// text color
|
||||||
CGContextSetRGBFillColor(context, info->tintColorR / 255.0f, info->tintColorG / 255.0f, info->tintColorB / 255.0f, 1);
|
CGContextSetRGBFillColor(context, info->tintColorR, info->tintColorG, info->tintColorB, 1);
|
||||||
// move Y rendering to the top of the image
|
// move Y rendering to the top of the image
|
||||||
CGContextTranslateCTM(context, 0.0f, (dim.height - shadowStrokePaddingY) );
|
CGContextTranslateCTM(context, 0.0f, (dim.height - shadowStrokePaddingY) );
|
||||||
CGContextScaleCTM(context, 1.0f, -1.0f); //NOTE: NSString draws in UIKit referential i.e. renders upside-down compared to CGBitmapContext referential
|
CGContextScaleCTM(context, 1.0f, -1.0f); //NOTE: NSString draws in UIKit referential i.e. renders upside-down compared to CGBitmapContext referential
|
||||||
|
@ -456,13 +456,13 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
|
||||||
info.shadowBlur = textDefinition._shadow._shadowBlur;
|
info.shadowBlur = textDefinition._shadow._shadowBlur;
|
||||||
info.shadowOpacity = textDefinition._shadow._shadowOpacity;
|
info.shadowOpacity = textDefinition._shadow._shadowOpacity;
|
||||||
info.hasStroke = textDefinition._stroke._strokeEnabled;
|
info.hasStroke = textDefinition._stroke._strokeEnabled;
|
||||||
info.strokeColorR = textDefinition._stroke._strokeColor.r;
|
info.strokeColorR = textDefinition._stroke._strokeColor.r / 255.0f;
|
||||||
info.strokeColorG = textDefinition._stroke._strokeColor.g;
|
info.strokeColorG = textDefinition._stroke._strokeColor.g / 255.0f;
|
||||||
info.strokeColorB = textDefinition._stroke._strokeColor.b;
|
info.strokeColorB = textDefinition._stroke._strokeColor.b / 255.0f;
|
||||||
info.strokeSize = textDefinition._stroke._strokeSize;
|
info.strokeSize = textDefinition._stroke._strokeSize;
|
||||||
info.tintColorR = textDefinition._fontFillColor.r;
|
info.tintColorR = textDefinition._fontFillColor.r / 255.0f;
|
||||||
info.tintColorG = textDefinition._fontFillColor.g;
|
info.tintColorG = textDefinition._fontFillColor.g / 255.0f;
|
||||||
info.tintColorB = textDefinition._fontFillColor.b;
|
info.tintColorB = textDefinition._fontFillColor.b / 255.0f;
|
||||||
|
|
||||||
if (! _initWithString(text, align, textDefinition._fontName.c_str(), textDefinition._fontSize, &info))
|
if (! _initWithString(text, align, textDefinition._fontName.c_str(), textDefinition._fontSize, &info))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue