svnno****@sourc*****
svnno****@sourc*****
2009年 12月 30日 (水) 21:49:00 JST
Revision: 1513 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1513 Author: dhrname Date: 2009-12-30 21:49:00 +0900 (Wed, 30 Dec 2009) Log Message: ----------- STPathオブジェクトの最適化 Modified Paths: -------------- branches/05x/057/sie.js Modified: branches/05x/057/sie.js =================================================================== --- branches/05x/057/sie.js 2009-12-28 10:48:25 UTC (rev 1512) +++ branches/05x/057/sie.js 2009-12-30 12:49:00 UTC (rev 1513) @@ -595,7 +595,7 @@ "q" : 1 }; STPath.prototype.set = function ( /*float*/ w, /*float*/ h) { - var dat = "", _isCorQ = isCorQ; + var dat = "", _isCorQ = isCorQ, _parseInt = parseInt, _eval = eval; try { var dd = this.d .replace(/\s*([A-DF-Z])/gi, '],["$1" ') //convert to JSON array @@ -603,7 +603,7 @@ .replace(b, "]]") .replace(c, ",") .replace(/([\d.])-/g, "$1,-"); - var D = eval('('+dd+')'); //ここまでd属性のパーサ + var D = _eval('('+dd+')'); //ここまでd属性のパーサ var ttm = this.transformable; var preCom; var x = 0, y = 0; //現在の点の絶対座標 @@ -670,8 +670,8 @@ y = F[Fli-1]; var _x, _y; //この変数は初期化されないために必要 for (var j = 1; j < Fli; j += 2) { //CTMで座標変換 - _x = parseInt(tma * F[j] + tmc * F[j+1] + tme, 10); - _y = parseInt(tmb * F[j] + tmd * F[j+1] + tmf, 10); + _x = _parseInt(tma * F[j] + tmc * F[j+1] + tme, 10); + _y = _parseInt(tmb * F[j] + tmd * F[j+1] + tmf, 10); F[j] = _x; F[j+1] = _y; }