Skip to content
Permalink
Browse files

Consider empty gradients in `is_zero_size_gradient()`

  • Loading branch information
pylbrecht committed Dec 14, 2019
1 parent ada7986 commit 9a2370a3a8ff4db7b3baf725f83797904be16547
Showing with 4 additions and 2 deletions.
  1. +4 −2 components/canvas/raqote_backend.rs
@@ -251,9 +251,11 @@ impl canvas_data::Pattern<'_> {
Pattern::RadialGradient(pattern) => {
let centers_equal = pattern.center1 == pattern.center2;
let radii_equal = pattern.radius1 == pattern.radius2;
centers_equal && radii_equal
(centers_equal && radii_equal) || pattern.gradient.stops.is_empty()
},
Pattern::LinearGradient(pattern) => {
(pattern.start == pattern.end) || pattern.gradient.stops.is_empty()
},
Pattern::LinearGradient(pattern) => pattern.start == pattern.end,
Pattern::Color(..) | Pattern::Surface(..) => false,
},
}

0 comments on commit 9a2370a

Please sign in to comment.
You can’t perform that action at this time.