ios - Most efficient way to check number of CGPoints in CGPathRef -


I have to find out that my CGMutablePathRef has more than 3 digits! It will often be checked that I am looking for an efficient solution.

For this reason I need to do this because the user draws the shape in my project. As the user leaves his finger, a CGPint (the finger of the current location) is added to the path and a physical body is added when called touch aded. Now if the user taps the screen then only in CGMutablePathRef One point is this (my argument in my head) and when I use my CGMTable Pathfreck to connect the physical body, I get the following error. Convergence failed: (calculation> = 2), Function CreateChain, File / Sourcecatch / PhysicsKit / PhysicsKit 6.5.4 / Fiskixkit / Box 2D / Coalition / Impact / BCHIHAP, CPPP, Line 45.

I'm trying to create a function to call a CGPath as a parameter and count the digits until it reaches 3 (or If not 3 then the end) and

thanks

If you want to calculate the elements of CGPath , then you have to use CGPathApply , and there is no one to support you all for quick termination. Elements must be calculated. Get it from my Rob_forEachElementOfCGPath function, and use it like this:

  int numbersopsconfig (CGPathRef path) {__black int calculation = 0; Rob_forEachElementOfCGPath (Path, ^ (Const CGPathElement * element) {if (element-> Type! = KCGPathElementMoveToPoint) {++ count;}}); Calculation of return; }    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

c++ - Qt::make_shared for creating QSharedPtr as std::make_shared for creating std::shared_ptr -