我正试图为我提出巴./蓬特申请,使我更加熟悉目标C,并易于理解。 现在,我已经有了基本的彩色体,想将其文字改进到类似于Zen Brush。 我希望,当用户开始油漆时,它会感到更加rush。
如何能够做到这一点?
本文载有我部分建议的法典:
currentTouch = [touch locationInView:self.view];
currentTouch.y -= 20;
UIGraphicsBeginImageContext(self.view.frame.size);
[touchDraw.image drawInRect:CGRectMake(0, 0, touchDraw.frame.size.width, touchDraw.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 25.0);
CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), redAmt, greenAmt, blueAmt, alpha);
CGContextBeginPath(UIGraphicsGetCurrentContext());
CGContextMoveToPoint(UIGraphicsGetCurrentContext(), endingPoint.x, endingPoint.y);
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentTouch.x, currentTouch.y);
CGContextStrokePath(UIGraphicsGetCurrentContext());
touchDraw.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
endingPoint = currentTouch;
touchMoved++;
if (touchMoved == 10) {
touchMoved = 0;
}
它为我的学校项目做准备,该项目将于第30天结束。
感谢!