Skip to content

Commit

Permalink
Special-case no-strokes
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jan 2, 2025
1 parent 6a5e5ef commit 19ba9a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/epaint/src/tessellator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ impl Tessellator {
// we can round the rectangle sides to the physical pixel edges,
// and the filled rect will appear crisp, as will the inside of the stroke.
let Stroke { width, .. } = stroke; // Make sure we remember to update this if we change `stroke` to `PathStroke`
if width <= self.feathering {
if width <= self.feathering && !stroke.is_empty() {
// If the stroke is thin, make sure its center is in the center of the pixel:
rect = rect
.expand(width / 2.0)
Expand Down

0 comments on commit 19ba9a2

Please sign in to comment.