Ensure there's a subpath for the first control point

This commit is contained in:
pylbrecht 2020-01-06 17:42:35 +01:00
parent 0d142bea9a
commit f691acd958
3 changed files with 4 additions and 9 deletions

View file

@ -798,7 +798,10 @@ impl<'a> CanvasData<'a> {
pub fn arc_to(&mut self, cp1: &Point2D<f32>, cp2: &Point2D<f32>, radius: f32) {
let cp0 = match self.path_builder().current_point() {
Some(p) => p,
None => return,
None => {
self.path_builder().move_to(cp1);
cp1.clone()
},
};
let cp1 = *cp1;
let cp2 = *cp2;

View file

@ -1,4 +0,0 @@
[2d.path.arcTo.ensuresubpath.2.html]
[If there is no subpath, the first control point is added]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.path.arcTo.ensuresubpath.2.html]
[If there is no subpath, the first control point is added]
expected: FAIL