fixed can's set color for LabelTTF correctly on IOS.

This commit is contained in:
Dhilan007 2014-07-08 10:31:14 +08:00
parent bf1ec7d463
commit 6e2caf1c78
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ static bool _initWithString(const char * text, cocos2d::Device::TextAlign align,
} }
// text color // text color
CGContextSetRGBFillColor(context, info->tintColorR, info->tintColorG, info->tintColorB, 1); CGContextSetRGBFillColor(context, info->tintColorR / 255.0f, info->tintColorG / 255.0f, info->tintColorB / 255.0f, 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