このコードで、iPhone ではバター ソフトに動作するが、iPad では網膜と非網膜の両方で遅くてむらがある/分厚い何かを見ることができますか? iPad で高速化する方法についてのアイデアはありますか? ブラシのサイズ、不透明度、エッジを制御して、基本的に指でペイントしたいだけです(そのため、ソフトエッジ用のグラデーションがあります)
ありがとうございました
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint currentPointTemp = [touch locationInView:parentView.view];
CGPoint currentPoint = CGPointMake((currentPointTemp.x /imageScale)+ (posOffset.x/imageScale), (currentPointTemp.y /imageScale) + (posOffset.y/imageScale));
currentPoint.y -= 10;
UIGraphicsBeginImageContextWithOptions(CGSizeMake(drawImage.frame.size.width, drawImage.frame.size.height), NO, 0);
[drawImage.image drawInRect:CGRectMake(0, 0, drawImage.frame.size.width, drawImage.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetAlpha(UIGraphicsGetCurrentContext(), opacity);
CGContextBeginPath (UIGraphicsGetCurrentContext());
CGContextAddArc(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y, glamzyDelegate.brushSize, 0, 6.28318531, 0);
CGContextClosePath (UIGraphicsGetCurrentContext());
CGContextClip(UIGraphicsGetCurrentContext());
CGPoint myStartPoint, myEndPoint;
CGFloat myStartRadius, myEndRadius;
myStartPoint.x = lastPoint.x;
myStartPoint.y = lastPoint.y;
myEndPoint.x = lastPoint.x;
myEndPoint.y = lastPoint.y;
myStartRadius = 0;
myEndRadius = glamzyDelegate.brushSize;
CGContextDrawRadialGradient(UIGraphicsGetCurrentContext(), gradient, myStartPoint, myStartRadius, myEndPoint, myEndRadius, kCGGradientDrawsAfterEndLocation);
drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
lastPoint = currentPoint;
}