i want to draw curve with user touches two points perfectly...!but,no idea for this implementation for this functionality...!
Help with me any code or tutorial with greatly appreciated....!
Thanks...!
Look at apple's 'Drawing Shapes Using Bezier Paths' guid.
Related
i want to smooth and curve draw line on finger touch and using only UIBezierPath.i am new for drawing concept in iOS and i need any example or code and how to do it like my requirement can any one guide me with greatly appreciated!
Thanks in Advance!
I have one example for free hand drawing but one problem is it is not much smoother but you can have one starting point using this example.
Happy Coding :)
I am trying to draw CGPaths using CAShapeLayer. I want to change the color of the parts where lines are intersected.
Following screenshots explain the goal easier.
http://a5.mzstatic.com/us/r1000/046/Purple/a3/9b/29/mzl.pocvbqdb.320x480-75.jpg
http://a3.mzstatic.com/us/r1000/037/Purple/1d/54/44/mzl.dpijulvx.320x480-75.jpg
Check #Alex Nichol's Answer on this post, How to determine intersection of CGPaths .
He developed an Open Source solution to CGPath collision detection, as well as a youtube video showing it in Action.
Hope this helps !
I have task to develop an application like iDesk. i have already post a question
on stackoverflow i have find a way how to recognize user draw a circle detecting circle
now i want to gesture all geometric like ellipse,rectangle or others.
i have not any idea about it please help me.
You need to be very familiar with "Core Graphics" framework for drawing .
Drawing Guide for iOS
Quartz 2D Programming Guide
Core Animation Programming Guide
For shape recognition you need some math master or some C library (if there is such library) , that is really difficult task .
I am developing a game app in which a curve(Bezier) is required on the basis of theta provided by user and this will be in animated format. But i am not aware of openGL. Then how can i do it programatically?
Have a look at UIBezierPath
Have a look at the Quartz drawing guide.
I'm looking for a way to draw a curve (perhaps a parametric function?) into a CGContext
The best example which I can think of is the Adobe Ideas iPad application. As the user drags their finger, the application draws lines for every touchesMoved: using CGContextAddLineToPoint. After the user picks up their finger at touchesEnded:, the application does some math and replaces all of the lines with a single, smoothed curve.
What I have is a list of CGPoints, and I am looking to draw a smooth curve which follows those CGPoints into the CGContext.
Any assistance?
I'd advise creating a CGPathRef and use the CGPathAddQuadCurveToPoint method.
Hope this helps!