-
Notifications
You must be signed in to change notification settings - Fork 196
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
Feature Proposal: Rasterization of SVGs at Runtime for Eclipse Icons #2593
base: master
Are you sure you want to change the base?
Conversation
I just pushed the changes I made for/in our yesterdays 1:1 meeting, mainly adapt to the change that |
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/URLImageDescriptor.java
Outdated
Show resolved
Hide resolved
I removed the added SVGs from this PR. Please see the new PR for the SVGs if you want to test this feature. In the meantime I locally changed all PNGs I could find in Platform UI, Platform, JDT UI and SWT for testing the Performance. I had no problems whatsoever when starting Eclipse and it was also quite easy and fast to add the SVGs and change the paths. I did not delete any PNGs in this process but changed ".png" to ".svg" in most places. I will report the performance data soon. |
6084260
to
ced1410
Compare
ced1410
to
27e477f
Compare
bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchImages.java
Outdated
Show resolved
Hide resolved
27e477f
to
4761d73
Compare
Feature Proposal: Rasterization of SVGs at Runtime for Eclipse Icons Fixes eclipse-platform#1438 Eclipse currently loads icons exclusively as raster graphics (e.g., `.png`), without support for vector formats like `.svg`. A major drawback of raster graphics is their inability to scale without degrading image quality. Additionally, generating icons of different sizes requires manually rasterizing SVGs outside Eclipse, leading to unnecessary effort and many icon files. This PR introduces support for vector graphics in Eclipse, enabling SVGs to be used for icons. Existing PNG icons will continue to be loaded alongside SVGs, allowing the use of the new functionality without the need to replace all PNG files at once. --- - **How It Works**: - To use SVG icons, simply place the SVG file in the bundle and reference it in the `plugin.xml` and other necessary locations, as is done for PNGs. No additional configuration is required. - At runtime, Eclipse uses the library JSVG to rasterize the SVG into a raster image of the desired size, eliminating the need for scaling. My analysis shows that JSVG is the most suitable Java library for this purpose. - You need to write the flag `-Dswt.autoScale=quarter` into your `eclipse.ini` file or into the run arguments of a new configuration.
9141d4e
to
9d1a0f1
Compare
See the following PR in Eclipse SWT for a detailed description of the changes.
Fixes eclipse-platform/eclipse.platform.swt#1438.