[librsvg: 14/15] The draw_ctx does not need to be mutable in make_shape()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 14/15] The draw_ctx does not need to be mutable in make_shape()
- Date: Tue, 1 Dec 2020 22:17:53 +0000 (UTC)
commit 2a38a775dfd5737f975734c1d4f931959b87b9c1
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Dec 1 16:01:01 2020 -0600
The draw_ctx does not need to be mutable in make_shape()
src/shapes.rs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/shapes.rs b/src/shapes.rs
index 5b6736ab..69b5f762 100644
--- a/src/shapes.rs
+++ b/src/shapes.rs
@@ -37,7 +37,7 @@ impl Shape {
}
trait BasicShape {
- fn make_shape(&self, values: &ComputedValues, draw_ctx: &mut DrawingCtx) -> Shape;
+ fn make_shape(&self, values: &ComputedValues, draw_ctx: &DrawingCtx) -> Shape;
}
macro_rules! impl_draw {
@@ -142,7 +142,7 @@ impl SetAttributes for Path {
}
impl BasicShape for Path {
- fn make_shape(&self, _values: &ComputedValues, _draw_ctx: &mut DrawingCtx) -> Shape {
+ fn make_shape(&self, _values: &ComputedValues, _draw_ctx: &DrawingCtx) -> Shape {
Shape::new(self.path.clone(), Markers::Yes)
}
}
@@ -223,7 +223,7 @@ impl SetAttributes for Polygon {
}
impl BasicShape for Polygon {
- fn make_shape(&self, _values: &ComputedValues, _draw_ctx: &mut DrawingCtx) -> Shape {
+ fn make_shape(&self, _values: &ComputedValues, _draw_ctx: &DrawingCtx) -> Shape {
Shape::new(Rc::new(make_poly(&self.points, true)), Markers::Yes)
}
}
@@ -248,7 +248,7 @@ impl SetAttributes for Polyline {
}
impl BasicShape for Polyline {
- fn make_shape(&self, _values: &ComputedValues, _draw_ctx: &mut DrawingCtx) -> Shape {
+ fn make_shape(&self, _values: &ComputedValues, _draw_ctx: &DrawingCtx) -> Shape {
Shape::new(Rc::new(make_poly(&self.points, false)), Markers::Yes)
}
}
@@ -280,7 +280,7 @@ impl SetAttributes for Line {
}
impl BasicShape for Line {
- fn make_shape(&self, values: &ComputedValues, draw_ctx: &mut DrawingCtx) -> Shape {
+ fn make_shape(&self, values: &ComputedValues, draw_ctx: &DrawingCtx) -> Shape {
let mut builder = PathBuilder::default();
let params = draw_ctx.get_view_params();
@@ -344,7 +344,7 @@ impl SetAttributes for Rect {
}
impl BasicShape for Rect {
- fn make_shape(&self, values: &ComputedValues, draw_ctx: &mut DrawingCtx) -> Shape {
+ fn make_shape(&self, values: &ComputedValues, draw_ctx: &DrawingCtx) -> Shape {
let params = draw_ctx.get_view_params();
let x = self.x.normalize(values, ¶ms);
@@ -543,7 +543,7 @@ impl SetAttributes for Circle {
}
impl BasicShape for Circle {
- fn make_shape(&self, values: &ComputedValues, draw_ctx: &mut DrawingCtx) -> Shape {
+ fn make_shape(&self, values: &ComputedValues, draw_ctx: &DrawingCtx) -> Shape {
let params = draw_ctx.get_view_params();
let cx = self.cx.normalize(values, ¶ms);
@@ -587,7 +587,7 @@ impl SetAttributes for Ellipse {
}
impl BasicShape for Ellipse {
- fn make_shape(&self, values: &ComputedValues, draw_ctx: &mut DrawingCtx) -> Shape {
+ fn make_shape(&self, values: &ComputedValues, draw_ctx: &DrawingCtx) -> Shape {
let params = draw_ctx.get_view_params();
let cx = self.cx.normalize(values, ¶ms);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]