[Sie-announce] SIEコード [1128] 1, gradient関連のプロパティ設定を、属性設定に変更

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2009年 5月 2日 (土) 22:07:52 JST


Revision: 1128
          http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1128
Author:   dhrname
Date:     2009-05-02 22:07:52 +0900 (Sat, 02 May 2009)

Log Message:
-----------
1, gradient関連のプロパティ設定を、属性設定に変更
2, 4wd.svgがひょうじできないので、rect要素のみに、filter方式のradialGradient要素を適用

Modified Paths:
--------------
    branches/04x/046/sie.js

Modified: branches/04x/046/sie.js
===================================================================
--- branches/04x/046/sie.js	2009-04-30 14:34:53 UTC (rev 1127)
+++ branches/04x/046/sie.js	2009-05-02 13:07:52 UTC (rev 1128)
@@ -1242,12 +1242,12 @@
     colors[i] = stop.getAttribute("offset") + " " + color[i];
     opacity[i] = (stop.style.stopopacity || stop.getAttribute("stopopacity") || 1) * this.fillopacity * this.opacity;
   }
-  ele.method = "none";
-  ele.color = color[0];
-  ele.color2 = color[length-1];
-  ele.colors = colors.join(",");
+  ele.setAttribute("method", "none");
+  ele.setAttribute("color",  color[0]);
+  ele.setAttribute("color2", color[length-1]);
+  ele.setAttribute("colors", colors.join(","));
   // When colors attribute is used, the meanings of opacity and o:opacity2 are reversed.
-  ele.opacity = opacity[length-1];
+  ele.setAttribute("opacity", opacity[length-1]);
   ele.setAttribute("o:opacity2", opacity[0]);
   var type = grad.getAttribute("type");
   if (type === "gradient") {
@@ -1262,14 +1262,15 @@
       angle -= 360;
     }
   } catch(e) {stlog.add(e,749); angle = 270;}
-    ele.type = "gradient";
-    ele.angle = angle + "";
+    ele.setAttribute("type", "gradient");
+    ele.setAttribute("angle", angle + "");
     x1 = y1 = x2 = y2 = angle = null;
   } else if (type === "gradientRadial") {
   try{
-    ele.type = "gradientTitle";
-    ele.focus = "100%";
-    ele.focusposition = "0.5 0.5";
+    ele.setAttribute("type", "gradientTitle");
+    ele.setAttribute("focus", "100%");
+    ele.setAttribute("focusposition", "0.5 0.5");
+    if (this.tar.getAttribute("tag") === "rect") {
     var cx = parseFloat((grad.getAttribute("cx") || "0.5").replace(/%/, ""));
     var cy = parseFloat((grad.getAttribute("cy") || "0.5").replace(/%/, ""));
     var r = rx = ry = parseFloat((grad.getAttribute("r") || "0.5").replace(/%/, ""));
@@ -1311,14 +1312,17 @@
     background.filters.item('DXImageTransform.Microsoft.Compositor').Function = 23;
     var circle = '<v:shape style="position:relative; antialias:false; top:0px; left:0px;" coordsize="' +this.w+ ' ' +this.h+ '" path="' +ellipse+ '" stroked="f">' +ele.outerHTML+ '</v:shape>';
     background.innerHTML = '<v:shape style="position:relative; top:0px; left:0px;" coordsize="' +this.w+ ' ' +this.h+ '" path="' +data+ '" stroked="f" fillcolor="' +color[color.length-1]+ '" ></v:shape>';
-    } catch(e) {stlog.add(e,1175);}
     background.filters[0].apply();
     background.innerHTML = circle;
     background.filters[0].play();
     this.tar.parentNode.insertBefore(background, this.tar);
     this.tar.filled = "false";
     ellipse = circle = data = list = pl = plm = gt = cx = cy = r = null;
+    } else {
+      return false;
+    }
     return true;
+    } catch(e) {stlog.add(e,1175);}
   }
   } else {
     return false;




Sie-announce メーリングリストの案内
アーカイブの一覧に戻る