[Sie-announce] SIEコード [1119]

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 5日 (日) 21:22:28 JST


Revision: 1119
          http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1119
Author:   dhrname
Date:     2009-04-05 21:22:28 +0900 (Sun, 05 Apr 2009)

Log Message:
-----------


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

Modified: branches/04x/046/sie.js
===================================================================
--- branches/04x/046/sie.js	2009-04-04 14:10:07 UTC (rev 1118)
+++ branches/04x/046/sie.js	2009-04-05 12:22:28 UTC (rev 1119)
@@ -181,8 +181,8 @@
   backr.style.width = w+ "px";
   backr.style.height = h+ "px";
   backr.style.zIndex = -1;
-  backr.setAttribute("stroked", "false");
-  backr.setAttribute("filled", "false");
+  backr.stroked = "false";
+  backr.filled = "false";
   this.rootElement.appendChild(backr);
   var trstyle = this.rootElement.style;
   var tpstyle = ob.style;
@@ -416,8 +416,8 @@
     backrs.height = "1px";
     backrs.left = "0px";
     backrs.top = "0px";
-    backr.setAttribute("stroked", "false");
-    backr.setAttribute("filled", "false");
+    backr.stroked = "false";
+    backr.filled = "false";
     ttp.appendChild(backr);
   }
   tts.width = "0px";
@@ -1019,42 +1019,42 @@
       fillElement.color = this.color(this.fill);
       var fillOpacity = this.fillopacity * this.opacity; //opacityを掛け合わせる
       if (fillOpacity < 1) {
-        fillElement.setAttribute("opacity", fillOpacity);
+        fillElement.opacity = fillOpacity;
       }
     }
-    } catch(e) {stlog.add(e,682); fillElement.setAttribute("on", "true");
-    fillElement.setAttribute("color", "black");}
+    } catch(e) {stlog.add(e,682); fillElement.on = "true";
+    fillElement.color = "black";}
     if (!isRadial) {
       el.appendChild(fillElement);
     }
     isRadial = fillOpacity = null;
   }
   if (this.stroke === "none") {
-    el.setAttribute("stroked", "false");
+    el.stroked = "false";
   } else {
     var strokeElement = document.createElement("v:stroke");
     try {
     var sw = new STLength(this.strokewidth, Math.sqrt((w*w + h*h) / 2));
     var swx = sw.value * Math.sqrt(Math.abs(matrix.determinant()));
-    strokeElement.setAttribute("weight", swx + "px");
+    strokeElement.weight = swx + "px";
     if (this.stroke.match(/url\(#([^)]+)/)) {
       this.gradient(strokeElement, RegExp.$1);
     } else {
-      strokeElement.setAttribute("color", this.color(this.stroke));
+      strokeElement.color = this.color(this.stroke);
       var strokeOpacity = this.strokeopacity * this.opacity; //opacityを掛け合わせる
       if (swx < 1) {
         strokeOpacity *= swx; //太さが1px未満なら色を薄くする
       }
       if (strokeOpacity < 1) {
-        strokeElement.setAttribute("opacity", strokeOpacity);
+        strokeElement.opacity = strokeOpacity;
       }
     }
-    strokeElement.setAttribute("miterlimit", this.strokemiterlimit);
-    strokeElement.setAttribute("joinstyle", this.strokelinejoin);
+    strokeElement.miterlimit = this.strokemiterlimit;
+    strokeElement.joinstyle = this.strokelinejoin;
     if (this.strokelinecap === "butt") {
-      strokeElement.setAttribute("endcap", "flat");
+      strokeElement.endcap = "flat";
     } else {
-      strokeElement.setAttribute("endcap", this.strokelinecap);
+      strokeElement.endcap = this.strokelinecap;
     }
     var tsd = this.strokedasharray;
     if (tsd !== "none") {
@@ -1068,9 +1068,9 @@
           this.strokedasharray += " " + this.strokedasharray;
         }
       }
-      strokeElement.setAttribute("dashstyle", this.strokedasharray);
+      strokeElement.dashstyle = this.strokedasharray;
     }
-    } catch(e) {stlog.add(e,720); strokeElement.setAttribute("on", "false");}
+    } catch(e) {stlog.add(e,720); strokeElement.on =  "false";}
     el.appendChild(strokeElement);
     sw = tsd = null;
   }
@@ -1245,12 +1245,12 @@
     colors[i] = stop.getAttribute("offset") + " " + color[i];
     opacity[i] = (stop.style.stopopacity || stop.getAttribute("stopopacity") || 1) * this.fillopacity * this.opacity;
   }
-  ele.setAttribute("method", "none");
-  ele.setAttribute("color",  color[0]);
-  ele.setAttribute("color2", color[length-1]);
-  ele.setAttribute("colors", colors.join(","));
+  ele.method = "none";
+  ele.color = color[0];
+  ele.color2 = color[length-1];
+  ele.colors = colors.join(",");
   // When colors attribute is used, the meanings of opacity and o:opacity2 are reversed.
-  ele.setAttribute("opacity", opacity[length-1]);
+  ele.opacity = opacity[length-1];
   ele.setAttribute("o:opacity2", opacity[0]);
   var type = grad.getAttribute("type");
   if (type === "gradient") {
@@ -1265,14 +1265,14 @@
       angle -= 360;
     }
   } catch(e) {stlog.add(e,749); angle = 270;}
-    ele.setAttribute("type", "gradient");
-    ele.setAttribute("angle", angle + "");
+    ele.type = "gradient";
+    ele.angle = angle + "";
     x1 = y1 = x2 = y2 = angle = null;
   } else if (type === "gradientRadial") {
   try{
-    ele.setAttribute("type", "gradientTitle");
-    ele.setAttribute("focus", "100%");
-    ele.setAttribute("focusposition", "0.5 0.5");
+    ele.type = "gradientTitle";
+    ele.focus = "100%";
+    ele.focusposition = "0.5 0.5";
     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(/%/, ""));
@@ -1319,7 +1319,7 @@
     background.innerHTML = circle;
     background.filters[0].play();
     this.tar.parentNode.insertBefore(background, this.tar);
-    this.tar.setAttribute("filled", "false");
+    this.tar.filled = "false";
     ellipse = circle = data = list = pl = plm = gt = cx = cy = r = null;
     return true;
   }




Sie-announce メーリングリストの案内
Back to archive index