Sto disegnando un grafico a linee usando CGContextRef. Posso ingrandire lo zoom di questo grafico per mostrare chiaramente le linee.Come ingrandire il grafico, creato con CGContextRef
Sto usando questo codice.
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);
}
Nota: - Non voglio ingrandire la vista. Voglio ridisegnare le linee per mostrare chiaramente.
Non voglio zoomare. Voglio ridisegnare le linee per mostrare chiaramente. –