-
-
Notifications
You must be signed in to change notification settings - Fork 798
Confirm / Fix miter joins in Canvas #4162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8f9fb05
Set miter join and add test
HalfWhitt f7c029f
Add change note
HalfWhitt c5d2dfa
Alter test & image, set Android miter
HalfWhitt 2f5e4ce
Forgot to also fix Qt
HalfWhitt e159a0e
Recalibrate Qt, alter test - push to get images
HalfWhitt 61c4752
Add images and second change note
HalfWhitt 716c4b1
Add platform overrides to probes
HalfWhitt c6b7453
Add docs note about canvas consistency.
freakboy3742 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| The Qt backend's Canvas implementation now correctly miters its line joins. |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think should be 5 (actually probably
sqrt(24)) given how it is measured differently?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, I pushed this before reading that.
Took me a sec to figure out where you got sqrt(24) from, but thank you, that makes sense. (For some reason I had it in my head that the difference would depend on the angle, but right, we're picking the specific angle for the cutoff.)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial intuition was partly correct. That starts truncating at the same angle that HTML stops mitering, which I guess it as good as we can do.
I wish we could make it consitently stop drawing at the same distance that's the bevel cutoff for the HTML spec. But we can't (for all but one angle), because a fixed distance where Qt measures it (along the stroke edge) doesn't stay consistent with where the miter limit should be when measured up from the inside corner:
(The green measurement on the upper right is the Qt limit drawn at sqrt(24), and the bit that's sliding up and down is where the HTML spec puts the miter limit at each angle.)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, wait, I just noticed where this comment is. Android does things properly, it just has a different default value. It's Qt that's the especially weird one.