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

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2009年 12月 21日 (月) 21:28:55 JST


Revision: 1487
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1487
Author:   dhrname
Date:     2009-12-21 21:28:55 +0900 (Mon, 21 Dec 2009)

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


Modified Paths:
--------------
    branches/05x/056/sie.js

Modified: branches/05x/056/sie.js
===================================================================
--- branches/05x/056/sie.js	2009-12-21 12:22:16 UTC (rev 1486)
+++ branches/05x/056/sie.js	2009-12-21 12:28:55 UTC (rev 1487)
@@ -587,16 +587,22 @@
   this.paint = new _ni.PaintColor(ele);
   this.transformable = _ni.transformToCTM(ele,matrix);
   return this;
-}
+};
+(function (){
+  var a = /\s*([A-DF-Z])/gi,
+      b = /^\],/,
+      c = /\s*$/,
+      d = /[\s,]{2,}|\s/g,
+      e = /([\d.])-/g;
 STPath.prototype.set = function ( /*float*/ w, /*float*/ h) {
   var dat = "";
   try {
     var dd = this.d
-      .replace(/\s*([A-DF-Z])/gi, '],["$1" ') //convert to JSON array
-      .replace(/^\],/, "[")
-      .replace(/\s*$/, "]]")
-      .replace(/[\s,]{2,}|\s/g, ",")
-      .replace(/([\d.])-/g, "$1,-");
+      .replace(a, '],["$1" ') //convert to JSON array
+      .replace(b, "[")
+      .replace(c, "]]")
+      .replace(d, ",")
+      .replace(e, "$1,-");
     var D = eval('('+dd+')'); //ここまでd属性のパーサ
     var ttm = this.transformable;
     var preCom;
@@ -686,7 +692,7 @@
     dat = this.paint = ttm = this.transformable = this.d = preCom = x = y = x0 = y0 = dx = dy = tma = tmb = tmc = tmd = tme = tmf = w = h = null; //解放
   } catch(e) {stlog.add(e,372);}
 };
-
+})();
 //QからCに変換
 NAIBU.qtoc = function (/*float*/ x, /*float*/ y, /*Array*/ F) {
   F[0] = "c";




Sie-announce メーリングリストの案内
Zurück zum Archiv-Index