tdf#165553 Fix Draw import of nonzero paths from pdf

Convert to nonzero path when importing FILLPATH from xpdfimport. This change
should fix the handling of these kinds of pdf files generated from svg.

Change-Id: Ic8d553d11c584462a4432f0971da9456a23d9347
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182667
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
This commit is contained in:
langty
2025-03-08 19:30:33 +08:00
committed by David Gilbert
parent 501e5a7db7
commit 19ac1ce153

View File

@@ -474,6 +474,8 @@ void PDFIProcessor::strokePath( const uno::Reference< rendering::XPolyPolygon2D
void PDFIProcessor::fillPath( const uno::Reference< rendering::XPolyPolygon2D >& rPath )
{
basegfx::B2DPolyPolygon aPoly=basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath);
aPoly = basegfx::utils::createNonzeroConform(aPoly);
aPoly.transform(getCurrentContext().Transformation);
basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip;