mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Add first control point if there's no subpath
This commit is contained in:
parent
08461db4da
commit
ca1e780c59
4 changed files with 5 additions and 14 deletions
|
@ -771,8 +771,8 @@ impl<'a> CanvasData<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn quadratic_curve_to(&mut self, cp: &Point2D<f32>, endpoint: &Point2D<f32>) {
|
pub fn quadratic_curve_to(&mut self, cp: &Point2D<f32>, endpoint: &Point2D<f32>) {
|
||||||
if self.path_builder().current_point().is_none() {
|
if self.path_state.is_none() {
|
||||||
self.path_builder().move_to(cp);
|
self.move_to(cp);
|
||||||
}
|
}
|
||||||
self.path_builder().quadratic_curve_to(cp, endpoint);
|
self.path_builder().quadratic_curve_to(cp, endpoint);
|
||||||
}
|
}
|
||||||
|
@ -783,6 +783,9 @@ impl<'a> CanvasData<'a> {
|
||||||
cp2: &Point2D<f32>,
|
cp2: &Point2D<f32>,
|
||||||
endpoint: &Point2D<f32>,
|
endpoint: &Point2D<f32>,
|
||||||
) {
|
) {
|
||||||
|
if self.path_state.is_none() {
|
||||||
|
self.move_to(cp1);
|
||||||
|
}
|
||||||
self.path_builder().bezier_curve_to(cp1, cp2, endpoint);
|
self.path_builder().bezier_curve_to(cp1, cp2, endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[2d.path.bezierCurveTo.ensuresubpath.2.html]
|
|
||||||
[If there is no subpath, the first control point is added]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[2d.path.bezierCurveTo.ensuresubpath.2.html]
|
|
||||||
[If there is no subpath, the first control point is added]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[2d.path.bezierCurveTo.ensuresubpath.2.worker.html]
|
|
||||||
[If there is no subpath, the first control point is added]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue