[librsvg: 5/22] gradient: really make resolve_from_defaults() immutable
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 5/22] gradient: really make resolve_from_defaults() immutable
- Date: Wed, 2 Oct 2019 21:44:03 +0000 (UTC)
commit 8b0d6f9db4adf28f7f204c5c3f38a28f1b88c1f4
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Oct 1 11:31:33 2019 -0500
gradient: really make resolve_from_defaults() immutable
rsvg_internals/src/gradient.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index a7d342a1..5bd501ec 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -257,7 +257,7 @@ impl UnresolvedVariant {
// https://www.w3.org/TR/SVG/pservers.html#LinearGradients
// https://www.w3.org/TR/SVG/pservers.html#RadialGradients
- fn resolve_from_defaults(self) -> UnresolvedVariant {
+ fn resolve_from_defaults(&self) -> UnresolvedVariant {
match self {
UnresolvedVariant::Linear { x1, y1, x2, y2 } => UnresolvedVariant::Linear {
x1: x1.or_else(|| Some(LengthHorizontal::parse_str("0%").unwrap())),
@@ -487,7 +487,7 @@ impl UnresolvedGradient {
UnresolvedGradient { units, affine, spread, stops, variant }
}
- fn resolve_from_defaults(self) -> UnresolvedGradient {
+ fn resolve_from_defaults(&self) -> UnresolvedGradient {
let units = self.units.or(Some(GradientUnits::default()));
let affine = self.affine.or(Some(cairo::Matrix::identity()));
let spread = self.spread.or(Some(SpreadMethod::default()));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]