| <?xml version="1.0" standalone="no"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" |
| "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <!-- ========================================================================= --> |
| <!-- test for bug in updateTracker --> |
| <!-- --> |
| <!-- @author nicolas.socheleau@bitflash.com --> |
| <!-- @version $Id$ --> |
| <!-- ========================================================================= --> |
| <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| |
| <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"> |
| |
| <title>UpdateTracker bug#12933</title> |
| |
| <style type="text/css"><![CDATA[ |
| |
| ]]></style> |
| <script type="text/ecmascript" > |
| var xlinkNS = "http://www.w3.org/1999/xlink"; |
| var SVGNS ="http://www.w3.org/2000/svg"; |
| |
| function showBBox(name){ |
| var e = document.getElementById(name); |
| var rect = document.createElementNS(SVGNS,"rect"); |
| |
| var bbox = e.getBBox(); |
| rect.setAttribute("x",bbox.getX()); |
| rect.setAttribute("y",bbox.getY()); |
| rect.setAttribute("width",bbox.getWidth()); |
| rect.setAttribute("height",bbox.getHeight()); |
| rect.setAttribute("style","stroke:red;fill:none"); |
| document.getDocumentElement().appendChild(rect); |
| } |
| |
| function move(before,first,second){ |
| var e1 = document.getElementById(before); |
| var e2 = document.getElementById(first); |
| var e3 = document.getElementById(second); |
| |
| e1.getParentNode().insertBefore(e3,e1); |
| e1.getParentNode().insertBefore(e2,e3); |
| } |
| </script> |
| |
| <g id="content"> |
| |
| <text class="title" x="50%" y="40">UpdateTracker bug#12933</text> |
| |
| |
| <circle id="circle" cx="75" cy="125" r="30" fill="coral" stroke="black"/> |
| <rect id="rect" x="100" y="100" width="100" height="50" fill="darkorange" stroke="black"/> |
| <polygon id="polygon" |
| points="75,125 120,180 140,140 150,190 140,210 120,180 100,210 90,180" |
| fill="cornsilk" stroke="black"/> |
| |
| |
| <rect x="70" y="300" width="50" height="50" stroke="black" fill="crimson" |
| onclick="move('circle','rect','polygon')"/> |
| |
| <rect x="150" y="300" width="50" height="50" stroke="black" fill="crimson" |
| onclick="showBBox('rect')"/> |
| |
| <text x="80" y="340" fill="black" font-weight="bold">1</text> |
| <text x="160" y="340" fill="black" font-weight="bold">2</text> |
| |
| <text x="50%" y="400" text-anchor="middle" >Click 1 and 2, the bounding box of <rect> should appear in red</text> |
| |
| </g> |
| |
| <script type="text/ecmascript"><![CDATA[ |
| function onDone() { |
| if (!(regardTestInstance == null)) { |
| regardTestInstance.scriptDone(); |
| } else { |
| alert("This button only works when run in the regard framework"); |
| } |
| } |
| ]]></script> |
| <g id="done" transform="translate(195, 458)" cursor="pointer" onclick="onDone()"> |
| <rect rx="5" ry="5" width="60" height="25" fill="#eeeeee" stroke="black" /> |
| <text x="30" y="18" font-size="14" font-weight="bold" text-anchor="middle">Done</text> |
| </g> |
| |
| <!-- ============================================================= --> |
| <!-- Batik sample mark --> |
| <!-- ============================================================= --> |
| <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" /> |
| |
| </svg> |
| |