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

gg: fix overlapping slices in draw_slice_filled() #20182

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

larpon
Copy link
Contributor

@larpon larpon commented Dec 15, 2023

Before this PR (using a transparent color instead of black):
image
After this PR:
image

@larpon
Copy link
Contributor Author

larpon commented Dec 15, 2023

I wonder why/if the if i % 1 == 0 is even needed at all now 🤔

The drawing seems to work without it as well - is i % 1 == 0 true in all cases?

@spytheman
Copy link
Member

spytheman commented Dec 15, 2023

is i % 1 == 0 true in all cases?

Yes, all numbers can be divided by 1, with the remainder being the initial number.
Just making the code adding the last point unconditional, will be cleaner.

(I had so many errors in this comment ... I should probably take a small break...)

@larpon
Copy link
Contributor Author

larpon commented Dec 15, 2023

Yes, all numbers can be divided by 1, with the remainder being the initial number. Just making the code adding the last point unconditional, will be cleaner.

(I had so many errors in this comment ... I should probably take a small break...)

Right, done. I've removed it 👍

Remember to get some rest, be careful not to burnout 🙂

@shove70
Copy link
Contributor

shove70 commented Dec 15, 2023

(I had so many errors in this comment ... I should probably take a small break...)

It's Friday again 😄

@spytheman spytheman merged commit 6d0d82d into vlang:master Dec 15, 2023
42 checks passed
@larpon larpon deleted the gg/fix-draw_slice_filled branch December 15, 2023 18:31
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.

3 participants