diff options
Diffstat (limited to 'svgio/source/svgreader/svgfecolormatrixnode.cxx')
-rw-r--r-- | svgio/source/svgreader/svgfecolormatrixnode.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/svgio/source/svgreader/svgfecolormatrixnode.cxx b/svgio/source/svgreader/svgfecolormatrixnode.cxx index 42611e48efdd..5f8e03c4318b 100644 --- a/svgio/source/svgreader/svgfecolormatrixnode.cxx +++ b/svgio/source/svgreader/svgfecolormatrixnode.cxx @@ -53,6 +53,10 @@ void SvgFeColorMatrixNode::parseAttribute(const OUString& /*rTokenName*/, SVGTok { maType = ColorType::HueRotate; } + else if (o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"matrix")) + { + maType = ColorType::Matrix; + } } break; } @@ -99,6 +103,15 @@ void SvgFeColorMatrixNode::apply(drawinglayer::primitive2d::Primitive2DContainer basegfx::deg2rad(aNum.getNumber())))); rTarget = drawinglayer::primitive2d::Primitive2DContainer{ xRef }; } + else if (maType == ColorType::Matrix) + { + basegfx::B3DHomMatrix aMatrix = readFilterMatrix(maValuesContent, *this); + + const drawinglayer::primitive2d::Primitive2DReference xRef( + new drawinglayer::primitive2d::ModifiedColorPrimitive2D( + std::move(rTarget), std::make_shared<basegfx::BColorModifier_matrix>(aMatrix))); + rTarget = drawinglayer::primitive2d::Primitive2DContainer{ xRef }; + } } } // end of namespace svgio::svgreader |