CGContextRefを使って折れ線グラフを描いています。このグラフをズームインして、線をはっきりと表示するためにズームアウトできますか?
私はこのコードを使用しています。
CGContextRef context=UIGraphicsGetCurrentContext();
CGContextBeginPath(context);
CGMutablePathRef path=CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, lastPointX, lastPointY);
CGPathAddLineToPoint(path, NULL, newPointX, newPointY);
CGContextAddPath(context, path);
CGContextSetLineWidth(context, lineWidth);
CGContextSetStrokeColorWithColor(context, lineColor);
CGContextStrokePath(context);
CGPathRelease(path);
if (isFilling) {
CGMutablePathRef path=CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, newPointX, newPointY);
CGPathAddLineToPoint(path, NULL, newPointX, self.bounds.size.height);
CGPathAddLineToPoint(path, NULL, lastPointX, self.bounds.size.height);
CGPathAddLineToPoint(path, NULL, lastPointX, lastPointY);
CGPathCloseSubpath(path);
CGContextAddPath(context, path);
CGContextSetFillColorWithColor(context, fillingColor);
CGContextFillPath(context);
CGPathRelease(path);
}
注:- ビューをズームしたくありません。はっきり見えるように線を引き直したい。