Modify

Opened 12 years ago

Closed 12 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 Changed 12 years ago by stoecker

SVGSalamander seems helpful for this task.

comment:2 in reply to:  1 Changed 12 years 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 Changed 12 years 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 12 years 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 12 years ago by bastiK

In [4256/josm]:

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

comment:6 Changed 12 years 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 12 years ago by bastiK

In [4271/josm]:

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

comment:8 Changed 12 years ago by bastiK

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.