<div dir="ltr">Hi Michael!<br><br>The native SVG support will be officially released together with FPC 3.4.0? </div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Em dom., 20 de set. de 2026 às 17:58, Michael Van Canneyt via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi,<br>
<br>
FPC for a long time had support for raster images in fcl-image.<br>
It now has support for what is probably the most used vector image today: SVG.<br>
<br>
Support is broad:<br>
<br>
- All drawing primitives.<br>
- Full font support (using platform native font support, freetype as fallback).<br>
- CSS support (using fcl-css)<br>
- Animation support (SMIL)<br>
- Filters<br>
- paint servers (patterns)<br>
<br>
What is not supported:<br>
- Javascript<br>
- The DOM<br>
- Color profiles (still planned)<br>
Which is logical, since we're not in the browser.<br>
<br>
The code renders a SVG file to a fcl-image supported format. <br>
For animated SVGs, the code can render a single frame at any given timestamp, <br>
or create a series of image frames in a GIF.<br>
<br>
The results have been carefully tuned and compared with the W3C SVG reference<br>
set of images, and conformance to the standard is very good: <br>
mean/median difference <3%, barely visible with the naked eye.<br>
<br>
An example of what can be done is viewable in<br>
<br>
<a href="https://www.freepascal.org/~michael/svg/" rel="noreferrer" target="_blank">https://www.freepascal.org/~michael/svg/</a><br>
<br>
As part of the work, the existing GIF reader was extended and a GIF writer<br>
was created - making the animation in the above page possible.<br>
<br>
The code is compilable with FPC 3.2.2, I'll upload the code to a separate<br>
repo for those that want to use it with FPC 3.2.2 <br>
(it then needs trunk's fcl-css and image support included)<br>
<br>
Still to do:<br>
- Color profiles<br>
- Generate a PDF image from the SVG.<br>
- Lazarus component(s).<br>
<br>
Enjoy!<br>
<br>
Michael.<br>
-- <br>
_______________________________________________<br>
lazarus mailing list<br>
<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a><br>
<a href="https://lists.lazarus-ide.org/listinfo/lazarus" rel="noreferrer" target="_blank">https://lists.lazarus-ide.org/listinfo/lazarus</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">The best regards,<br><br>Fabio Luis Girardi<br>PascalSCADA Project<br><a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/projects/pascalscada</a><br><a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a></div>