SVG Support

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SVG Support

Felix Natter
Administrator
hello Devs,

since there was not much opinion here:
  https://sourceforge.net/p/freeplane/discussion/758437/thread/ff3f2718/
I will choose the SVG feature.

Concerning the library: I don't think we can use batik since
we want to include SVG support in the applet, and SVG Salamander is
smaller (and probably faster). We'll see whether it is fast enough
on some older machines

https://svgsalamander.java.net/

"SVG Salamander is an SVG engine for Java that's designed to be small,
fast, and allow programmers to use it with a minimum of fuss. It's in
particular targeted for making it easy to integrate SVG into Java games
and making it much easier for artists to design 2D game content - from
rich interactive menus to charts and graphcs to complex animations."

Maybe we want to make SVG icons optional (i.e. fall back to PNGs) so
that PNG icons can be used on older machines?

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG Support

Felix Natter
Administrator
BTW: svg-salamander is actively maintained:
http://search.maven.org/#search|ga|1|a%3A%22svg-salamander%22
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG Support

Felix Natter
Administrator
In reply to this post by Felix Natter
hi,

I have completed the SVG (stock|user) icon support using svgSalamander [1].
It can be found in the svgex branch:
https://github.com/freeplane/freeplane/tree/svgex

If anyone wants to check it out, go ahead (code review is welcome, too!)

- download any svg from internet
- put it in <fpuserdir>/resources/images/icons
- name it as <existingIconName>.svg, i.e. help.svg, button_ok.svg, button_cancel.svg

@Volker: Is there any progress getting the SVGs sources from Predrag?

Cheers and Best Regards,
Felix


[1] https://github.com/blackears/svgSalamander
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG Support

Dimitry Polivaev
Administrator
Hi Felix,

the next steps could be IMHO

1. icon size for SVG icons should be expressed in points. The factor between pixels and points is
available as UITools.FONT_SCALE_FACTOR

2. (SVG) icon sizes should be made configurable. I am currently not sure if icon size should be
configured for each occurrence of icon in a node or as node property so that all icons at node have
the same size. In the last case icon size could be also defined by style. Therefore I would rather
suggest this.

Regards,
Dimitry


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG Support

Felix Natter
Administrator
"Dimitry Polivaev [via Freeplane Developer]"
<[hidden email]> writes:

> Hi Felix,

hello Dimitry,

> the next steps could be IMHO
>
> 1. icon size for SVG icons should be expressed in points. The factor
> between pixels and points is
> available as UITools.FONT_SCALE_FACTOR
>
> 2. (SVG) icon sizes should be made configurable. I am currently not sure if
> icon size should be
> configured for each occurrence of icon in a node or as node property so
> that all icons at node have
> the same size. In the last case icon size could be also defined by style.
> Therefore I would rather
> suggest this.

I also think that the second option is better - you don't want to mix
smaller and larger icons in a single node.

So you're suggesting to add "Icon size" to the properties panel
(could be applied to PNG icons as well, it will just look ugly)?

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SVG Support

Dimitry Polivaev
Administrator
> So you're suggesting to add "Icon size" to the properties panel
> (could be applied to PNG icons as well, it will just look ugly)?


First I want that it works only with SVG icons.
After that we could add support for PNG icons also, but in this case we need them in high resolution
(256px or even 512px).

Regards,
Dimitry

Loading...