Commit 3a3fe50c authored by Michael Hölzl's avatar Michael Hölzl
Browse files

[bugfix] quadratic_curve_to and bezier_curve_to have forgotten the last point

parent cd25d1a3
...@@ -70,11 +70,12 @@ impl PathBuilder { ...@@ -70,11 +70,12 @@ impl PathBuilder {
y += tt * argy2; y += tt * argy2;
t += 0.01; t += 0.01;
//self.points.push((x as f32, y as f32, PathPointType::Connect));
self.edges.push(Edge::new(tmp_point, Point::new(x,y))); self.edges.push(Edge::new(tmp_point, Point::new(x,y)));
tmp_point = Point::new(x,y); tmp_point = Point::new(x,y);
} }
self.edges.push(Edge::new(tmp_point, Point::new(argx2,argy2)));
self.last_point = Point::new(argx2,argy2); self.last_point = Point::new(argx2,argy2);
} }
...@@ -110,11 +111,11 @@ impl PathBuilder { ...@@ -110,11 +111,11 @@ impl PathBuilder {
y += ttt * argy3 as f32; y += ttt * argy3 as f32;
t += 0.01; t += 0.01;
//self.points.push((x as f32, y as f32, PathPointType::Connect));
self.edges.push(Edge::new(tmp_point, Point::new(x as f32,y as f32))); self.edges.push(Edge::new(tmp_point, Point::new(x as f32,y as f32)));
tmp_point = Point::new(x as f32,y as f32); tmp_point = Point::new(x as f32,y as f32);
} }
self.edges.push(Edge::new(tmp_point, Point::new(argx3,argy3)));
self.last_point = Point::new(argx3,argy3); self.last_point = Point::new(argx3,argy3);
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment