svnno****@sourc*****
svnno****@sourc*****
2009年 3月 11日 (水) 22:14:22 JST
Revision: 1064
http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1064
Author: dhrname
Date: 2009-03-11 22:14:22 +0900 (Wed, 11 Mar 2009)
Log Message:
-----------
radialGradient要素のグラデーションの表示
Modified Paths:
--------------
branches/04x/044/sie.js
Modified: branches/04x/044/sie.js
===================================================================
--- branches/04x/044/sie.js 2009-03-11 12:28:55 UTC (rev 1063)
+++ branches/04x/044/sie.js 2009-03-11 13:14:22 UTC (rev 1064)
@@ -832,7 +832,6 @@
var ele = this.tar;
ele.setAttribute("path", dat);
ele.setAttribute("coordsize", w + " " + h);
- this.paint.mx = x; this.paint.my = y; this.paint.mright = xw; this.paint.mbottom = yh;
this.paint.set(w, h, ttm);
} catch(ee) {stlog.add(ee,576);}
}
@@ -1257,6 +1256,15 @@
ele.setAttribute("type", "gradientTitle");
ele.setAttribute("focus", "100%");
ele.setAttribute("focusposition", "0.5 0.5");
+ var degis = (this.tar.getAttribute("path")+"").match(/[0-9\-]+/g);
+ var el = this.w, et = this.h, er = 0, eb = 0;
+ for (var i=0,degisli=degis.length;i<degisli;i+=2) {
+ var nx = parseInt(degis[i]), ny = parseInt(degis[i+1]);
+ el = el > nx ? nx : el;
+ et = et > ny ? ny : et;
+ er = er > nx ? er : nx;
+ eb = eb > ny ? eb : ny;
+ }
var outline = document.getElementById("_NAIBU_outline");
var background = document.createElement("div"), gradient = document.createElement("div");
background.style.position = "absolute"; gradient.style.position = "absolute";
@@ -1266,7 +1274,7 @@
background.style.filter = "progid:DXImageTransform.Microsoft.Compositor";
background.filters.item('DXImageTransform.Microsoft.Compositor').Function = 23;
var elout = ele.outerHTML;
- var et = this.my, el = this.mx, er = this.mright, eb = this.mbottom, er2 = er - el / 2;
+ var er2 = er - el / 2;
var ellipse = "ar " +el+ "," +et+ "," +er+ "," +eb+ " " +er2+ ",0 " +er2+ ",0 e";
var coord = 'coordsize="' +this.w+ ' ' +this.h+ '"';
background.innerHTML = '<v:shape style="position:relative;"' +coord+ 'path="' +data+ '" stroked="f" fillcolor="' +color[color.length-1]+ '" />';
@@ -1275,7 +1283,7 @@
background.innerHTML = '<v:shape style="position:relative; antialias:false;"' +coord+ 'path="' +ellipse+ '" stroked="f">' +elout+ '</v:shape>';
background.filters[0].play();
this.tar.parentNode.insertBefore(background, this.tar);
- background.style.left = "-40";
+ background.style.left = "-40"; //ずれを修正
this.tar.setAttribute("filled", "false");
return true;
} catch(e) {stlog.add(e,1175);}