menclose-2-circle-ref.html (1393B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <title>menclose circle</title> 5 <meta charset="utf-8"/> 6 <link rel="stylesheet" href="/fonts/ahem.css" /> 7 <style> 8 math, svg { 9 font: 25px/1 Ahem; 10 } 11 </style> 12 <script type="text/javascript"> 13 function doTest() 14 { 15 var box = document.getElementById("circle").getBoundingClientRect(); 16 e = document.getElementById("ellipse"); 17 e.setAttribute("cx", (box.left + box.width/2)); 18 e.setAttribute("rx", (box.width/2)); 19 e.setAttribute("cy", (box.top + box.height/2)); 20 e.setAttribute("ry", (box.height/2)); 21 document.documentElement.removeAttribute("class"); 22 } 23 document.documentElement.addEventListener("TestRendered",doTest); 24 </script> 25 </head> 26 <body> 27 <div style="position: absolute; left: 20px; top: 20px;"> 28 <math> 29 <mphantom> 30 <menclose id="circle" notation="circle"> 31 <mspace width="200px" height="100px"></mspace> 32 </menclose> 33 </mphantom> 34 </math> 35 </div> 36 37 <div style="position: absolute; left: 0px; top: 0px;"> 38 <svg width="500px" height="500px"> 39 <ellipse id="ellipse" style="fill: none; stroke-width: .5em; stroke: green; stroke-linecap: round; shape-rendering: crispEdges;"></ellipse> 40 </svg> 41 </div> 42 43 </body> 44 </html>