Support "blurred rounded rect"s with non-uniform corner radii
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
Vello [currently supports](https://docs.rs/vello/latest/vello/struct.Scene.html#method.draw_blurred_rounded_rect) "blurred rounded rectangles" (aka drop shadows) with a single corner radius for the entire rectangle. However, CSS [specifies](https://drafts.csswg.org/css-backgrounds/#border-radius) the border-radius property with 8 distinct radii (separate x-axis and y-axis radii for each of the 4 corners). If we wish to fully support rendering CSS `box-shadow`s with Vello then we will need a version of `blurred_rounded_rect` that supports 8 radii.
The CSS spec is also adding the [`corner-shape`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/corner-shape) property which further generalizes the corners to be super-ellipse rather than merely a regular ellipse.
An illustration of the problem with the current solution is below. Here the border (yellow/red/green/black) and outline (blue) are being rendered with the correct geometry, but the box shadow (grey) is being rendered with a single corner radius and thus doesn't match the shape of other parts of the node.
Contributor guide
No contributing guide indexed for this repository
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 Vello's Scene::draw_blurred_rounded_rect entry point and compare its current single-radius behavior with the CSS border-radius specification linked in the issue. Determine the API and geometry needed for eight independent radii, and clarify whether corner-shape support is in scope. Done means blurred rounded rectangles match the non-uniform corner geometry described by the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100