coords-dom-03-f-isvalid.html (3724B)
1 <!DOCTYPE html> 2 <html lang='en'> 3 <head> 4 <title>coords-dom-03-f-manual.svg</title> 5 <meta charset='utf-8'> 6 </head> 7 <body> 8 <h1>Source SVG: coords-dom-03-f-manual.svg</h1> 9 <svg id="svg-root" width="100%" height="100%" 10 viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" 11 xmlns:xlink="http://www.w3.org/1999/xlink"> 12 <!--======================================================================--> 13 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =--> 14 <!--= Institute of Technology, European Research Consortium for =--> 15 <!--= Informatics and Mathematics (ERCIM), Keio University). =--> 16 <!--= All Rights Reserved. =--> 17 <!--= See http://www.w3.org/Consortium/Legal/. =--> 18 <!--======================================================================--> 19 20 <title id="test-title">$RCSfile: coords-dom-03-f.svg,v $</title> 21 <defs> 22 <font-face 23 font-family="SVGFreeSansASCII" 24 unicode-range="U+0-7F"> 25 <font-face-src> 26 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> 27 </font-face-src> 28 </font-face> 29 </defs> 30 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> 31 32 <text x='10' y='30' font-size='14'>Test that some methods taking an SVGMatrix take a copy of it</text> 33 34 <rect id='r1' x='10' y='50' width='50' height='50'/> 35 <rect id='r2' x='10' y='110' width='50' height='50'/> 36 <rect id='r3' x='10' y='170' width='50' height='50'/> 37 <g font-size='10'> 38 <text x='70' y='80'>SVGTransformList.createSVGTransformFromMatrix()</text> 39 <text x='70' y='140'>SVGSVGElement.createSVGTransformFromMatrix()</text> 40 <text x='70' y='200'>SVGTransform.setMatrix()</text> 41 </g> 42 43 <g id='g' transform='scale(5)'/> 44 45 <script><![CDATA[ 46 var svg = document.documentElement, 47 g = document.getElementById('g'), 48 r1 = document.getElementById('r1'), 49 r2 = document.getElementById('r2'), 50 r3 = document.getElementById('r3'); 51 52 var m1 = svg.createSVGMatrix(), 53 m2 = svg.createSVGMatrix(), 54 m3 = svg.createSVGMatrix(); 55 56 var t; 57 58 m1.a = 3; m1.b = 0; m1.c = 0; m1.d = 1; m1.e = 0; m1.f = 0; 59 m2.a = 3; m2.b = 0; m2.c = 0; m2.d = 1; m2.e = 0; m2.f = 0; 60 m3.a = 3; m3.b = 0; m3.c = 0; m3.d = 1; m3.e = 0; m3.f = 0; 61 62 try { 63 t = g.transform.baseVal.createSVGTransformFromMatrix(m1); 64 m1.a = 2; 65 r1.setAttribute('fill', t.matrix != m1 && t.matrix.a == 3 ? 'lime' : 'red'); 66 } catch (e) { 67 } 68 69 try { 70 t = svg.createSVGTransformFromMatrix(m2); 71 m2.a = 2; 72 r2.setAttribute('fill', t.matrix != m2 && t.matrix.a == 3 ? 'lime' : 'red'); 73 } catch (e) { 74 } 75 76 try { 77 t = g.transform.baseVal.getItem(0); 78 t.setMatrix(m3); 79 m3.a = 2; 80 r3.setAttribute('fill', t.matrix != m3 && t.matrix.a == 3 ? 'lime' : 'red'); 81 } catch (e) { 82 } 83 ]]></script> 84 85 </g> 86 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> 87 <text id="revision" x="10" y="340" stroke="none" 88 fill="black">$Revision: 1.7 $</text> 89 </g> 90 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> 91 <!-- comment out this watermark once the test is approved --> 92 <!--<g id="draft-watermark"> 93 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> 94 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 95 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> 96 </g>--> 97 </svg> 98 </body> 99 </html>