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

Fill is sometimes outside the polygon #35

Closed
mheden opened this issue Mar 19, 2018 · 2 comments
Closed

Fill is sometimes outside the polygon #35

mheden opened this issue Mar 19, 2018 · 2 comments
Assignees
Labels

Comments

@mheden
Copy link

mheden commented Mar 19, 2018

If I define a polygon like this, the "filling" ends up outside the polygon: https://jsfiddle.net/mtytutua/

    rc.polygon([
      [100, 100], [300, 100], [300, 200], [200, 200],
      [200, 300], [300, 300], [300, 400], [100, 400], [100, 100]], {
      stroke: 'red',
      hachureAngle: 65,
      fill: 'rgba(0,0,255,0.6)'
    });

It looks like part of the "filling" is doubled.

Great library BTW!

@pshihn
Copy link
Collaborator

pshihn commented Mar 19, 2018

This sometimes happens in .polygon() method when the shape is not a convex polygon.
If you draw the same shape using SVG path, it renders fine.
See: https://jsfiddle.net/5fjh2vvd/1/ as a workaround.

@pshihn pshihn mentioned this issue May 26, 2018
@pshihn pshihn added the bug label Jun 18, 2018
@pshihn pshihn self-assigned this Jun 18, 2018
@pshihn
Copy link
Collaborator

pshihn commented Jun 18, 2018

Resolved as part of #72

@pshihn pshihn closed this as completed Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants