diff options
Diffstat (limited to 'svgio/qa/cppunit')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 18 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/filterFeFlood.svg | 16 |
2 files changed, 34 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 7e32e83faf3a..9383b7ac5430 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -203,6 +203,24 @@ CPPUNIT_TEST_FIXTURE(Test, testFilterFeOffset) assertXPath(pDocument, "/primitive2D/transform/mask/transform", "xy33", "1"); } +CPPUNIT_TEST_FIXTURE(Test, testFilterFeFlood) +{ + Primitive2DSequence aSequenceTdf132246 = parseSvg(u"/svgio/qa/cppunit/data/filterFeFlood.svg"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceTdf132246.getLength())); + + drawinglayer::Primitive2dXmlDump dumper; + xmlDocUniquePtr pDocument = dumper.dumpAndParse(aSequenceTdf132246); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence", "transparence", "50"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor", "color", "#008000"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon", "height", "100"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon", "width", "100"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon", "minx", "50"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon", "miny", "50"); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf87309) { Primitive2DSequence aSequenceTdf87309 = parseSvg(u"/svgio/qa/cppunit/data/tdf87309.svg"); diff --git a/svgio/qa/cppunit/data/filterFeFlood.svg b/svgio/qa/cppunit/data/filterFeFlood.svg new file mode 100644 index 000000000000..2c438ad1a9bf --- /dev/null +++ b/svgio/qa/cppunit/data/filterFeFlood.svg @@ -0,0 +1,16 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> + <defs> + <filter id="floodFilter" filterUnits="userSpaceOnUse"> + <feFlood + x="50" + y="50" + width="100" + height="100" + flood-color="green" + flood-opacity="0.5" /> + </filter> + </defs> + + <use filter="url(#floodFilter)" /> +</svg> + |