-
-
Notifications
You must be signed in to change notification settings - Fork 791
Add drawing bitmap images to Canvas #4047
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
+336
−42
Merged
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
38b071c
Initial proof of concept of Canvas.draw_image()
corranwebster 0188b2f
Add test for draw image.
corranwebster c60617d
Add simple tests, iOS backend.
corranwebster d43dc36
Add to changelog.
corranwebster 7a708f8
Add dummy implementation.
corranwebster bae64af
Add core test for drawImage
corranwebster 85f7691
Work in progress.
corranwebster 1be95d1
Make draw in rect test more interesting - test transform of image.
corranwebster 9105840
Fix core tests.
corranwebster db97a47
Fix coverage.
corranwebster 97ba784
Add Qt implementation of draw_image().
corranwebster 6e575a7
Add support for Android (untested).
corranwebster 62f0ba5
Add winforms implementation.
corranwebster 4dbf19b
Fixes for Android and windows - see if they work.
corranwebster 600427f
Try some more fixes.
corranwebster 37812a4
Implement Gtk backend; various attempted fixes for other backends.
corranwebster 116e894
Fixes for Gtk, and Winforms, slight tweaking of docstrongs.
corranwebster 49b1a90
fix for Gtk: try creating the image surface directly from the pixbuf …
corranwebster cb76ac7
The get_pixels() method returns a Python buffer, so more likely to work.
corranwebster d8e3cff
Use get_rowstride().
corranwebster 66c9804
ImageSirface needs a writable buffer, so copy pixels into a bytearray.
corranwebster 3c7a7fe
Remove old code.
corranwebster 08f9d30
Need to convert BGR to RGB format in Gtk
corranwebster e4ceaeb
Fix typo.
corranwebster d19598f
Try a completely different approack for Gtk.
corranwebster 217fb9d
Try doing transformation before setting the source.
corranwebster ce9a7a7
Scaled by inverse of what we need.
corranwebster 7f77033
After transformation, we're essentially just drawing the image in its…
corranwebster 1db15db
Clean-up, update changelog.
corranwebster 93a843b
Update changes/995.feature.md
corranwebster e10ff4f
Make the image flip a little clearer in iOS and Cocoa backends.
corranwebster 23d1157
Fix test docstring
HalfWhitt 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 @@ | ||
| Add a draw_image() method to Canvas contexts using the API of the HTML Canvas draw_image() method. | ||
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
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.
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.