CGContext rectify the CCLabelTTF using the CGContextScaleCTM(context, 1, -1.0f)

I use the CCTexture2d to change the the CCLabel to make Art Character, but I got the problem, I create the context by CGBitmapContextCreate(data, POTWide, POTHigh, 8, 4 * POTWide, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); I want to get the effect of gradient color.When i
use CGBitmapContextCreateImage(context) to make a image mask, then use following code

CGContextTranslateCTM(context,0, stringRect.size.height);

CGContextScaleCTM(context, 1, –1);

CGContextClipToMask(context, CGRectMake(0, 0, dimensions.width, dimensions.height), alphaMask);
to display the mask, then use CGContextDrawLinearGradient(context, gradient, startPoint, endPoint,kCGGradientDrawsAfterEndLocation | kCGGradientDrawsBeforeStartLocation); to show the effect of gradient color.
i got the effect indeed, but there are problems that is scale is not 1:1, generally the mask is smaller than the raw character, and does not cover the raw character, I don’t know why it happen like this way,