Recent

Author Topic: just question. are SVG icons supported for buttons etc?  (Read 6099 times)

mm7

  • Full Member
  • ***
  • Posts: 231
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
just question. are SVG icons supported for buttons etc?
« on: June 12, 2015, 08:16:49 pm »
I know that icons on controls are actually bitmaps.
Due to different screens resolutions regular icons can be invisible on Quad Def screens. Idea is to make icons in SVG format, application will detect screen's DPI and scale icons accordingly (with redrawing SVG).

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12770
  • FPC developer.
Re: just question. are SVG icons supported for buttons etc?
« Reply #1 on: June 12, 2015, 09:37:51 pm »
No. Note though that icons are often available in multiple resolutions/sizes.   I don't know if Lazarus supports it, but it is possible with gdi.


mm7

  • Full Member
  • ***
  • Posts: 231
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: just question. are SVG icons supported for buttons etc?
« Reply #2 on: June 12, 2015, 11:05:47 pm »
Thanks,
> icons are often available in multiple resolutions/sizes,
yes, if someone has created them. :)
In our app (FreeShip) only 16x16 icons were created times ago when screens were 640x480. :) Well... 800x600 or so. :)
Nowadays some CAD people uses QHD screens 3840x2160. And all other have at least HD 1920x1080.
That is why we want to review our approach to icons.
Instead of creation of several bitmap icon sets for different resolutions we are thinking to use one vector icon set and scale them as needed.
 

CM630

  • Hero Member
  • *****
  • Posts: 1675
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: just question. are SVG icons supported for buttons etc?
« Reply #3 on: June 12, 2015, 11:51:18 pm »
Last time I tried a package for SVG support in Lazarus, it was far from functional. IFAIR the author said he could not spend too much time for that. Of course, I hope he was wrong.
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: just question. are SVG icons supported for buttons etc?
« Reply #4 on: June 13, 2015, 12:26:01 am »
Last time I tried a package for SVG support in Lazarus, it was far from functional. IFAIR the author said he could not spend too much time for that. Of course, I hope he was wrong.

Las time I did something like that was with bgrabitmap. Converting svg code to canvas code you can have working scalable icons. BTW ask circular about the supported features.

CM630

  • Hero Member
  • *****
  • Posts: 1675
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: just question. are SVG icons supported for buttons etc?
« Reply #5 on: June 13, 2015, 12:28:40 am »
I had no idea that bgrabitmap supports SVG. It is nice to hear.
I cannot find info when fpvectorial was last updated.
« Last Edit: June 13, 2015, 12:33:28 am by CM630 »
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4709
  • I like bugs.
Re: just question. are SVG icons supported for buttons etc?
« Reply #6 on: June 13, 2015, 12:34:27 am »
Sandro Cumerlato (forum name kusana) has planned SVG support for Lazarus. AggPas is a potential library candidate because it already comes with Lazarus.
There is thread "SVG format for icons and other graphics" in Lazarus mailing list about the subject from May 7.
Please write there or directly to Sandro and ask if he wants to cooperate implementing it.
I am not sure if he reads this forum.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: just question. are SVG icons supported for buttons etc?
« Reply #7 on: June 13, 2015, 12:41:26 am »
Sandro Cumerlato (forum name kusana) has planned SVG support for Lazarus. AggPas is a potential library candidate because it already comes with Lazarus.
There is thread "SVG format for icons and other graphics" in Lazarus mailing list about the subject from May 7.
Please write there or directly to Sandro and ask if he wants to cooperate implementing it.
I am not sure if he reads this forum.
It will be nice that bgrabitmap get inside lazarus.
Now it has OpenGL and is easier to use than other libs.
Also it is usefull with the nogui target for those that does not use lcl.
It doesnt mean to come with bgracontrols, they are separarse packages.
I think bgra is more used than agg. Is more popular at least here in the forum.

mm7

  • Full Member
  • ***
  • Posts: 231
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: just question. are SVG icons supported for buttons etc?
« Reply #8 on: June 13, 2015, 07:56:34 pm »
Sandro Cumerlato (forum name kusana) has planned SVG support for Lazarus. AggPas is a potential library candidate because it already comes with Lazarus.
There is thread "SVG format for icons and other graphics" in Lazarus mailing list about the subject from May 7.
Please write there or directly to Sandro and ask if he wants to cooperate implementing it.
I am not sure if he reads this forum.
It will be nice that bgrabitmap get inside lazarus.
Now it has OpenGL and is easier to use than other libs.
Also it is usefull with the nogui target for those that does not use lcl.
It doesnt mean to come with bgracontrols, they are separarse packages.
I think bgra is more used than agg. Is more popular at least here in the forum.

Thanks Juha, I am looking into AggPas...

lainz

  • Hero Member
  • *****
  • Posts: 4742
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: just question. are SVG icons supported for buttons etc?
« Reply #9 on: June 13, 2015, 09:43:28 pm »
Sandro Cumerlato (forum name kusana) has planned SVG support for Lazarus. AggPas is a potential library candidate because it already comes with Lazarus.
There is thread "SVG format for icons and other graphics" in Lazarus mailing list about the subject from May 7.
Please write there or directly to Sandro and ask if he wants to cooperate implementing it.
I am not sure if he reads this forum.
It will be nice that bgrabitmap get inside lazarus.
Now it has OpenGL and is easier to use than other libs.
Also it is usefull with the nogui target for those that does not use lcl.
It doesnt mean to come with bgracontrols, they are separarse packages.
I think bgra is more used than agg. Is more popular at least here in the forum.

Thanks Juha, I am looking into AggPas...
LOL sorry for the offtopic.
Today discovered that also BGRASVG is available.

mm7

  • Full Member
  • ***
  • Posts: 231
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: just question. are SVG icons supported for buttons etc?
« Reply #10 on: June 14, 2015, 04:25:32 pm »
I am having issues with Agg SVG. It draws only first Path from SVG file. Other pathes are ignored.

May be BGRASVG will be more successful.

BGRASVG: has bugs. I.e. it does not understand Web colors like #FFFFFF;
I fixed this by removing trailing semicolon.
Also it looks like it does not close pathes. Images are spiky like porcupine.
Examples from http://www.w3.org/TR/SVG11/ are shown incorrectly.

Another thing that should show SVG - FPVectorial, also does not show them correctly. :(

probably, for now we have to generate PNGs from SVGs using some other util...
« Last Edit: June 14, 2015, 09:01:15 pm by mm7 »

 

TinyPortal © 2005-2018