Skip to content

Commit

Permalink
Auto merge of #25445 - pylbrecht:ensure.path.quad, r=jdm
Browse files Browse the repository at this point in the history
Ensure subpath for control point of CanvasRenderingContext2D.quadraticCurveTo()

<!-- Please describe your changes on the following line: -->
These changes are based on #25444.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix part of #25331

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
  • Loading branch information
bors-servo committed Jan 8, 2020
2 parents 1e7c206 + ce48a51 commit b876168
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
3 changes: 3 additions & 0 deletions components/canvas/canvas_data.rs
Expand Up @@ -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);
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b876168

Please sign in to comment.