Opened 23 months ago
Closed 22 months ago
#6560 closed enhancement (fixed)
SVG support in preset icons and MapCSS
| Reported by: | skippern@… | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Component: | Core |
| Version: | tested | Keywords: | |
| Cc: |
Description
It is desirable if support for SVG icons could be added into both the presets, and to the MapCSS renderer. I am writing my own presets and mapcss but have to convert all the icons to png bitmaps, instead of using the scalable power of SVG, I have several of the desired icons in SVG, and have to convert them to png of various resolutions to get a good rendering.
Attachments (0)
Change History (8)
comment:1 follow-up: ↓ 2 Changed 23 months ago by stoecker
comment:2 in reply to: ↑ 1 Changed 23 months ago by bastiK
Replying to stoecker:
SVGSalamander seems helpful for this task.
svnSalamander-tiny.jar is 288kB; removing the Animation and unnecessary GUI classes, I end up with 185kB. Do you think it is worth to add this lib to JOSM core? I'd vote yes.
comment:3 follow-up: ↓ 4 Changed 23 months ago by stoecker
Can we add the Java files? This would mean make process would include only really required files. Maybe that drops space again.
comment:4 in reply to: ↑ 3 Changed 23 months ago by bastiK
Replying to stoecker:
Can we add the Java files? This would mean make process would include only really required files. Maybe that drops space again.
Removing the animation classes requires a bit of patching, so we probably have to keep the sources somewhere anyway. But I think 185kB (compressed) is the absolute minimum.
comment:5 Changed 23 months ago by bastiK
In [4256/josm]:
comment:6 Changed 23 months ago by bastiK
At the moment, SVGs are rendered to a raster image at their normal size.
TODO:
- api to get a scaled version of the SVG
- render it directly on the Graphics2D of the map canvas (?)
comment:7 Changed 22 months ago by bastiK
In [4271/josm]:
comment:8 Changed 22 months ago by bastiK
- Resolution set to fixed
- Status changed from new to closed
In [4272/josm]:



SVGSalamander seems helpful for this task.