Skip to content
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

Introduce SVG rasterizer logic #1

Closed
wants to merge 1 commit into from
Closed

Conversation

Michael5601
Copy link
Owner

No description provided.

Copy link

github-actions bot commented Dec 3, 2024

Test Results

   483 files  ±0     483 suites  ±0   10m 51s ⏱️ + 2m 1s
 4 095 tests ±0   3 895 ✅  - 190   7 💤 ±0  6 ❌ +3  187 🔥 +187 
16 173 runs  ±0  15 890 ✅  - 190  90 💤 ±0  6 ❌ +3  187 🔥 +187 

For more details on these failures and errors, see this check.

Results for commit e40e2a8. ± Comparison against base commit 2ce8542.

♻️ This comment has been updated with latest results.

@Michael5601 Michael5601 force-pushed the IconScalingBackup branch 10 times, most recently from 1ab97f4 to 1efaf36 Compare December 3, 2024 16:24
@Michael5601 Michael5601 force-pushed the IconScalingBackup branch 7 times, most recently from 10b80f3 to 3612a63 Compare December 10, 2024 09:00
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants