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

Wrong result when add padding to margined polygons #10

Open
parachvte opened this issue Mar 21, 2018 · 0 comments
Open

Wrong result when add padding to margined polygons #10

parachvte opened this issue Mar 21, 2018 · 0 comments

Comments

@parachvte
Copy link

I got different results when do padding on original polygon and on margined polygon.

When I add margin and padding on original polygon, everything works fine (White is original polygon, red is margined, green is padded):

screen shot 2018-03-21 at 11 50 43 am

But when I add padding on margined polygon, like

const path = [[10, 0], [60, 0], [70, 80], [50, 122], [30, 90], [3, 32]];
path.push(path[0]);

const margined = new Offset(path).margin(5)[0];
const padded = new Offset(margined).padding(10)[0];

I thought it should be something very like

const padded = new Offset(path).padding(5)[0];

But results are

screen shot 2018-03-21 at 11 53 41 am

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