forked from iced-rs/iced
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: quad rendering including border only inside of the bounds
- Loading branch information
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I believe it is incorrect to divide with 2 here. The image on the left: correct calculation (screenshot actually is wgpu, but removing the
/ 2.0
is the same) and on the right: the way it is currently.This effect is barely noticeable when the border width is small, but turn it up and you will see the issue clearly. There is still an issue when
2*border_width > border_radius
, but that is arguably more of an edge case.