iPhone 4 でうまくスケールアップするアプリを作成しようとしています。現在、1 つの重要な部分を除いて、そのほとんどが完全にスケールアップしています。これが私のコードです:
- (void)drawInContext:(CGContextRef)context {
UIGraphicsPushContext(context);
CGContextSetGrayFillColor(context, 1.0f, 1.0f);
CGContextFillRect(context, self.bounds);
CGContextSetAllowsAntialiasing(context, true);
CGContextSetShouldAntialias(context, true);
CGContextSetAllowsFontSmoothing(context, true);
CGContextSetShouldSmoothFonts(context, true);
CGContextSetAllowsFontSubpixelQuantization(context, true);
CGContextSetShouldSubpixelQuantizeFonts(context, true);
CGContextTranslateCTM(context, 0.0f, self.frame.size.height);
CGContextScaleCTM(context, 1.0f, -1.0f);
CGContextSetFillColorWithColor(context, [[UIColor blackColor] CGColor]);
CGContextSelectFont(context, "CardKit", 30.0f, kCGEncodingMacRoman);
CGContextSetTextDrawingMode(context, kCGTextFill);
CGContextShowText(context, "A", sizeof("A"));
UIGraphicsPopContext();
}
このショートは両方のデバイスで鮮明なテキストを生成しますが、残念ながら、両方のデバイスでぼやけたテキストを生成します. 表示方法は次のとおりです。
その画像は、iPhone 4 で 100% ズームで撮影されています。これを修正する方法はありますか?