/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/jax/output/SVG/autoload/menclose.js * * Implements the SVG output for elements. * * --------------------------------------------------------------------- * * Copyright (c) 2011-2013 The MathJax Consortium * * Licensed 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. */MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var h=MathJax.ElementJax.mml,u=MathJax.OutputJax.SVG,e=u.BBOX;e.ELLIPSE=e.Subclass({type:"ellipse",removeable:!1,Init:function(e,m,f,k,c,a){null==a&&(a={});a.fill="none";c&&(a.stroke=c);a["stroke-width"]=k.toFixed(2).replace(/\.?0+$/,"");a.cx=Math.floor(f/2);a.cy=Math.floor((e+m)/2-m);a.rx=Math.floor((f-k)/2);a.ry=Math.floor((e+m-k)/2);this.SUPER(arguments).Init.call(this,a);this.w=this.r=f;this.h=this.H=e;this.d=this.D=m;this.l=0}});e.DLINE=e.Subclass({type:"line",removeable:!1,Init:function(e,m,f,k,c,a,b){null==b&&(b={});b.fill="none";c&&(b.stroke=c);b["stroke-width"]=k.toFixed(2).replace(/\.?0+$/,"");"up"==a?(b.x1=Math.floor(k/2),b.y1=Math.floor(k/2-m),b.x2=Math.floor(f-k/2),b.y2=Math.floor(e-k/2)):(b.x1=Math.floor(k/2),b.y1=Math.floor(e-k/2),b.x2=Math.floor(f-k/2),b.y2=Math.floor(k/2-m));this.SUPER(arguments).Init.call(this,b);this.w=this.r=f;this.h=this.H=e;this.d=this.D=m;this.l=0}});e.FPOLY=e.Subclass({type:"polygon",removeable:!1,Init:function(e,m,f){null==f&&(f={});m&&(f.fill=m);for(var k=[],c=1E8,a=c,b=-c,g=b,d=0,l=e.length;db&&(b=h);hg&&(g=p);pq;q++)r[q]&&(d=g[q],f.Add(e[d[0]+"LINE"](d[1],a,"solid",c.mathcolor),d[2],d[3]));f.Add(k,p+b+a,0,!1,!0);f.Clean();this.SVGhandleSpace(f);this.SVGhandleColor(f);this.SVGsaveData(f);return f},SVGxy:function(e,h){return Math.floor(e)+","+Math.floor(h)}});MathJax.Hub.Startup.signal.Post("SVG menclose Ready");MathJax.Ajax.loadComplete(u.autoloadDir+"/menclose.js")});