-
-
Notifications
You must be signed in to change notification settings - Fork 798
Remove State.canvas backreference, combine drawing actions, move drawing methods
#4159
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 21 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
fbc73d5
Remove backreference, combine drawing actions, move methods
HalfWhitt 3b5ef7f
Add change note
HalfWhitt 45eecae
Fix coverage for 3.14
HalfWhitt 592fbde
Switch to WeakSet
HalfWhitt 502b41f
Switch to platform-specific images
HalfWhitt 743ad6c
Merge branch 'main' into canvas-switcheroo
HalfWhitt defc23a
Correct platform-specific image name
HalfWhitt 4b64f14
Update new tests
HalfWhitt ab679ef
Merge branch 'main' into canvas-switcheroo
HalfWhitt 2fc60da
Update new test
HalfWhitt 29b26fb
Add Android reference image
HalfWhitt b84617e
Update Qt image
HalfWhitt 241a6cd
Use resized version:
HalfWhitt 37869c9
Cleanups & fixes
HalfWhitt 0029a84
Fix link
HalfWhitt 2b5a10f
Wording fix
HalfWhitt afb54b2
Add more explanation of State
HalfWhitt bb6b359
Simplify active state lookup
HalfWhitt ac3bca8
Raise exception when states are re-entered
HalfWhitt ec73572
Close context manages when adding an action.
HalfWhitt 55e4680
Add _can_be_entered attribute
HalfWhitt 127f155
More comprehensive contains testing
HalfWhitt ac3a0e9
Deprecate x and y in context managers
HalfWhitt 1b47c46
Actually suppress warnings
HalfWhitt 73a1baa
Merge branch 'main' into canvas-switcheroo
HalfWhitt 6a16ded
Update pre-commit hook
HalfWhitt 860881a
Accommodate Togat Chart ClosedPath usage
HalfWhitt 51098e2
Fix tutorials, drawing_objects references, and changenote clarification
HalfWhitt 44f02f1
Mark static web tests as flaky...
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,6 @@ | ||
| There are a number of changes to the Canvas widget's drawing API: | ||
| - Drawing methods can now be called directly on a Canvas. Calling them on States is now deprecated. | ||
| - The CamelCase context-manager drawing methods (`ClosedPath`, `Fill`, and `Stroke`) are deprecated; they are now unified with their standalone counterparts (`close_path`, `fill`, and `stroke`, respectively). For example, the `fill` method (lowercase) can be used as a normal method or as `with canvas.fill():`. | ||
| - List-like methods on States are deprecated; manipulate their `State.drawing_actions` lists directly. | ||
| - `State.redraw()` is deprecated; call `Canvas.redraw()` instead. | ||
| - States no longer hold a reference to their Canvas; the `State.canvas` attribute is deprecated. (This is largely an internal detail, and unlikely to affect user code.) |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.