-
Notifications
You must be signed in to change notification settings - Fork 189
Delegating Image(Display, String) to ImageFileNameProvider to init Image #2924
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
base: master
Are you sure you want to change the base?
Conversation
Thank you @fedejeanne for testing on Mac. I will be using your screenshot for my PR description. |
f564e5f to
b6a3721
Compare
b6a3721 to
d73ad68
Compare
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
Outdated
Show resolved
Hide resolved
|
I tested my original Snippet on Mac and the quality is as good as
|
d73ad68 to
0a7d45c
Compare
In GTK and Cocoa, an image based on an SVG passed as filename to Image(Device, String) will be drawn now sharply with this change.
0a7d45c to
a99e984
Compare
HeikoKlare
left a comment
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.
This PR currently seems to lack a reference to the original issue (#2917). Would be nice to have it referenced in the commit and PR message.
I think it would also be great to add that snippet or a comparable one to the SWT snippets (may be done in a separate PR). If I am not mistaken, we have no snippet for testing SVG behavior yet, which is also why the snippets do not contain any SVG test image, so everytime you want to try something you have to copy one over. @Phillipus as you provided an extended version of the snippet in the reported issue, maybe you want to contribute it to the snippets project?
|



In GTK and Cocoa, an image based on an SVG passed as filename to Image(Device, String) will be drawn now sharply with this change.
How to Test
Run this Snippet on Windows, Mac and Linux and compare the results:
Use this SVG image for the Snippet:
Here's the outputs...
On Windows all Image methods result in sharp output:
On Mac only using ImageFileNameProvider is sharp:
On Linux only using ImageFileNameProvider is sharp:
After Fix
Image use for testing:

GTK:
Cocoa: