Hi Christina,
Christina Roßmanith schrieb:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
opening homenet.svg (attached to the bug) shows the circles without a
filling but filled circles would be correct.
You see only unfilled circles, if you use "File > Open". If you use
"Insert > Image > From file", then the circles are filled as expected.
The reason is, that LibreOffice uses different algorithm for "File >
Open" and "Insert > Image". In Apache OpenOffice the same algorithm is
used, and therefore it does not have this bug. When you search in
Bugzilla, you will find more issues, where File > Open fails.
So the solution is to repair the special way of LibreOffice or to
replace it with the way AOO does it.
The reason (I guess) is
that each circle is represented as 4 bezier curves which make it a
manually closed polygon but not a closed polygon.
The polygon in that file is not explicitly closed, but has only a start
point with identical coordinates as the end point. But in svg it is not
necessary to have a closed outline for to be filled, but each open curve
can be filled.
The current implementation is not able to have fillings of open paths.
Therefore the "Import > Image" algorithm goes the way to add an
additional drawing object with line "none", which is closed and carriers
the filling.
So my question is: Where can I find the code responsible for filling
polygons (and where probably polygons are being tested as being closed
but not manually closed)?
I think, that is not the correct place to fix it. If you are going to
force the case of "start coordinates equal end coordinates" to be
"closed", then this should be down when analyzing the svg on import,
when you have svg namespace. When you force _each_ such polygon to be
closed, then it will break existing documents.
For polygons the state "closed" is set, when a Z command exists; that is
in the tool importFromSvgD.
Because in svg filling does not depend on being closed or not, a fill
attribute always generates a polygon. That is in class SvgStyleAttributes.
But I'm no expert, so cannot give you true code pointers.
Kind regards
Regina
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.