Skip to content

Added draw_rect_rounded()#42

Open
DallinTG wants to merge 17 commits into
karl-zylinski:masterfrom
DallinTG:rounded_rect
Open

Added draw_rect_rounded()#42
DallinTG wants to merge 17 commits into
karl-zylinski:masterfrom
DallinTG:rounded_rect

Conversation

@DallinTG

Copy link
Copy Markdown

Hi this is a draw rect rounded proc it is very similar to how raylib did it because i was referencing raylib the entire time i was working on it but i did make one improvement from the raylib version this one can rotate and have a origin. I hope you find this helpful in some way if you have any questions about it just ask me.

@karl-zylinski karl-zylinski marked this pull request as draft January 17, 2026 15:00
@karl-zylinski

Copy link
Copy Markdown
Owner

Thanks, I might take a look at this code when I implement some more drawing procs (after Beta 2 is done).

I changed this PR to a draft as it does not follow these rules: https://github.com/karl-zylinski/karl2d/blob/master/pull_request_rules.md (the rules didn't exist when you made the PR, so don't worry about that, you didn't do anything wrong, just informing you now).

@DallinTG DallinTG marked this pull request as ready for review January 17, 2026 23:03
@DallinTG

Copy link
Copy Markdown
Author

I believe it is ready now. Please let me know if something needs to be changed.
I fixed the spaces
I made the math much more readable
I have updated things to follow the rules

@DallinTG

Copy link
Copy Markdown
Author

The points are now in local space “{0,0}”
Then all of the transformations are done to them. This then allowed me to easily put part of it in a very simple loop. It also made all of the other math follow a similar structure meaning that if you understand one part of the code it will be easier to understand the rest of the code.

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