-
-
Notifications
You must be signed in to change notification settings - Fork 23.4k
Add corner smoothing to StyleBoxFlat #111483
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
base: master
Are you sure you want to change the base?
Add corner smoothing to StyleBoxFlat #111483
Conversation
Consistent with existing behavior would be either Also, would you mind updating |
In the last commits, I've got rid of the
Of course! I've added the docs entry. Should we also mention the source I've adapted the formula and descriptions from (CSS docs)? |
You're failing the automatic tests, see https://docs.godotengine.org/en/4.4/contributing/development/code_style_guidelines.html#using-clang-format-locally for how to run those tests locally before committing. I don't see the point in arbitrarily limiting the max value to 10. You should allow any value that doesn't outright break things. You can use the property_hint |
I am currently trying to fix it, and there's some progress. I've already fixed the consistency of border widths across different
I am not sure how good of a solution this is though, because it changes current corner rounding logic and adds quite a bit of code. Anyhow, I'll tidy things up and make a commit soon I hope. AA is still kinda broken but there's some progress too. And about the alternatives to the normals-based-solution: the one I've got is to create a heuristic to draw parallel-looking border lines. Here are the equations I've prepared in Desmos: https://www.desmos.com/calculator/qcqzysryq4. Maybe this approach would be more efficient but the results will be less accurate and stable I believe.
Thank you for the link! I've missed the pre-commit part somehow.
Agreed, will do! |
Resolves godotengine/godot-proposals#13353.
This PR adds squircle/superellipse rounding with two parameters:
corner_smoothing_enabled
andcorner_smoothing_strength
. I'm not sure if it's better to omitcorner_smoothing_enabled
and just do corner smoothing whencorner_smoothing_strength
> 0.