Support arc_to on Canvas#4158
Draft
corranwebster wants to merge 14 commits intobeeware:mainfrom
Draft
Conversation
arc_to and round_rect on Canvasarc_to on Canvas
19 tasks
Contributor
Author
|
Deferring this until #4163 is completed, as I think that will make the implementation on Windows and Android much easier. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HTML Canvas has two path operations which are currently not supported by the
Canvaswidget:arcTo()androundRect(). This PR implementsarc_to()in a manner compatible with the HTML Canvas. This was originally going to include support forround_rect()as well, because I thought it would needarc_to()but it turned out not to, so I've split that into a separate PR for ease of review.Issues:
arc_to()needs to know the current point in the path, which Android Graphics doesn't expose cleanly. We can track it manually, but that will need to Fix mid-path transforms #4106 to be merged before it could be done properly.arc_to()on winforms is drawing an extra line (or an extra-long line) in the test, and I can't work out what's going on. My suspicion is that it is to do with the non-standard way winforms handles paths, but I don't know where it's going wrong. Concretely, it seems to be drawing the connecting line to the first curve from (115, 10) to (80, 10) instead of (90, 10). Otherwise all is correct. This could be an existing issue with the way it draws Bézier curves or lines.Ref #3994
To Do:
arc_toPR Checklist: