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

Regression: substract fails on compound path #877

Closed
iconexperience opened this issue Dec 30, 2015 · 1 comment
Closed

Regression: substract fails on compound path #877

iconexperience opened this issue Dec 30, 2015 · 1 comment

Comments

@iconexperience
Copy link
Contributor

Here is a simple test case that used to work, but now fails.

This bug only occurs if both of the circles exists and if the smaller circle is counter-clockwise.

var cp = new CompoundPath();
cp.addChild(new Path.Circle(100, 60, 50));
cp.addChild(new Path.Circle(100, 60, 30));
cp.addChild(new Path({segments:[
    [120, 140],
    [150, 140],
    [150, 190],
    [120, 190]], closed:true}));
cp.strokeColor = "green";

p = new Path({segments:[
    [135, 200],
    [135, 120],
    [170, 120],
    [170, 200]
], closed:true});

p.strokeColor = "red";
var r = cp.subtract(p);
r.fillColor = "rgba(255, 0, 0, .2)";

image

@iconexperience
Copy link
Contributor Author

Please look at my comment in #869, this may be very easy to fix.

@lehni lehni closed this as completed in 49d24c1 Dec 30, 2015
lehni added a commit that referenced this issue Dec 30, 2015
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

1 participant