Ensure subpath for control point in quadratic_curve_to()

This commit is contained in:
pylbrecht 2020-01-06 19:59:32 +01:00
parent f691acd958
commit ce48a51e99
4 changed files with 3 additions and 12 deletions

View file

@ -771,6 +771,9 @@ impl<'a> CanvasData<'a> {
}
pub fn quadratic_curve_to(&mut self, cp: &Point2D<f32>, endpoint: &Point2D<f32>) {
if self.path_builder().current_point().is_none() {
self.path_builder().move_to(cp);
}
self.path_builder().quadratic_curve_to(cp, endpoint);
}

View file

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

View file

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

View file

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