Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement raqote backend for canvas 2D rendering #24048
Conversation
jrmuizel left a comment
components/canvas/raqote_backend.rs, line 190 at r3 (raw file):
This contains_point() implementation is wrong. contains_point() is supposed to return whether the point is inside the path and not whether any of the path ops use that particular point. |
jrmuizel left a comment
components/canvas/raqote_backend.rs, line 190 at r3 (raw file): Previously, jrmuizel (Jeff Muizelaar) wrote…
I'll add an implementation of contains_point() to raqote. |
jrmuizel
commented
Aug 27, 2019
•
|
Raqote now has a (possibly buggy) implementation of contains_point() jrmuizel/raqote@b1437ce |
Thanks for pointing that out, @jrmuizel! I have zero experience in implementing 2D graphics whatsoever. I hope this doesn't get in the way too much, while working on this issue. I really don't want to create more work than neccessary. |
jrmuizel
commented
Aug 27, 2019
Sure. I'd be happy to answer any questions. |
jrmuizel left a comment
|
Looks reasonable to me. |
| unimplemented!() | ||
| pub fn contains_point(&self, x: f64, y: f64, _path_transform: &Transform2D<f32>) -> bool { | ||
| let path = self.as_raqote(); | ||
| path.contains_point(0.1, path.winding, x as f32, y as f32) |
This comment has been minimized.
This comment has been minimized.
jrmuizel
Sep 1, 2019
The newest version of raqote drops the winding parameter from contains_point() (though you can just deal with that later)
|
@bors-servo r=jrmuizel |
|
|
Implement raqote backend for canvas 2D rendering <!-- Please describe your changes on the following line: --> This is a follow-up of #23936. --- <!-- 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 - [ ] These changes fix #23431 <!-- Either: --> <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24048) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
|
Implement raqote backend for canvas 2D rendering <!-- Please describe your changes on the following line: --> This is a follow-up of #23936. --- <!-- 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 - [ ] These changes fix #23431 <!-- Either: --> <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24048) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
|
Implement raqote backend for canvas 2D rendering <!-- Please describe your changes on the following line: --> This is a follow-up of #23936. --- <!-- 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 - [ ] These changes fix #23431 <!-- Either: --> <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24048) <!-- Reviewable:end -->
|
|
pylbrecht commentedAug 25, 2019
•
edited by SimonSapin
This is a follow-up of #23936.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is