diff options
author | pylbrecht <palbrecht@mailbox.org> | 2020-01-06 19:59:32 +0100 |
---|---|---|
committer | pylbrecht <palbrecht@mailbox.org> | 2020-01-07 07:24:18 +0100 |
commit | ce48a51e997a75be4533051e2bf544358be76486 (patch) | |
tree | 8fc6838c99ab2576706fd8182e931d14f7e1e870 /components/canvas/canvas_data.rs | |
parent | f691acd9582ffb0de292a2d8588d148c1a1ebca6 (diff) | |
download | servo-ce48a51e997a75be4533051e2bf544358be76486.tar.gz servo-ce48a51e997a75be4533051e2bf544358be76486.zip |
Ensure subpath for control point in quadratic_curve_to()
Diffstat (limited to 'components/canvas/canvas_data.rs')
-rw-r--r-- | components/canvas/canvas_data.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs index 2b993d62bab..7f7e539b102 100644 --- a/components/canvas/canvas_data.rs +++ b/components/canvas/canvas_data.rs @@ -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); } |