IOS: CGPath line drawing with dynamic width

I want to draw a line with dynamic width, as shown in the attached figure. What should be the best approach for this.

enter image description here

Updated:

My task is to draw a line of finger movement. And the line width changes as the swipe speed changes. (Line width and swipe speed of the finger) are directly proportional.

+4
source share
3 answers

, , , , , . , , 2 , , .

x , , .

: . , cocos2d.

0

iOS ( Mac OS) . cocos2d .

, . , Cocos, OpenGL. , , .

0

Smooth Freehand Drawing. .

[path addCurveToPoint:pts[3] controlPoint1:pts[1] controlPoint2:pts[2]];

bezierPaths. , , , .

0

All Articles