Modify

Opened 13 years ago

Closed 13 years ago

#6560 closed enhancement (fixed)

SVG support in preset icons and MapCSS

Reported by: skippern@… Owned by: team
Priority: normal Milestone:
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 by stoecker, 13 years ago

SVGSalamander seems helpful for this task.

in reply to:  1 comment:2 by bastiK, 13 years ago

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 by stoecker, 13 years ago

Can we add the Java files? This would mean make process would include only really required files. Maybe that drops space again.

in reply to:  3 comment:4 by bastiK, 13 years ago

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 by bastiK, 13 years ago

In [4256/josm]:

see #6560 - basic svg support, includes kitfox svgsalamander, r 98, patched

comment:6 by bastiK, 13 years ago

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 by bastiK, 13 years ago

In [4271/josm]:

extend image caching and add support for scaled svg images (see #6560)

comment:8 by bastiK, 13 years ago

Resolution: fixed
Status: newclosed

In [4272/josm]:

mapcss: proper support for scaled icons (fixes #6560)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.