1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE svg PUBLIC
"-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
4 <!--======================================================================-->
5 <!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, Institut National de Recherche en =-->
7 <!--= Informatique et en Automatique, Keio University). All Rights =-->
8 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
9 <!--======================================================================-->
10 <!-- =====================================================================-->
12 <!-- masking-clipPath-BE-02.svg -->
13 <!-- renamed for 1.1 suite to masking-path-02-b.svg -->
15 <!-- Test to see if clipPathUnits attribute is handled properly on a -->
16 <!-- clipPath element. Only tests the userSpaceOnUse and -->
17 <!-- objectBoundingBox items of the clipPathUnits. userSpace has been -->
18 <!-- tested by the previous test as it is the default. -->
20 <!-- Author : Haroon Sheikh 10-Mar-2000 -->
21 <!-- Revised for 1.1 : Jun Fujisawa 19-Feb-2002 -->
24 <!-- 10-Mar-2000, HSS: Serial#1 created. -->
25 <!-- 17-Mar-2000, LH=" fix BE" fix Legend; ser#2. -->
26 <!-- 27-Apr-2000, LH=" fix missing "#" on url(clip2)" ser#3. -->
27 <!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
28 <!-- 16-Aug-2000, LH="rename" ser#4. -->
30 <!-- =====================================================================-->
31 <!--======================================================================-->
32 <!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
33 <!--= log messages, and therefore is no longer in the preceding preamble.=-->
34 <!--======================================================================-->
35 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" id=
"svg-root" viewBox=
"0 0 480 360" width=
"100%" height=
"100%" version=
"1.1" baseProfile=
"basic">
36 <SVGTestCase xmlns=
"http://www.w3.org/2000/02/svg/testsuite/description/">
37 <OperatorScript version=
"$Revision: 1.4 $" testname=
"masking-path-02-b.svg">
39 Test to see if clipPathUnits attribute is handled properly on a
40 clipPath element. Only tests the userSpaceOnUse and
41 objectBoundingBox items of the clipPathUnits. userSpace has been
42 tested by the previous test as it is the default.
45 The test at the top shows a red rectangle that has been clipped by a
46 rectangular clipping path. The clipping path is defined using clipPathUnits=objectBoundingBox.
47 Only the bottom-right portion of the red rectangle should be visible.
50 The example at the bottom a rotated blue rectangle that has been clipped by a
51 rectangular clipping path. The clipping path is defined using clipPathUnits=userSpaceOnUse.
52 As a result only the bottom-right portion of the rectangle should be visible.
55 The rendered picture should match the reference image exactly, except for possible
56 variations in the labelling text (per CSS2 rules).
60 <title id=
"test-title">masking-path-
02-b
</title>
61 <desc id=
"test-desc">Test to see if clipPathUnits attribute is handled properly on a clipPath element. Only tests the userSpaceOnUse and objectBoundingBox items of the clipPathUnits. userSpace has been tested by the previous test as it is the default.
</desc>
62 <!--======================================================================-->
63 <!--Content of Test Case follows... =====================-->
64 <!--======================================================================-->
65 <g id=
"test-body-content">
66 <clipPath id=
"clip1" clipPathUnits=
"objectBoundingBox">
67 <rect x=
".25" y=
".5" width=
".6" height=
"1"/>
69 <rect x=
"10" y=
"10" width=
"430" height=
"80" fill=
"red" clip-path=
"url(#clip1)"/>
70 <text font-family=
"Arial" font-size=
"30" x=
"20" y=
"130">clipPathUnits=objectBoundingBox
</text>
71 <clipPath id=
"clip2" clipPathUnits=
"userSpaceOnUse">
72 <rect x=
"60" y=
"60" width=
"80" height=
"80"/>
74 <rect transform=
"translate(100 200) rotate(-45)" x=
"0" y=
"0" width=
"120" height=
"120" fill=
"blue" clip-path=
"url(#clip2)" />
75 <text font-family=
"Arial" font-size=
"30" x=
"20" y=
"280">clipPathUnits=userSpaceOnUse
</text>
77 <text id=
"revision" x=
"10" y=
"340" font-size=
"40" stroke=
"none" fill=
"black">$Revision:
1.4 $
</text>
78 <rect id=
"test-frame" x=
"1" y=
"1" width=
"478" height=
"358" fill=
"none" stroke=
"#000000"/>