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

Add seamless polygon border line #4

Merged
merged 5 commits into from
Jun 26, 2022
Merged

Add seamless polygon border line #4

merged 5 commits into from
Jun 26, 2022

Conversation

Koyper
Copy link
Contributor

@Koyper Koyper commented Jun 26, 2022

This commit eliminates the visible defect in the polygon border line where it formerly closed with a rounded end.

It does this by computing a bridge point midway between the start and end points and adding this point to the beginning and end of the PoolVector2Array defining the line. The butt ends of the line then always meet orthogonally and thus invisibly.

Koyper added 3 commits June 26, 2022 08:58
Added seemless closed line function.
Added seemless closed line function.
Added seamless closed line function.
@Calinou Calinou added the enhancement New feature or request label Jun 26, 2022
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Thanks! Congratulations for your first merged pull request 🎉

@Calinou Calinou merged commit 80b737f into godot-extended-libraries:master Jun 26, 2022
@Calinou
Copy link
Member

Calinou commented Jun 26, 2022

Visual comparison

Click to view at full size.

Before After
2022-06-26_20 46 33 2022-06-26_20 46 58

Calinou pushed a commit to godot-extended-libraries/godot-antialiased-line2d-demo that referenced this pull request Jun 26, 2022
@Calinou Calinou added bug Something isn't working and removed enhancement New feature or request labels Jun 26, 2022
@Koyper
Copy link
Contributor Author

Koyper commented Jun 27, 2022

Thank you! It feels good to give a little back...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants