SVG - The fantastic format

Post your Gambas programming questions here.
Post Reply
User avatar
tincho
Posts: 57
Joined: Wednesday 10th July 2019 1:12pm

SVG - The fantastic format

Post by tincho »

Hi, there are some (see below) post about using SVG instead PNG or other image format.
I fully agree that it is OK to use SVG because, as seen in the other posts, it is more versatile and the image quality is superior.
I would like to comment on other aspects, to broaden the horizons of this format. On the one hand the possibility of using it as a template and the other to change the colors at will, because SVG is an XML that is text, so you can do a lot of things before "converting" it to pixels.
References:
https://forum.gambas.one/viewtopic.php?f=4&t=1106
https://forum.gambas.one/viewtopic.php? ... 1&start=10
Sample
If you look at tradukisto there I use SVG for the icons and the reason is that on the one hand it is possible to easily modify the geometry of the graphic and on the other hand it is possible to change the color, which I do when I switch from a light to a dark theme (I just find and replace text).
But there are other method more interesting using XML parser and TAGS, here the code:
Image
Attachments
svg-sample-0.0.1.tar.gz
(13.35 KiB) Downloaded 284 times
Post Reply