I am working on a graphical application where the user can draw / write with a finger or stylus. For this, I mentioned the code from https://github.com/yusenhan/Smooth-Line-View in my application.
The problem that I am facing is that writing sometimes, when you write very close, is not very smooth.
So, I think I'm wrong in getting a breakpoint.
Below is my code
// Find the midpoint
CGPoint midPoint(CGPoint p1, CGPoint p2) { return CGPointMake((p1.x + p2.x) * 0.5, (p1.y + p2.y) * 0.5); } #pragma mark Gesture handle -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject];
According to my words, the points that I pass to CGContextAddQuadCurveToPoint can be configured, but I do not get how to configure this. I read the docs to find breakpoints for the Bezier Curve , but I don't understand.
So friends, please help me understand what I'm wrong about.
ios core-graphics uibezierpath cgcontext cgpath
Ranjit Jan 02 '14 at 11:16 2014-01-02 11:16
source share