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

Ensure polygons without stroke are fully filled #6358

Merged
merged 2 commits into from Jan 12, 2017

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Jan 11, 2017

Because polygons without stroke are only implicitly closed (i.e. without closePath() calls), optimizing away moveTo() calls when the previous lineTo() coordinate matches the moveTo() coordinate results in polygons whose last vertex is not included in the filled area.

Resetting the previous coordinate causes moveTo() to be called after a fill, which fixes the issue.

Fixes #6341.

Copy link
Member

@fredj fredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

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

Successfully merging this pull request may close these issues.

Polygon (ol.layer.Vector) not filled completely when used without stroke color
2 participants