| 1 |
<svg version="1.1" baseProfile="full" id="svg-root" |
| 2 |
width="100%" height="100%" viewBox="0 0 480 360" |
| 3 |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= SVG 1.1 2nd Edition Test Case =--> |
| 6 |
<!--======================================================================--> |
| 7 |
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =--> |
| 8 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 9 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 10 |
<!--= All Rights Reserved. =--> |
| 11 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 12 |
<!--======================================================================--> |
| 13 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 14 |
template-version="1.4" reviewer="CL" author="BB" status="accepted" |
| 15 |
version="$Revision: 1.6 $" testname="$RCSfile: masking-intro-01-f.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/masking.html#Introduction"> |
| 17 |
<p> |
| 18 |
The rules are different regarding the geometry of a shape when clipping and masking. |
| 19 |
For example, a clip-path does not take into account the stroke of the shape used for clipping. |
| 20 |
It is however, used when masking. |
| 21 |
</p> |
| 22 |
</d:testDescription> |
| 23 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 24 |
<p> |
| 25 |
Run the test. No interaction required. |
| 26 |
</p> |
| 27 |
</d:operatorScript> |
| 28 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 29 |
<p> |
| 30 |
The test is passed if there are two identical darkblue circles at the top of the illustration, and |
| 31 |
below those two circles, two more circles should appear. They are of lighter appearance, |
| 32 |
the one on the left has a darker and thick stroke. |
| 33 |
</p> |
| 34 |
</d:passCriteria> |
| 35 |
</d:SVGTestCase> |
| 36 |
<title id="test-title">$RCSfile: masking-intro-01-f.svg,v $</title> |
| 37 |
<defs> |
| 38 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 39 |
<font-face-src> |
| 40 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 41 |
</font-face-src> |
| 42 |
</font-face> |
| 43 |
</defs> |
| 44 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 45 |
<g shape-rendering="geometricPrecision"> |
| 46 |
<title id="test-title">masking-mask-04-f.svg</title> |
| 47 |
<desc id="test-desc">Tests the impact of strokes within clipPath and mask</desc> |
| 48 |
<text font-size="18" x="240" y="35" text-anchor="middle">Testing stroke inclusion for 'clip-path' and 'mask'</text> |
| 49 |
|
| 50 |
<defs> |
| 51 |
<clipPath id="one" clipPathUnits="objectBoundingBox"> |
| 52 |
<circle cx="0.3" cy="0.5" r="0.2" stroke-width="0.15" fill="none" stroke="red"/> |
| 53 |
<circle cx="0.7" cy="0.5" r="0.2" stroke-width="0.15" fill="none" stroke="none"/> |
| 54 |
</clipPath> |
| 55 |
</defs> |
| 56 |
|
| 57 |
<rect x="150" y="0" width="200" height="200" fill="darkblue" clip-path="url(#one)"/> |
| 58 |
<text x="50" y="110">With a 'clip-path':</text> |
| 59 |
|
| 60 |
<defs> |
| 61 |
<mask id="two" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox" color-interpolation="linearRGB"> |
| 62 |
<circle cx="0.3" cy="0.5" r="0.2" stroke-width="0.15" fill="blue" stroke="red"/> |
| 63 |
<circle cx="0.7" cy="0.5" r="0.2" stroke-width="0.15" fill="blue" stroke="none"/> |
| 64 |
</mask> |
| 65 |
</defs> |
| 66 |
|
| 67 |
<rect x="150" y="150" width="200" height="200" fill="darkblue" mask="url(#two)"/> |
| 68 |
<text x="50" y="260">With a 'mask':</text> |
| 69 |
</g> |
| 70 |
</g> |
| 71 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 72 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 73 |
</g> |
| 74 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 75 |
<!-- comment out this watermark once the test is approved --> |
| 76 |
<!--<g id="draft-watermark"> |
| 77 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 78 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 79 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 80 |
</g>--> |
| 81 |
</svg> |