From 7297b0788f8f20ba6ab0973f944a4d522d666108 Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (Collabora)" Date: Fri, 19 Jul 2024 14:35:39 +0200 Subject: CairoSDPR: Support direct RGBA paint of PolyPolygons Change-Id: Id1480297126bcc422945df7cd47993cc7fe5c22a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170768 Reviewed-by: Armin Le Grand Tested-by: Jenkins --- drawinglayer/source/tools/primitive2dxmldump.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drawinglayer/source/tools') diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx index e16e2a5e6e0c..55c581dab510 100644 --- a/drawinglayer/source/tools/primitive2dxmldump.cxx +++ b/drawinglayer/source/tools/primitive2dxmldump.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -1214,6 +1215,20 @@ void Primitive2dXmlDump::decomposeAndWrite( break; } + case PRIMITIVE2D_ID_POLYPOLYGONRGBAPRIMITIVE2D: + { + const PolyPolygonRGBAPrimitive2D& rPolyPolygonRGBAPrimitive2D + = dynamic_cast(*pBasePrimitive); + rWriter.startElement("polypolygonrgba"); + rWriter.attribute("color", + convertColorToString(rPolyPolygonRGBAPrimitive2D.getBColor())); + rWriter.attribute("transparence", + std::lround(100 * rPolyPolygonRGBAPrimitive2D.getTransparency())); + writePolyPolygon(rWriter, rPolyPolygonRGBAPrimitive2D.getB2DPolyPolygon()); + rWriter.endElement(); + break; + } + default: { rWriter.startElement("unhandled"); -- cgit