Files
loongoffice/svgio/qa/cppunit/data/maskText.svg
Xisco Fauli 3daee9953d SVG: Add unittest for ecc7f698b5f080530f006218fa3dd82da43d9abb
Change-Id: Icbfd60bd15196649011919e8dea064276e1964b0
Reviewed-on: https://gerrit.libreoffice.org/24097
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-04-15 08:05:10 +00:00

27 lines
865 B
XML

<?xml version="1.0"?>
<svg width="200" height="80"
viewBox="0 0 200 80" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<mask id="myMask"
x="0" y="0" width="200" height="80">
<rect x="0" y="0" width="100" height="80" fill="white"/>
</mask>
<text id="Text" x="100" y="48"
font-size="26" font-weight="bold" text-anchor="middle">
Black White
</text>
</defs>
<!-- Draw black rectangle in the background -->
<rect x="100" y="10" width="95" height="60" />
<!-- Draw the text string twice. First, the white text without mask.
Second, the black text with the mask applied-->
<use xlink:href="#Text" fill="white"/>
<use xlink:href="#Text" fill="black" mask="url(#myMask)"/>
</svg>