-
Couldn't load subscription status.
- Fork 185
[GTK] Support loading and drawing images at desired size #2622
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
[GTK] Support loading and drawing images at desired size #2622
Conversation
Test Results 118 files ±0 118 suites ±0 16m 8s ⏱️ + 1m 12s Results for commit 583bf9b. ± Comparison against base commit a6cdf00. This pull request removes 1 test.♻️ This comment has been updated with latest results. |
fe6a332 to
aac5085
Compare
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.
The change seems to work fine and in general also the implementation looks fine. I have one question regarding the zoom changes performed on the involved images.
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
Outdated
Show resolved
Hide resolved
aac5085 to
5eb8858
Compare
|
GTK already has |
I guess you refer to |
5eb8858 to
cb93be5
Compare
cb93be5 to
0e7762e
Compare
This change introduces support for loading and drawing images at custom sizes in the GTK versions of GC and Image. The GC#drawImage() method, which only accepts the destination position and size, now attempts to load image at the destination size in case if it is provided by ImageFilenameProvider returning svgs or if the image is created with a imageDataAtSizeProvider.
0e7762e to
583bf9b
Compare
|
I have tested this PR using Snippet 2 from #2526 . |
Seems like the snippet is incorrect. It's the same on Windows: every image looks the same. I always used Snippet 1 from that PR for testing. With that snippet, I see the expected results also on GTK with this PR. |
|
Snippet2 is broken as it was initially intended to support the case for drawing the images cropped also in that PR but later we decided to leave drawing the cropped images for later. I have updated the snippet to only draw the full image now. |
This change introduces support for loading and drawing images at custom sizes in the GTK versions of GC and Image. The GC#drawImage() method, which only accepts the destination position and size, now attempts to load image at the destination size in case if it is provided by ImageFilenameProvider returning svgs or if the image is created with a imageDataAtSizeProvider.
Changes can be tested with snippets in #2526 for svgs and the tests with image dataAtSize provider which are enabled for linux along with this PR