summaryrefslogtreecommitdiff
path: root/drawinglayer/source/tools
diff options
context:
space:
mode:
authorArmin Le Grand (Collabora) <Armin.Le.Grand@me.com>2024-07-19 14:35:39 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2024-07-20 14:19:35 +0200
commit7297b0788f8f20ba6ab0973f944a4d522d666108 (patch)
tree8b4a52de916153c6b0f8ce519dac9024173a1f76 /drawinglayer/source/tools
parent926ed71244c20d5a96d0f20b7c4edfb9e645a667 (diff)
CairoSDPR: Support direct RGBA paint of PolyPolygons
Change-Id: Id1480297126bcc422945df7cd47993cc7fe5c22a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170768 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Jenkins
Diffstat (limited to 'drawinglayer/source/tools')
-rw-r--r--drawinglayer/source/tools/primitive2dxmldump.cxx15
1 files changed, 15 insertions, 0 deletions
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 <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
#include <drawinglayer/primitive2d/sceneprimitive2d.hxx>
#include <drawinglayer/primitive2d/shadowprimitive2d.hxx>
+#include <drawinglayer/primitive2d/PolyPolygonRGBAPrimitive2D.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/attribute/lineattribute.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
@@ -1214,6 +1215,20 @@ void Primitive2dXmlDump::decomposeAndWrite(
break;
}
+ case PRIMITIVE2D_ID_POLYPOLYGONRGBAPRIMITIVE2D:
+ {
+ const PolyPolygonRGBAPrimitive2D& rPolyPolygonRGBAPrimitive2D
+ = dynamic_cast<const PolyPolygonRGBAPrimitive2D&>(*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");