Skip to content

[rshapes] Fix DrawRectangleRoundedLinesEx not scaling with transform when thick=1#5980

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
SamaelHeaven:fix/DrawRectangleRoundedLinesEx
Jul 15, 2026
Merged

[rshapes] Fix DrawRectangleRoundedLinesEx not scaling with transform when thick=1#5980
raysan5 merged 1 commit into
raysan5:masterfrom
SamaelHeaven:fix/DrawRectangleRoundedLinesEx

Conversation

@SamaelHeaven

Copy link
Copy Markdown
Contributor

In the DrawRectangleRoundedLinesEx function, if the line thickness is <= 1, it uses RL_LINES to draw the lines, otherwise, it uses quads. However, this makes the two behave differently, if we multiply the matrix by a scale or zoom via a camera, RL_LINES stays the same size, whereas the quads are scaled properly.

@raysan5
raysan5 merged commit 39706cc into raysan5:master Jul 15, 2026
@raysan5

raysan5 commented Jul 15, 2026

Copy link
Copy Markdown
Owner

@SamaelHeaven thanks for the review

MatthewRoush added a commit to MatthewRoush/raylib that referenced this pull request Jul 18, 2026
In raysan5#5980 a bug was introduced for `DrawRectangleRoundedLines()`. `DrawRectangleRoundedLines()` previously assumed that `DrawRectangleRoundedLinesEx()` uses `RL_LINES` when line thickness is 1 (which is no longer true, it now uses `RL_QUADS` or `RL_TRIANGLES`.)

I copy/pasted the previous `DrawRectangleRoundedLinesEx()` implementation and trimmed it down (since now the line thickness is always 1), so now `DrawRectangleRoundedLines()` uses `RL_LINES`. This makes it consistent with all other `Draw*Lines()` functions, which use `RL_LINES`.
raysan5 pushed a commit that referenced this pull request Jul 21, 2026
In #5980 a bug was introduced for `DrawRectangleRoundedLines()`. `DrawRectangleRoundedLines()` previously assumed that `DrawRectangleRoundedLinesEx()` uses `RL_LINES` when line thickness is 1 (which is no longer true, it now uses `RL_QUADS` or `RL_TRIANGLES`.)

I copy/pasted the previous `DrawRectangleRoundedLinesEx()` implementation and trimmed it down (since now the line thickness is always 1), so now `DrawRectangleRoundedLines()` uses `RL_LINES`. This makes it consistent with all other `Draw*Lines()` functions, which use `RL_LINES`.
@SamaelHeaven
SamaelHeaven deleted the fix/DrawRectangleRoundedLinesEx branch July 21, 2026 18:41
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