We added a rectangle using PolygonHairlinePrimitive2D to the HiddenGeometryPrimitive2D, so we can mark the boundary of the SVG image. The problem with using the hairline primitive for this is that the hairline size is grown by 0.5 in each direction (implGrowHairline, which is called in getB2DRange), which also makes our SVG size 1px bigger than it should be. Using FilledRectanglePrimitive2D instead fixes this problem as the rectangle isn't grown in size. Also needed to change a lot of tests that were using SVG images and asserted the size of the image in ome way. Change-Id: Ic2aa98b3df1f0746e4cfbd3474b6a93d0f4072ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200440 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit aa2c07951b565cd5464a36a2b0721f888ab8531c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200433 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
SVG Reader
Introduction
The svgio module is used to read SVG (Scalable Vector Graphics[1]) files. It is an XML based format for vector graphics.
This module contains svgio/source/svgreader which is used for embedding an
SVG file with "Insert -> Picture -> From File".
SVG is an open standard provided by the World Wide Web Consortium (W3C).
How does it work?
svgio module uses sax for reading xml and turns it into drawinglayer primitives.
The rendering is done via drawinglayer primitives. For more information, you should
refer to drawinglayer documentation.
Known Bugs
Known remaining bugs for this module are gathered here:
Dependencies
Direct dependencies for emfio are drawinglayer and sax.
Related Software
References
Documentation for the SVG format is available on the W3C website: