CGContextRef kullanarak bir çizgi çizme çiziyorum. Çizgileri net bir şekilde göstermek için bu grafiği uzaklaştırın.Grafik, CGContextRef ile oluşturuldu nasıl oluşturulur
Bu kodu kullanıyorum.
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);
}
Not: - Görünümü büyütmek istemiyorum. Açıkça gösterilecek çizgileri yeniden çizmek istiyorum.
Görünümü yakınlaştırmak istemiyorum. Açıkça gösterilecek çizgileri yeniden çizmek istiyorum. –