Skip to content

Commit 8873756

Browse files
committed
Add support for SVG images
SWT currently loads icons exclusively as raster graphics (e.g., PNGs) without support for vector formats like SVG (except for Linux). A major drawback of raster graphics is their inability to scale without degrading image quality. Additionally, generating icons of different sizes requires manually rasterization of SVGs as a preparatory step, leading to unnecessary effort and many icon files. This change introduces support for vector graphics in images, enabling SVGs to be used for images. An SVG rasterizer can be provided via an SWT fragment. This change adds an according fragment based on the JSVG library. An according FileFormat implementation is added, which utilized a present SVG rasterization fragment to rasterize images for the desired zoom factor. Fixes eclipse-platform#1438
1 parent 22e8829 commit 8873756

File tree

1 file changed

+4
-0
lines changed
  • tests/org.eclipse.swt.tests/META-INF

1 file changed

+4
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# pull in the applicable implementation fragment at build time (bug 461427)
2+
requires.0.namespace = org.eclipse.equinox.p2.iu
3+
requires.0.name = org.eclipse.swt.svg
4+
requires.0.range = 0.0.0

0 commit comments

Comments
 (0)