menclose-2-phasorangle-ref.html (1558B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <title>menclose phasorangle</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("box").getBoundingClientRect(); 16 var w = 8 * 2; // kPhasorangleWidth * rulethickness 17 var H = 2 * w; // slope 2 18 19 document.getElementById("path").setAttribute("d", 20 "M" + (box.right + "," + box.bottom) + 21 "L" + (box.left + "," + box.bottom ) + 22 "l" + ((w) + "," + (-H))); 23 document.documentElement.removeAttribute("class"); 24 } 25 document.documentElement.addEventListener("TestRendered", doTest); 26 </script> 27 </head> 28 <body> 29 30 <div style="position: absolute; left: 20px; top: 20px;"> 31 <math> 32 <mphantom> 33 <menclose id="box" notation="phasorangle"> 34 <mspace width="200px" height="100px"></mspace> 35 </menclose> 36 </mphantom> 37 </math> 38 </div> 39 40 <div style="position: absolute; left: 0px; top: 0px;"> 41 <svg width="500px" height="500px"> 42 <path id="path" style="fill: none; stroke-width: .5em; stroke: green; stroke-linecap: round; shape-rendering: crispEdges;"></path> 43 </svg> 44 </div> 45 46 </body> 47 </html>