tkormann 2002/06/10 07:32:15 Added: samples/tests/spec/scripting filterPatternUpdate.svg filterPatternUpdateRef.svg gradientsUpdate.svg gradientsUpdateRef.svg markerUpdate.svg markerUpdateRef.svg maskClipUpdate.svg maskClipUpdateRef.svg Log: Add new tests that demonstrates that updating the geometry of a shape will update its associated gradient, filter, mask, pattern, marker, or clip Revision Changes Path 1.1 xml-batik/samples/tests/spec/scripting/filterPatternUpdate.svg Index: filterPatternUpdate.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: filterPatternUpdate.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Filter and pattern with geometry updates</title> <text x="50%" y="45" class="title">Filter and pattern with geometry updates <tspan x="50%" dy="1.1em" style="font-style:italic; font-size:12">(click on all shapes and see <a style="fill:blue" xlink:href="filterPatternUpdateRef.svg">filterPatternUpdateRef.svg</a>)</tspan></text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function move(evt) { var x = parseFloat(evt.target.getAttribute("x")); var y = parseFloat(evt.target.getAttribute("y")); evt.target.setAttribute("x", x+90); evt.target.setAttribute("y", y+85); } </script> <defs> <filter id="filterObjectBoundingBox" primitiveUnits="objectBoundingBox" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> <feTurbulence x="0" y="0" width="1" height="1" type="turbulence" baseFrequency="0.1" numOctaves="2"/> </filter> <filter id="filterUserSpaceOnUse" primitiveUnits="objectBoundingBox" filterUnits="userSpaceOnUse"> x="250" y="110" width="180" height="190"> <feTurbulence x="0" y="0" width="1" height="1" type="turbulence" baseFrequency="0.1" numOctaves="2"/> </filter> <pattern id="patternObjectBoundingBox" patternContentUnits="userSpaceOnUse" patternUnits="objectBoundingBox" x="0" y="0" width="1" height="1" viewBox="0 0 20 20"> <rect x="0" y="0" width="10" height="10" fill="#eee" /> <rect x="10" y="0" width="10" height="10" fill="black" /> <rect x="0" y="10" width="10" height="10" fill="black" /> <rect x="10" y="10" width="10" height="10" fill="#eee" /> </pattern> <pattern id="patternUserSpaceOnUse" patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse" x="250" y="300" width="20" height="20" viewBox="250 300 20 20" > <rect x="250" y="300" width="10" height="10" fill="#eee" /> <rect x="260" y="300" width="10" height="10" fill="black" /> <rect x="250" y="310" width="10" height="10" fill="black" /> <rect x="260" y="310" width="10" height="10" fill="#eee" /> </pattern> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <line x1="20" y1="290" x2="440" y2="290" /> <rect x="20" y="100" width="20" height="190" style="fill:#eee"/> <rect x="20" y="290" width="20" height="190" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">objectBoundingBox</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 200)rotate(-90)"><filter></text> <text x="0" y="0" transform="translate(34 380)rotate(-90)"><pattern></text> </g> </g> <rect onclick="move(evt)" x="50" y="110" width="90" height="85" style="filter:url(#filterObjectBoundingBox)"/> <rect onclick="move(evt)" x="250" y="110" width="90" height="85" style="filter:url(#filterUserSpaceOnUse)"/> <rect onclick="move(evt)" x="50" y="300" width="90" height="85" style="fill:url(#patternObjectBoundingBox)"/> <rect onclick="move(evt)" x="250" y="300" width="90" height="85" style="fill:url(#patternUserSpaceOnUse)"/> </g> </svg> 1.1 xml-batik/samples/tests/spec/scripting/filterPatternUpdateRef.svg Index: filterPatternUpdateRef.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: filterPatternUpdateRef.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Filter and pattern with geometry updates</title> <text x="50%" y="45" class="title">Filter and pattern with geometry updates <tspan x="50%" dy="1.1em" style="font-style:italic; font-size:12">(click on all shapes and see <a style="fill:blue" xlink:href="maskClipUpdateRef.svg">filterPatterUpdateRef.svg</a>)</tspan></text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function move(evt) { var x = parseFloat(evt.target.getAttribute("x")); var y = parseFloat(evt.target.getAttribute("y")); evt.target.setAttribute("x", x+90); evt.target.setAttribute("y", y+85); } </script> <defs> <filter id="filterObjectBoundingBox" primitiveUnits="objectBoundingBox" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> <feTurbulence x="0" y="0" width="1" height="1" type="turbulence" baseFrequency="0.1" numOctaves="2"/> </filter> <filter id="filterUserSpaceOnUse" primitiveUnits="objectBoundingBox" filterUnits="userSpaceOnUse"> x="250" y="110" width="180" height="190"> <feTurbulence x="0" y="0" width="1" height="1" type="turbulence" baseFrequency="0.1" numOctaves="2"/> </filter> <pattern id="patternObjectBoundingBox" patternContentUnits="userSpaceOnUse" patternUnits="objectBoundingBox" x="0" y="0" width="1" height="1" viewBox="0 0 20 20"> <rect x="0" y="0" width="10" height="10" fill="#eee" /> <rect x="10" y="0" width="10" height="10" fill="black" /> <rect x="0" y="10" width="10" height="10" fill="black" /> <rect x="10" y="10" width="10" height="10" fill="#eee" /> </pattern> <pattern id="patternUserSpaceOnUse" patternContentUnits="userSpaceOnUse" patternUnits="userSpaceOnUse" x="250" y="300" width="20" height="20" viewBox="250 300 20 20" > <rect x="250" y="300" width="10" height="10" fill="#eee" /> <rect x="260" y="300" width="10" height="10" fill="black" /> <rect x="250" y="310" width="10" height="10" fill="black" /> <rect x="260" y="310" width="10" height="10" fill="#eee" /> </pattern> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <line x1="20" y1="290" x2="440" y2="290" /> <rect x="20" y="100" width="20" height="190" style="fill:#eee"/> <rect x="20" y="290" width="20" height="190" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">objectBoundingBox</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 200)rotate(-90)"><filter></text> <text x="0" y="0" transform="translate(34 380)rotate(-90)"><pattern></text> </g> </g> <rect onload="move(evt)" x="50" y="110" width="90" height="85" style="filter:url(#filterObjectBoundingBox)"/> <rect onload="move(evt)" x="250" y="110" width="90" height="85" style="filter:url(#filterUserSpaceOnUse)"/> <rect onload="move(evt)" x="50" y="300" width="90" height="85" style="fill:url(#patternObjectBoundingBox)"/> <rect onload="move(evt)" x="250" y="300" width="90" height="85" style="fill:url(#patternUserSpaceOnUse)"/> </g> </svg> 1.1 xml-batik/samples/tests/spec/scripting/gradientsUpdate.svg Index: gradientsUpdate.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: gradientsUpdate.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Gradients with geometry updates</title> <text x="50%" y="45" class="title">Gradients with geometry updates <tspan x="50%" dy="1.1em" style="font-style:italic; font-size:12">(click on all shapes and see <a style="fill:blue" xlink:href="gradientsUpdateRef.svg">gradientsUpdateRef.svg</a>)</tspan></text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function move(evt) { var x = parseFloat(evt.target.getAttribute("x")); var y = parseFloat(evt.target.getAttribute("y")); evt.target.setAttribute("x", x+80); evt.target.setAttribute("y", y+80); } </script> <defs> <linearGradient id="linearObjectBoundingBox" x1="0" y1="0" x2="1" y2="1"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </linearGradient> <linearGradient id="linearUserSpaceOnUse" x1="240" y1="100" x2="440" y2="290" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </linearGradient> <radialGradient id="radialObjectBoundingBox" cx=".5" cy=".5" r=".5" fx=".5" fy=".5"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </radialGradient> <radialGradient id="radialUserSpaceOnUse" cx="340" cy="385" r="100" fx="340" fy="385" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </radialGradient> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <line x1="20" y1="290" x2="440" y2="290" /> <rect x="20" y="100" width="20" height="190" style="fill:#eee"/> <rect x="20" y="290" width="20" height="190" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">objectBoundingBox</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 200)rotate(-90)"><linearGradient></text> <text x="0" y="0" transform="translate(34 380)rotate(-90)"><radialGradient></text> </g> </g> <rect onclick="move(evt)" x="50" y="110" width="100" height="95" style="fill:url(#linearObjectBoundingBox)"/> <rect onclick="move(evt)" x="250" y="110" width="100" height="95" style="fill:url(#linearUserSpaceOnUse)"/> <rect onclick="move(evt)" x="50" y="300" width="100" height="95" style="fill:url(#radialObjectBoundingBox)"/> <rect onclick="move(evt)" x="250" y="300" width="100" height="95" style="fill:url(#radialUserSpaceOnUse)"/> </g> </svg> 1.1 xml-batik/samples/tests/spec/scripting/gradientsUpdateRef.svg Index: gradientsUpdateRef.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: gradientsUpdateRef.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Gradients with geometry updates</title> <text x="50%" y="45" class="title">Gradients with geometry updates</text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function move(evt) { var x = parseFloat(evt.target.getAttribute("x")); var y = parseFloat(evt.target.getAttribute("y")); evt.target.setAttribute("x", x+80); evt.target.setAttribute("y", y+80); } </script> <defs> <linearGradient id="linearObjectBoundingBox" x1="0" y1="0" x2="1" y2="1"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </linearGradient> <linearGradient id="linearUserSpaceOnUse" x1="240" y1="100" x2="440" y2="290" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </linearGradient> <radialGradient id="radialObjectBoundingBox" cx=".5" cy=".5" r=".5" fx=".5" fy=".5"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </radialGradient> <radialGradient id="radialUserSpaceOnUse" cx="340" cy="385" r="100" fx="340" fy="385" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="crimson" /> <stop offset=".5" stop-color="orange" /> <stop offset="1" stop-color="gold" /> </radialGradient> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <line x1="20" y1="290" x2="440" y2="290" /> <rect x="20" y="100" width="20" height="190" style="fill:#eee"/> <rect x="20" y="290" width="20" height="190" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">objectBoundingBox</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 200)rotate(-90)"><linearGradient></text> <text x="0" y="0" transform="translate(34 380)rotate(-90)"><radialGradient></text> </g> </g> <rect onload="move(evt)" x="50" y="110" width="100" height="95" style="fill:url(#linearObjectBoundingBox)"/> <rect onload="move(evt)" x="250" y="110" width="100" height="95" style="fill:url(#linearUserSpaceOnUse)"/> <rect onload="move(evt)" x="50" y="300" width="100" height="95" style="fill:url(#radialObjectBoundingBox)"/> <rect onload="move(evt)" x="250" y="300" width="100" height="95" style="fill:url(#radialUserSpaceOnUse)"/> </g> </svg> 1.1 xml-batik/samples/tests/spec/scripting/markerUpdate.svg Index: markerUpdate.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: markerUpdate.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Marker with geometry updates</title> <text x="50%" y="45" class="title">Marker with geometry updates <tspan x="50%" dy="1.1em" style="font-style:italic; font-size:12">(click on all shapes and see <a style="fill:blue" xlink:href="markerUpdateRef.svg">markerUpdateRef.svg</a>)</tspan></text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function changeGeometry(evt) { evt.target.setAttribute("points", "130 150 150 170 110 190 150 210 110 230 150 250 110 270 150 290 110 310 150 330 110 350 130 370"); } </script> <defs> <marker id="markerUserSpaceOnUse" refX="8" refY="8" markerUnits="userSpaceOnUse" markerWidth="16" markerHeight="16"> <circle cx="8" cy="8" r="8" style="fill:#aaa" /> </marker> <marker id="markerStrokeWidth" refX="2" refY="2" markerUnits="strokeWidth" markerWidth="4" markerHeight="4"> <circle cx="2" cy="2" r="2" style="fill:#aaa" /> </marker> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <rect x="20" y="100" width="20" height="380" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">strokeWidth</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 290)rotate(-90)"><marker></text> </g> </g> <polyline onclick="changeGeometry(evt)" 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" style="stroke:black; stroke-width:4; fill:none; marker:url(#markerStrokeWidth)" /> <polyline transform="translate(200 0)" onclick="changeGeometry(evt)" 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" style="stroke:black; stroke-width:4; fill:none; marker:url(#markerUserSpaceOnUse)" /> </g> </svg> 1.1 xml-batik/samples/tests/spec/scripting/markerUpdateRef.svg Index: markerUpdateRef.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: markerUpdateRef.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Marker with geometry updates</title> <text x="50%" y="45" class="title">Marker with geometry updates</text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function changeGeometry(evt) { evt.target.setAttribute("points", "130 150 150 170 110 190 150 210 110 230 150 250 110 270 150 290 110 310 150 330 110 350 130 370"); } </script> <defs> <marker id="markerUserSpaceOnUse" refX="8" refY="8" markerUnits="userSpaceOnUse" markerWidth="16" markerHeight="16"> <circle cx="8" cy="8" r="8" style="fill:#aaa" /> </marker> <marker id="markerStrokeWidth" refX="2" refY="2" markerUnits="strokeWidth" markerWidth="4" markerHeight="4"> <circle cx="2" cy="2" r="2" style="fill:#aaa" /> </marker> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <rect x="20" y="100" width="20" height="380" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">strokeWidth</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 290)rotate(-90)"><marker></text> </g> </g> <polyline onload="changeGeometry(evt)" 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" style="stroke:black; stroke-width:4; fill:none; marker:url(#markerStrokeWidth)" /> <polyline transform="translate(200 0)" onload="changeGeometry(evt)" 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" style="stroke:black; stroke-width:4; fill:none; marker:url(#markerUserSpaceOnUse)" /> </g> </svg> 1.1 xml-batik/samples/tests/spec/scripting/maskClipUpdate.svg Index: maskClipUpdate.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: maskClipUpdate.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Clip and mask with geometry updates</title> <text x="50%" y="45" class="title">Clip and mask with geometry updates <tspan x="50%" dy="1.1em" style="font-style:italic; font-size:12">(click on all shapes and see <a style="fill:blue" xlink:href="maskClipUpdateRef.svg">maskClipUpdateRef.svg</a>)</tspan></text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function move(evt) { var x = parseFloat(evt.target.getAttribute("x")); var y = parseFloat(evt.target.getAttribute("y")); evt.target.setAttribute("x", x+90); evt.target.setAttribute("y", y+85); } </script> <defs> <clipPath id="clipObjectBoundingBox" clipPathUnits="objectBoundingBox"> <circle cx=".5" cy=".5" r=".5" /> </clipPath> <clipPath id="clipUserSpaceOnUse" clipPathUnits="userSpaceOnUse"> <circle cx="340" cy="195" r="80" /> </clipPath> <mask id="maskObjectBoundingBox" maskContentUnits="objectBoundingBox" maskUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> <circle cx=".5" cy=".5" r=".5" fill="white"/> </mask> <mask id="maskUserSpaceOnUse" maskContentUnits="userSpaceOnUse" maskUnits="userSpaceOnUse" x="250" y="300" width="180" height="190"> <circle cx="340" cy="390" r="80" fill="white"/> </mask> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <line x1="20" y1="290" x2="440" y2="290" /> <rect x="20" y="100" width="20" height="190" style="fill:#eee"/> <rect x="20" y="290" width="20" height="190" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">objectBoundingBox</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 200)rotate(-90)"><clipPath></text> <text x="0" y="0" transform="translate(34 380)rotate(-90)"><mask></text> </g> </g> <rect onclick="move(evt)" x="50" y="110" width="90" height="85" style="fill:crimson; clip-path:url(#clipObjectBoundingBox)"/> <rect onclick="move(evt)" x="250" y="110" width="90" height="85" style="fill:crimson; clip-path:url(#clipUserSpaceOnUse)"/> <rect onclick="move(evt)" x="50" y="300" width="90" height="85" style="fill:crimson; mask:url(#maskObjectBoundingBox)"/> <rect onclick="move(evt)" x="250" y="300" width="90" height="85" style="fill:crimson; mask:url(#maskUserSpaceOnUse)"/> </g> </svg> 1.1 xml-batik/samples/tests/spec/scripting/maskClipUpdateRef.svg Index: maskClipUpdateRef.svg =================================================================== <?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"> <!-- ====================================================================== --> <!-- Copyright (C) The Apache Software Foundation. All rights reserved. --> <!-- --> <!-- This software is published under the terms of the Apache Software --> <!-- License version 1.1, a copy of which has been included with this --> <!-- distribution in the LICENSE file. --> <!-- ====================================================================== --> <!-- ====================================================================== --> <!-- check updates on gradients, filter, mask, and clip regarding to --> <!-- geometry updates --> <!-- --> <!-- @author [EMAIL PROTECTED] --> <!-- @version $Id: maskClipUpdateRef.svg,v 1.1 2002/06/10 14:32:15 tkormann Exp $ --> <!-- ====================================================================== --> <?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>Clip and mask with geometry updates</title> <text x="50%" y="45" class="title">Clip and mask with geometry updates</text> <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; function move(evt) { var x = parseFloat(evt.target.getAttribute("x")); var y = parseFloat(evt.target.getAttribute("y")); evt.target.setAttribute("x", x+90); evt.target.setAttribute("y", y+85); } </script> <defs> <clipPath id="clipObjectBoundingBox" clipPathUnits="objectBoundingBox"> <circle cx=".5" cy=".5" r=".5" /> </clipPath> <clipPath id="clipUserSpaceOnUse" clipPathUnits="userSpaceOnUse"> <circle cx="340" cy="195" r="80" /> </clipPath> <mask id="maskObjectBoundingBox" maskContentUnits="objectBoundingBox" maskUnits="objectBoundingBox" x="0" y="0" width="1" height="1"> <circle cx=".5" cy=".5" r=".5" fill="white"/> </mask> <mask id="maskUserSpaceOnUse" maskContentUnits="userSpaceOnUse" maskUnits="userSpaceOnUse" x="250" y="300" width="180" height="190"> <circle cx="340" cy="390" r="80" fill="white"/> </mask> </defs> <g id="test-content"> <g id="board" style="fill:none; stroke:black"> <rect x="40" y="80" width="200" height="20" style="fill:#eee"/> <rect x="240" y="80" width="200" height="20" style="fill:#eee"/> <rect x="40" y="100" width="200" height="380" /> <rect x="240" y="100" width="200" height="380" /> <line x1="20" y1="290" x2="440" y2="290" /> <rect x="20" y="100" width="20" height="190" style="fill:#eee"/> <rect x="20" y="290" width="20" height="190" style="fill:#eee"/> <g style="fill:black; stroke:none; text-anchor:middle"> <text x="134" y="94">objectBoundingBox</text> <text x="314" y="94">userSpaceOnUse</text> <text x="0" y="0" transform="translate(34 200)rotate(-90)"><clipPath></text> <text x="0" y="0" transform="translate(34 380)rotate(-90)"><mask></text> </g> </g> <rect onload="move(evt)" x="50" y="110" width="90" height="85" style="fill:crimson; clip-path:url(#clipObjectBoundingBox)"/> <rect onload="move(evt)" x="250" y="110" width="90" height="85" style="fill:crimson; clip-path:url(#clipUserSpaceOnUse)"/> <rect onload="move(evt)" x="50" y="300" width="90" height="85" style="fill:crimson; mask:url(#maskObjectBoundingBox)"/> <rect onload="move(evt)" x="250" y="300" width="90" height="85" style="fill:crimson; mask:url(#maskUserSpaceOnUse)"/> </g> </svg>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]