Skip to content

[rshapes] Fix DrawRectangleRounded automatic segments count to be consistent with DrawRectangleRoundedLinesEx - #5875

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
anstropleuton:master
May 19, 2026
Merged

[rshapes] Fix DrawRectangleRounded automatic segments count to be consistent with DrawRectangleRoundedLinesEx#5875
raysan5 merged 1 commit into
raysan5:masterfrom
anstropleuton:master

Conversation

@anstropleuton

Copy link
Copy Markdown
Contributor

The DrawRectangleRounded when set segments count < 4 automatically calculates number of segments needed to draw smoother corners, but it divides the count by 4 instead of 2 which DrawRectangleRoundedLinesEx does. This fix makes DrawRectangleRounded use the same math as DrawRectangleRoundedLinesEx.

Before fix:
image

Notice fewer segments for the DrawRectangleRounded (gray colored box) compared to the DrawRectangleRoundedLinesEx (black colored outline) with same rectangle.

After fix:
image

@anstropleuton anstropleuton changed the title Make automatic segments count for DrawRectangleRounded to be consistent with DrawRectangleRoundedLinesEx [rshapes] Fix DrawRectangleRounded automatic segments count to be consistent with DrawRectangleRoundedLinesEx May 19, 2026
@raysan5
raysan5 merged commit d31c10a into raysan5:master May 19, 2026
16 checks passed
@raysan5

raysan5 commented May 19, 2026

Copy link
Copy Markdown
Owner

@anstropleuton thanks for the review!

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.

2 participants