Glitches with rounded rectangles
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
I'm getting drawing glitches when drawing very large rounded rectangles, possibly caused by overflow somewhere. I'm not sure whether it's reasonable to expect such large rectangles to work at all, but given that widget layout happily works with infinite bounds, I think it isn't completely unreasonable. This is with gtk on linux.
Here is my attempt to draw a rounded rectangle with infinite width:

Here is my attempt to draw a rounded rectangle with width 1e7:

And now with width 1e6, it works:

Sample code is [here](https://gist.github.com/jneem/4fa5d0bc3d9bca4d79961b56b4cc29fd), and you can change the width on line 13 of main.rs. The clipping on line 37 actually makes no difference.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Rust sample in main.rs, changing the width on line 13 and comparing the 1e6, 1e7, and infinite cases. Check the drawing path and the clipping call on line 37 while reproducing the GTK-on-Linux glitches. Done means the cause is identified and large rounded rectangles render without the reported artifacts, or the supported bounds are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100