Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with all bezier? #2

Open
x43x61x69 opened this issue Feb 24, 2016 · 1 comment
Open

Not working with all bezier? #2

x43x61x69 opened this issue Feb 24, 2016 · 1 comment

Comments

@x43x61x69
Copy link

I tried some shapes converted from SVG, seems some of them will not show.

e.g.:

UIBezierPath* bezierPath = UIBezierPath.bezierPath;
[bezierPath moveToPoint: CGPointMake(48.13, 9.27)];
[bezierPath addLineToPoint: CGPointMake(40.54, 15.09)];
[bezierPath addLineToPoint: CGPointMake(43.27, 24.27)];
[bezierPath addLineToPoint: CGPointMake(35.38, 18.84)];
[bezierPath addLineToPoint: CGPointMake(27.49, 24.27)];
[bezierPath addLineToPoint: CGPointMake(30.22, 15.09)];
[bezierPath addLineToPoint: CGPointMake(22.63, 9.27)];
[bezierPath addLineToPoint: CGPointMake(32.2, 9)];
[bezierPath addLineToPoint: CGPointMake(35.38, 0)];
[bezierPath addLineToPoint: CGPointMake(38.56, 9)];
[bezierPath addLineToPoint: CGPointMake(48.13, 9.27)];
[bezierPath addLineToPoint: CGPointMake(48.13, 9.27)];
[bezierPath closePath];
[bezierPath moveToPoint: CGPointMake(58.63, 30)];
[bezierPath addLineToPoint: CGPointMake(53.71, 33.75)];
[bezierPath addLineToPoint: CGPointMake(55.48, 39.69)];
[bezierPath addLineToPoint: CGPointMake(50.38, 36.18)];
[bezierPath addLineToPoint: CGPointMake(45.28, 39.69)];
[bezierPath addLineToPoint: CGPointMake(47.05, 33.75)];
[bezierPath addLineToPoint: CGPointMake(42.13, 30)];
[bezierPath addLineToPoint: CGPointMake(48.31, 29.85)];
[bezierPath addLineToPoint: CGPointMake(50.38, 24)];
[bezierPath addLineToPoint: CGPointMake(52.45, 29.85)];
[bezierPath addLineToPoint: CGPointMake(58.63, 30)];
[bezierPath addLineToPoint: CGPointMake(58.63, 30)];
[bezierPath closePath];
[bezierPath moveToPoint: CGPointMake(51.79, 44.85)];
[bezierPath addCurveToPoint: CGPointMake(55.36, 50.4) controlPoint1: CGPointMake(54.28, 44.61) controlPoint2: CGPointMake(56.95, 48.15)];
[bezierPath addCurveToPoint: CGPointMake(52.12, 54.21) controlPoint1: CGPointMake(54.4, 51.75) controlPoint2: CGPointMake(53.38, 53.01)];
[bezierPath addCurveToPoint: CGPointMake(9.7, 54.21) controlPoint1: CGPointMake(40.39, 66) controlPoint2: CGPointMake(21.4, 66)];
[bezierPath addCurveToPoint: CGPointMake(9.7, 11.79) controlPoint1: CGPointMake(-2.03, 42.51) controlPoint2: CGPointMake(-2.03, 23.49)];
[bezierPath addCurveToPoint: CGPointMake(13.51, 8.55) controlPoint1: CGPointMake(10.9, 10.59) controlPoint2: CGPointMake(12.16, 9.51)];
[bezierPath addCurveToPoint: CGPointMake(19.06, 12.12) controlPoint1: CGPointMake(15.76, 6.96) controlPoint2: CGPointMake(19.3, 9.63)];
[bezierPath addCurveToPoint: CGPointMake(27.73, 36.18) controlPoint1: CGPointMake(18.25, 20.7) controlPoint2: CGPointMake(21.13, 29.61)];
[bezierPath addCurveToPoint: CGPointMake(51.79, 44.85) controlPoint1: CGPointMake(34.3, 42.78) controlPoint2: CGPointMake(43.18, 45.66)];
[bezierPath addLineToPoint: CGPointMake(51.79, 44.85)];
[bezierPath closePath];
[bezierPath moveToPoint: CGPointMake(46.87, 50.91)];
[bezierPath addCurveToPoint: CGPointMake(23.47, 40.5) controlPoint1: CGPointMake(38.38, 50.43) controlPoint2: CGPointMake(29.98, 46.92)];
[bezierPath addCurveToPoint: CGPointMake(13, 17.04) controlPoint1: CGPointMake(16.96, 33.93) controlPoint2: CGPointMake(13.48, 25.5)];
[bezierPath addCurveToPoint: CGPointMake(13.93, 49.98) controlPoint1: CGPointMake(4.57, 26.46) controlPoint2: CGPointMake(4.9, 40.92)];
[bezierPath addCurveToPoint: CGPointMake(46.87, 50.91) controlPoint1: CGPointMake(22.99, 59.01) controlPoint2: CGPointMake(37.45, 59.34)];
[bezierPath addLineToPoint: CGPointMake(46.87, 50.91)];
[bezierPath closePath];
bezierPath.miterLimit = 4;

Did I miss something?

It's a really nice project!

@mateuszszklarek
Copy link
Owner

Hi!

First of all, thanks for Your feedback!

I will check bezier path which you send me, and I will answer you what is wrong.

Best regards
Mateusz Szklarek

Wysłane z iPhone'a

Dnia 24.02.2016 o godz. 10:45 Zhi-Wei Cai [email protected] napisał(a):

I tried some shapes converted from SVG, seems some of them will not show.

e.g.:

UIBezierPath* bezierPath = UIBezierPath.bezierPath;
[bezierPath moveToPoint: CGPointMake(48.13, 9.27)];
[bezierPath addLineToPoint: CGPointMake(40.54, 15.09)];
[bezierPath addLineToPoint: CGPointMake(43.27, 24.27)];
[bezierPath addLineToPoint: CGPointMake(35.38, 18.84)];
[bezierPath addLineToPoint: CGPointMake(27.49, 24.27)];
[bezierPath addLineToPoint: CGPointMake(30.22, 15.09)];
[bezierPath addLineToPoint: CGPointMake(22.63, 9.27)];
[bezierPath addLineToPoint: CGPointMake(32.2, 9)];
[bezierPath addLineToPoint: CGPointMake(35.38, 0)];
[bezierPath addLineToPoint: CGPointMake(38.56, 9)];
[bezierPath addLineToPoint: CGPointMake(48.13, 9.27)];
[bezierPath addLineToPoint: CGPointMake(48.13, 9.27)];
[bezierPath closePath];
[bezierPath moveToPoint: CGPointMake(58.63, 30)];
[bezierPath addLineToPoint: CGPointMake(53.71, 33.75)];
[bezierPath addLineToPoint: CGPointMake(55.48, 39.69)];
[bezierPath addLineToPoint: CGPointMake(50.38, 36.18)];
[bezierPath addLineToPoint: CGPointMake(45.28, 39.69)];
[bezierPath addLineToPoint: CGPointMake(47.05, 33.75)];
[bezierPath addLineToPoint: CGPointMake(42.13, 30)];
[bezierPath addLineToPoint: CGPointMake(48.31, 29.85)];
[bezierPath addLineToPoint: CGPointMake(50.38, 24)];
[bezierPath addLineToPoint: CGPointMake(52.45, 29.85)];
[bezierPath addLineToPoint: CGPointMake(58.63, 30)];
[bezierPath addLineToPoint: CGPointMake(58.63, 30)];
[bezierPath closePath];
[bezierPath moveToPoint: CGPointMake(51.79, 44.85)];
[bezierPath addCurveToPoint: CGPointMake(55.36, 50.4) controlPoint1: CGPointMake(54.28, 44.61) controlPoint2: CGPointMake(56.95, 48.15)];
[bezierPath addCurveToPoint: CGPointMake(52.12, 54.21) controlPoint1: CGPointMake(54.4, 51.75) controlPoint2: CGPointMake(53.38, 53.01)];
[bezierPath addCurveToPoint: CGPointMake(9.7, 54.21) controlPoint1: CGPointMake(40.39, 66) controlPoint2: CGPointMake(21.4, 66)];
[bezierPath addCurveToPoint: CGPointMake(9.7, 11.79) controlPoint1: CGPointMake(-2.03, 42.51) controlPoint2: CGPointMake(-2.03, 23.49)];
[bezierPath addCurveToPoint: CGPointMake(13.51, 8.55) controlPoint1: CGPointMake(10.9, 10.59) controlPoint2: CGPointMake(12.16, 9.51)];
[bezierPath addCurveToPoint: CGPointMake(19.06, 12.12) controlPoint1: CGPointMake(15.76, 6.96) controlPoint2: CGPointMake(19.3, 9.63)];
[bezierPath addCurveToPoint: CGPointMake(27.73, 36.18) controlPoint1: CGPointMake(18.25, 20.7) controlPoint2: CGPointMake(21.13, 29.61)];
[bezierPath addCurveToPoint: CGPointMake(51.79, 44.85) controlPoint1: CGPointMake(34.3, 42.78) controlPoint2: CGPointMake(43.18, 45.66)];
[bezierPath addLineToPoint: CGPointMake(51.79, 44.85)];
[bezierPath closePath];
[bezierPath moveToPoint: CGPointMake(46.87, 50.91)];
[bezierPath addCurveToPoint: CGPointMake(23.47, 40.5) controlPoint1: CGPointMake(38.38, 50.43) controlPoint2: CGPointMake(29.98, 46.92)];
[bezierPath addCurveToPoint: CGPointMake(13, 17.04) controlPoint1: CGPointMake(16.96, 33.93) controlPoint2: CGPointMake(13.48, 25.5)];
[bezierPath addCurveToPoint: CGPointMake(13.93, 49.98) controlPoint1: CGPointMake(4.57, 26.46) controlPoint2: CGPointMake(4.9, 40.92)];
[bezierPath addCurveToPoint: CGPointMake(46.87, 50.91) controlPoint1: CGPointMake(22.99, 59.01) controlPoint2: CGPointMake(37.45, 59.34)];
[bezierPath addLineToPoint: CGPointMake(46.87, 50.91)];
[bezierPath closePath];
bezierPath.miterLimit = 4;

Did I miss something?

It's a really nice project!


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants