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

Incorrect difference with rounded rectangle #22

Open
alexandre-g opened this issue Dec 17, 2020 · 1 comment
Open

Incorrect difference with rounded rectangle #22

alexandre-g opened this issue Dec 17, 2020 · 1 comment

Comments

@alexandre-g
Copy link

Hi there, thanks for open-sourcing the library.

I am trying to get a difference between a rounded rect and a stripe running through it but it ends up looking like so:
image

If I use a normal rect, all is well - above I am expecting the same result but with the blue rectangle corners rounded
image

Is this a limitation or a bug, and any way I can work around this?

UIBezierPath* path1 = [UIBezierPath bezierPathWithRect:CGRectMake(10, 10, 200, 100)];
UIBezierPath* path2 = [UIBezierPath bezierPathWithRect:CGRectMake(0, 40, 300, 30)];
NSArray<UIBezierPath*>* result = [path1 differenceWithPath:path2];
[[UIColor blueColor] setFill];
for (UIBezierPath* path in result) {
    [path fill];
}

Thanks

@kunass2
Copy link

kunass2 commented Jun 7, 2022

I experience the same issue described here

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