Debian Codegraph @

samples/tests/spec/painting/display.svg

raw
1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
5 <!--
6
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 -->
23 <!-- ========================================================================= -->
24 <!-- Test 'display' property -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id$ -->
28 <!-- ========================================================================= -->
29
30 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
31
32
33 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500">
34 <title> Test 'display' property</title>
35 <!-- ============================================================= -->
36 <!-- Test content -->
37 <!-- ============================================================= -->
38 <g id="testContent">
39
40 <text x="225" y="40" class="title">
41 Test 'display' property
42 </text>
43
44 <g id="array">
45 <g style="stroke:black;fill:none;">
46 <rect x="45" y="60" width="360" height="20" fill="#eee"/>
47 <rect x="25" y="80" width="20" height="360" fill="#eee"/>
48 <rect x="45" y="80" width="360" height="360" />
49
50 <line x1="165" y1="60" x2="165" y2="440" />
51 <line x1="285" y1="60" x2="285" y2="440" />
52
53 <line x1="25" y1="170" x2="405" y2="170" />
54 <line x1="25" y1="260" x2="405" y2="260" />
55 <line x1="25" y1="350" x2="405" y2="350" />
56 </g>
57 <g style="text-anchor:middle; font-size:10pt; fill:black; stroke:none">
58 <text x="105" y="75">display:inherit</text>
59 <text x="225" y="75">display:inline</text>
60 <text x="345" y="75">display:none</text>
61
62
63 <text x="0" y="0" transform="translate(40, 125) rotate(-90)">&lt;rect></text>
64
65 <text x="0" y="0" transform="translate(40, 215) rotate(-90)">&lt;g></text>
66
67 <text x="0" y="0" transform="translate(40, 305) rotate(-90)">&lt;clipPath></text>
68
69 <text x="0" y="0" transform="translate(40, 395) rotate(-90)">&lt;mask></text>
70 </g>
71 </g>
72
73 <!-- #################################################### -->
74 <!-- #################################################### -->
75
76 <!-- a rectangle with its display property set to 'inherit' -->
77 <rect x="65" y="90" width="80" height="70" style="fill:crimson; display:inherit" />
78
79 <!-- a rectangle with its display property set to 'inline' -->
80 <rect x="185" y="90" width="80" height="70" style="fill:crimson; display:inline" />
81
82 <!-- a rectangle with its display property set to 'none -->
83 <rect x="305" y="90" width="80" height="70" style="fill:crimson; display:none" />
84
85
86 <!-- #################################################### -->
87 <!-- #################################################### -->
88
89 <!-- a group with its display property set to 'inherit' -->
90 <g style="display:inherit">
91 <ellipse cx="95" cy="215" rx="30" ry="40" style="fill:crimson;" />
92 <ellipse cx="115" cy="215" rx="30" ry="40" style="fill:gold;" />
93 </g>
94
95 <!-- a group with its display property set to 'inline' -->
96 <g style="display:inline">
97 <ellipse cx="215" cy="215" rx="30" ry="40" style="fill:crimson;" />
98 <ellipse cx="235" cy="215" rx="30" ry="40" style="fill:gold;" />
99 </g>
100
101 <!-- a group with its display property set to 'none' -->
102 <g style="display:none">
103 <ellipse cx="335" cy="215" rx="30" ry="40" style="fill:crimson;" />
104 <ellipse cx="355" cy="215" rx="30" ry="40" style="fill:gold;" />
105 </g>
106
107
108 <!-- #################################################### -->
109 <!-- #################################################### -->
110 <defs>
111 <!-- a clipPath with its children display properties set to 'inherit' -->
112 <clipPath id="clipInherit" clipPathUnits="objectBoundingBox">
113 <ellipse cx=".3" cy=".5" rx=".3" ry=".5" style="display:inherit"/>
114 <ellipse cx=".7" cy=".5" rx=".3" ry=".5" style="display:inherit"/>
115 </clipPath>
116
117 <!-- a clipPath with its children display properties set to 'inline' -->
118 <clipPath id="clipInline" clipPathUnits="objectBoundingBox">
119 <ellipse cx=".3" cy=".5" rx=".3" ry=".5" style="display:inline"/>
120 <ellipse cx=".7" cy=".5" rx=".3" ry=".5" style="display:inline"/>
121 </clipPath>
122
123 <!-- a clipPath with its children display properties set to 'none' -->
124 <clipPath id="clipNone" clipPathUnits="objectBoundingBox">
125 <ellipse cx=".3" cy=".5" rx=".3" ry=".5" style="display:none"/>
126 <ellipse cx=".7" cy=".5" rx=".3" ry=".5" style="display:none"/>
127 </clipPath>
128 </defs>
129
130 <rect x="65" y="270" width="80" height="70" style="fill:crimson; clip-path:url(#clipInherit);" />
131
132 <rect x="185" y="270" width="80" height="70" style="fill:crimson; clip-path:url(#clipInline);" />
133
134 <rect x="305" y="270" width="80" height="70" style="fill:crimson; clip-path:url(#clipNone);" />
135
136 <!-- #################################################### -->
137 <!-- #################################################### -->
138 <defs>
139 <mask id="maskInherit" maskContentUnits="objectBoundingBox"
140 x="0" y="0" width="100%" height="100%" style="fill:white">
141 <circle cx=".2" cy=".2" r=".2" style="display:inherit"/>
142 <circle cx=".8" cy=".2" r=".2" style="display:inherit"/>
143 <circle cx=".2" cy=".8" r=".2" style="display:inherit"/>
144 <circle cx=".8" cy=".8" r=".2" style="display:inherit"/>
145 </mask>
146
147 <mask id="maskInline" maskContentUnits="objectBoundingBox"
148 x="0" y="0" width="100%" height="100%" style="fill:white">
149 <circle cx=".2" cy=".2" r=".2" style="display:inline"/>
150 <circle cx=".8" cy=".2" r=".2" style="display:inline"/>
151 <circle cx=".2" cy=".8" r=".2" style="display:inline"/>
152 <circle cx=".8" cy=".8" r=".2" style="display:inline"/>
153 </mask>
154
155 <mask id="maskNone" maskContentUnits="objectBoundingBox"
156 x="0" y="0" width="100%" height="100%" style="fill:white">
157 <circle cx=".2" cy=".2" r=".2" style="display:none"/>
158 <circle cx=".8" cy=".2" r=".2" style="display:none"/>
159 <circle cx=".2" cy=".8" r=".2" style="display:none"/>
160 <circle cx=".8" cy=".8" r=".2" style="display:none"/>
161 </mask>
162 </defs>
163
164 <rect x="65" y="360" width="80" height="70" style="fill:crimson; mask:url(#maskInherit)" />
165
166 <rect x="185" y="360" width="80" height="70" style="fill:crimson; mask:url(#maskInline)" />
167
168 <rect x="305" y="360" width="80" height="70" style="fill:crimson; mask:url(#maskNone)" />
169
170 </g>
171
172 <!-- ============================================================= -->
173 <!-- Batik sample mark -->
174 <!-- ============================================================= -->
175 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
176
177 </svg>