| 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 |
<!-- check updates on gradients, filter, mask, and clip regarding to --> |
| 25 |
<!-- geometry updates --> |
| 26 |
<!-- --> |
| 27 |
<!-- @author [email protected] --> |
| 28 |
<!-- @version $Id$ --> |
| 29 |
<!-- ====================================================================== --> |
| 30 |
|
| 31 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 32 |
|
| 33 |
<svg xmlns="http://www.w3.org/2000/svg" |
| 34 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 35 |
id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 36 |
|
| 37 |
<title>Marker with geometry updates</title> |
| 38 |
|
| 39 |
<text x="50%" y="45" class="title">Marker with geometry updates</text> |
| 40 |
|
| 41 |
<script type="text/ecmascript"> |
| 42 |
|
| 43 |
var svgNamespaceURI = "http://www.w3.org/2000/svg"; |
| 44 |
|
| 45 |
function changeGeometry(evt) { |
| 46 |
evt.target.setAttribute("points", |
| 47 |
"130 150 150 170 110 190 150 210 110 230 150 250 110 270 150 290 110 310 150 330 110 350 130 370"); |
| 48 |
} |
| 49 |
|
| 50 |
</script> |
| 51 |
|
| 52 |
<defs> |
| 53 |
|
| 54 |
<marker id="markerUserSpaceOnUse" refX="8" refY="8" markerUnits="userSpaceOnUse" markerWidth="16" markerHeight="16"> |
| 55 |
<circle cx="8" cy="8" r="8" style="fill:#aaa" /> |
| 56 |
</marker> |
| 57 |
|
| 58 |
<marker id="markerStrokeWidth" refX="2" refY="2" markerUnits="strokeWidth" markerWidth="4" markerHeight="4"> |
| 59 |
<circle cx="2" cy="2" r="2" style="fill:#aaa" /> |
| 60 |
</marker> |
| 61 |
|
| 62 |
</defs> |
| 63 |
|
| 64 |
|
| 65 |
<g id="test-content"> |
| 66 |
|
| 67 |
<g id="board" style="fill:none; stroke:black"> |
| 68 |
<rect x="40" y="80" width="200" height="20" style="fill:#eee"/> |
| 69 |
<rect x="240" y="80" width="200" height="20" style="fill:#eee"/> |
| 70 |
|
| 71 |
<rect x="40" y="100" width="200" height="380" /> |
| 72 |
<rect x="240" y="100" width="200" height="380" /> |
| 73 |
|
| 74 |
<rect x="20" y="100" width="20" height="380" style="fill:#eee"/> |
| 75 |
|
| 76 |
<g style="fill:black; stroke:none; text-anchor:middle"> |
| 77 |
<text x="134" y="94">strokeWidth</text> |
| 78 |
<text x="314" y="94">userSpaceOnUse</text> |
| 79 |
<text x="0" y="0" transform="translate(34 290)rotate(-90)"><marker></text> |
| 80 |
</g> |
| 81 |
</g> |
| 82 |
|
| 83 |
<polyline onload="changeGeometry(evt)" |
| 84 |
points="130 150 110 170 150 190 110 210 150 230 110 250 150 270 110 290 150 310 110 330 150 350 130 370" |
| 85 |
style="stroke:black; stroke-width:4; fill:none; marker:url(#markerStrokeWidth)" /> |
| 86 |
|
| 87 |
|
| 88 |
<polyline transform="translate(200 0)" onload="changeGeometry(evt)" |
| 89 |
points="130 150 110 170 150 190 110 210 150 230 110 250 150 270 110 290 150 310 110 330 150 350 130 370" |
| 90 |
style="stroke:black; stroke-width:4; fill:none; marker:url(#markerUserSpaceOnUse)" /> |
| 91 |
|
| 92 |
</g> |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
</svg> |