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

Add the operation 0x0C to draw rounded rectangles with varying radii #17

Merged
merged 1 commit into from May 5, 2024

Conversation

GPrimola
Copy link
Contributor

@GPrimola GPrimola commented Sep 9, 2022

This PR adds the operation 0x0C to draw rounded rectangle with variable radius corners, using the already existing functionality on NanoVG.
This operation will be used on Scenic.Script.draw_rounded_rectangle as described by rounded rectangle canvas specs.

Result:
Screen Shot 2022-09-08 at 14 26 52

Left: green filled rectangle with corner radius: 25, 50, 75, 100
Right: empty rectangle with purple stroke with corner radius: 100, 75, 50, 25

@GPrimola GPrimola changed the title [discussion] Added the operation 0x0C to draw rounded rectangles with varying radii [proposal] Added the operation 0x0C to draw rounded rectangles with varying radii Sep 11, 2022
@GPrimola GPrimola changed the title [proposal] Added the operation 0x0C to draw rounded rectangles with varying radii [proposal] Add the operation 0x0C to draw rounded rectangles with varying radii Sep 11, 2022
@boydm
Copy link
Contributor

boydm commented Sep 12, 2022

I love how simple this looks.

Could you please add a comment here with the equivalent call/s in the Canvas API?

@boydm
Copy link
Contributor

boydm commented Sep 12, 2022

I'll look at merging this in after PR#18. I'll want to do some testing to make sure I can get the same output in the remote driver.

@boydm
Copy link
Contributor

boydm commented Sep 12, 2022

I'd like thoughts from others on if adding this to 0.11 is too big a change or if it should be the first new thing in 0.12.

I do want 0.12 to go out pretty quickly, so am leaning that way.

@GPrimola
Copy link
Contributor Author

@axelson
Copy link
Collaborator

axelson commented Sep 16, 2022

Sounds like a great candidate for 0.12 to me 👍

@GPrimola GPrimola changed the title [proposal] Add the operation 0x0C to draw rounded rectangles with varying radii Add the operation 0x0C to draw rounded rectangles with varying radii Aug 7, 2023
@GPrimola
Copy link
Contributor Author

@ringlej @crertel would you mind to take a look at this PR too?

Many thanks!

@crertel crertel changed the base branch from main to draw_rrectv May 5, 2024 04:50
@crertel
Copy link
Contributor

crertel commented May 5, 2024

Excited about this, may need to figure out how to make it work with Cairo too.

I'm going to go ahead and merge this into a new branch, draw_rrectv, so we can start getting it folded into Cairo after rebasing.

@crertel crertel merged commit 032337f into ScenicFramework:draw_rrectv May 5, 2024
1 check passed
@crertel crertel mentioned this pull request May 5, 2024
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.

None yet

4 participants