Using SVG module from Skia

Tomaž Vajngerl quikee at gmail.com
Fri Apr 28 07:47:32 UTC 2023


Hi Hossein,

On Tue, Apr 25, 2023 at 9:59 PM Hossein Nourikhah <hossein at libreoffice.org>
wrote:

> Hello,
>
> I have studied some of the bugs from the svgio module of LibreOffice. As
> described in the svgio/README.md, "svgio module uses sax for reading xml
> and turns it into drawinglayer primitives. The rendering is done via
> drawinglayer primitives".


As you say - SVG is turned into drawinglayer primitives, so we keep the SVG
in a vector graphic form and can - if needed - transform that into another
vector graphic format (EMF for example). If you want to implement it with
Skia, you also have to import it into drawinglayer primitives and not
render the vector graphic into a bitmap (like we do for example with "PDF
as an image", where we render the PDF into a bitmap, which has major
flaws). This is IMHO not that easy to achieve and not sure if skia supports
that (it probably is possible to convert into skia internal vector
representation and convert that to drawing layer primitives).

The only place where rendering the SVG to a bitmap would be useful is for
icons, but then I have always said - why spend time on integrating another
SVG library instead of fixing svgio instead...

Tomaž
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20230428/8b3c437e/attachment.htm>


More information about the LibreOffice mailing list