summaryrefslogtreecommitdiff
path: root/svgio/qa
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/qa')
-rw-r--r--svgio/qa/cppunit/SvgRead.cxx4
-rw-r--r--svgio/qa/cppunit/data/VisiotorTest-Rect.svg4
-rw-r--r--svgio/qa/cppunit/data/path.svg2
3 files changed, 8 insertions, 2 deletions
diff --git a/svgio/qa/cppunit/SvgRead.cxx b/svgio/qa/cppunit/SvgRead.cxx
index cd81bfbddc39..45b0158a0240 100644
--- a/svgio/qa/cppunit/SvgRead.cxx
+++ b/svgio/qa/cppunit/SvgRead.cxx
@@ -74,7 +74,7 @@ uno::Reference<io::XInputStream> TestParsing::parseSvg(const OUString& aSource)
void TestParsing::testSimpleRectangle()
{
- OUString aSvgFile = "/svgio/qa/cppunit/data/Rect.svg";
+ OUString aSvgFile = "/svgio/qa/cppunit/data/VisiotorTest-Rect.svg";
OUString aUrl = m_directories.getURLFromSrc(aSvgFile);
OUString aPath = m_directories.getPathFromSrc(aSvgFile);
@@ -102,6 +102,7 @@ void TestParsing::testSimpleRectangle()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xff0000), sal_Int32(Color(*pDrawRect->mpStrokeColor)));
CPPUNIT_ASSERT(bool(pDrawRect->mpFillColor));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00cc00), sal_Int32(Color(*pDrawRect->mpFillColor)));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1, pDrawRect->mnOpacity, 1E-12);
}
void TestParsing::testPath()
@@ -133,6 +134,7 @@ void TestParsing::testPath()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), sal_Int32(Color(*pDrawPath->mpStrokeColor)));
CPPUNIT_ASSERT(bool(pDrawPath->mpFillColor));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x007aff), sal_Int32(Color(*pDrawPath->mpFillColor)));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.1, pDrawPath->mnOpacity, 1E-12);
}
CPPUNIT_TEST_SUITE_REGISTRATION(TestParsing);
diff --git a/svgio/qa/cppunit/data/VisiotorTest-Rect.svg b/svgio/qa/cppunit/data/VisiotorTest-Rect.svg
new file mode 100644
index 000000000000..4cd2d3602ea3
--- /dev/null
+++ b/svgio/qa/cppunit/data/VisiotorTest-Rect.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<svg width="120" height="120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <rect x="10" y="10" width="100" height="100" rx="10" ry="10" stroke="#ff0000" opacity="0.1" fill="#00cc00" stroke-width="3" />
+</svg>
diff --git a/svgio/qa/cppunit/data/path.svg b/svgio/qa/cppunit/data/path.svg
index 1722181c872e..559ceec6d557 100644
--- a/svgio/qa/cppunit/data/path.svg
+++ b/svgio/qa/cppunit/data/path.svg
@@ -1,3 +1,3 @@
<svg width="44" height="26" xmlns="http://www.w3.org/2000/svg">
- <path d="M1 1 H 43 V 25 H 1 L 1 1 Z" fill="#007aff" stroke="#fff" stroke-width="0"/>
+ <path d="M1 1 H 43 V 25 H 1 L 1 1 Z" fill="#007aff" stroke="#fff" opacity="0.1" stroke-width="0"/>
</svg>