⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graphics.js

📁 导诊软件
💻 JS
字号:
// Copyright 2007 Google Inc.// All Rights Reserved.function k(){this.v=0;this.j=1;this.w=2;this.B=0;this.C=1;this.z=1;this.A=3;this.d=0;this.a=1;this.b=2;this.c=3;this.D="";this.F="";this.G=0;var b=navigator.userAgent;this.i=typeof opera!="undefined";this.r=!this.i&&b.indexOf("MSIE")!=-1;this.t=!this.i&&b.indexOf("Safari")!=-1;this.e=[]}k.prototype.f=function(b,f,c){b=12*b/f-6;return c/(1+Math.exp(b))};k.prototype.h=function(b,f,c){b=b/c;var g=Math.log(1-b)-Math.log(b);g=f*(g+6)/12;return g};k.prototype.k=function(b,f){if(this.r){document.styleSheets[0].addRule(b,f)}else{var c=document.createElement("style");c.type="text/css";var g=this.t?"innerText":"innerHTML";c[g]=b+"{"+f+"}";var d=document.getElementsByTagName("head")[0];d.appendChild(c)}};k.prototype.g=function(b,f,c,g,d){var e=document.createElement("div"),a="position: absolute; overflow: hidden; left: ";a+=b;a+="px; top: ";a+=f;a+="px; width: ";a+=c;a+="px; height: ";a+=g;a+="px;";if(d!=null){a+=" opacity: ";a+=d;a+="; filter: alpha(opacity=";a+=Math.round(d*100);a+=");"}e.style.cssText=a;return e};k.prototype.o=function(b,f,c,g){var d=0,e=new Array(2),a=new Array(2),n=false,h=false,o=false,l=false,m=b-1,i=b,p=f,r=f+1;if(c[this.b]>=p&&c[this.b]<r){n=true;e[0]=0;a[0]=c[this.b]-p}if(c[this.c]>=p&&c[this.c]<r){o=true;e[1]=1;a[1]=c[this.c]-p}if(c[this.a]>=m&&c[this.a]<i){l=true;e[1]=c[this.a]-m;a[1]=0}if(c[this.d]>=m&&c[this.d]<i){h=true;e[0]=c[this.d]-m;a[0]=1}if(!h&&!n){return 0}if(n&&o){var j=a[0]<=a[1]?a[0]:a[1],q=a[0]>a[1]?a[0]:a[1];d=j+(q-j)/2}else if(n&&l){d=a[0]*e[1]/2}else if(h&&o){d=1-(1-e[0])*(1-a[1])/2}else if(h&&l){var s=e[0]<=e[1]?e[0]:e[1],t=e[0]>e[1]?e[0]:e[1];d=s+(t-s)/2}d=Math.round(d*100)/100;if(g)d=1-d;return d};k.prototype.p=function(b,f,c,g){var d=new Array(4);d[this.b]=this.f(b-1,c,g);d[this.c]=this.f(b,c,g);d[this.a]=this.h(f,c,g);d[this.d]=this.h(f+1,c,g);return this.o(b,f,d,false)};k.prototype.m=function(b,f,c){if(b==null)return;var g=b.style.color;this.k("#"+b.id+" .curve div","background-color: "+g);var d=parseInt(b.style.width,10),e=parseInt(b.style.height,10);if(d==0||e==0)return;var a;for(var n=0;n<this.e.length;++n){a=this.e[n];if(a.u==d&&a.q==e&&a.l==f&&a.s==c){var h=a.n.cloneNode(true);b.appendChild(h);return}}b.style.display="none";var h=this.g(0,0,d,e);h.className="curve";h.style.zIndex=this.j;h.style.overflow="hidden";h.style.fontSize="1px";var o,l=0,m=0,i=e-1,p=0,r=0;for(var j=0;j<d;++j){if(f)p=i;i=this.f(j,d,e);if(f)i=Math.floor(i);else i=Math.round(i);if(c)l=j;else l=d-j;m=e-i;o=this.g(l,m,1,i);h.appendChild(o);if(f){for(var q=i;q<=p;++q){r=this.p(j,q,d,e);if(c)l=j;else l=d-j;m=e-q-1;o=this.g(l,m,1,1,r);h.appendChild(o)}}}a={u:d,q:e,l:f,s:c,n:h};this.e[this.e.length]=a;b.appendChild(h);b.style.display=""};window["asg"]=k;k.prototype["csc"]=k.prototype.m;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -