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

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 10月 2日 (金) 22:58:01 JST


Revision: 1306
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1306
Author:   dhrname
Date:     2009-10-02 22:58:01 +0900 (Fri, 02 Oct 2009)

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


Modified Paths:
--------------
    branches/DOM/org/w3c/dom/svg.js

Modified: branches/DOM/org/w3c/dom/svg.js
===================================================================
--- branches/DOM/org/w3c/dom/svg.js	2009-10-02 12:42:59 UTC (rev 1305)
+++ branches/DOM/org/w3c/dom/svg.js	2009-10-02 13:58:01 UTC (rev 1306)
@@ -2642,7 +2642,17 @@
 SVGPathElement.prototype = new SVGElement();
 SVGPathElement.prototype.read = function(){
   this.d = this.getNamedItemNS(null, "d").nodeValue;
+  var tra = this.getNamedItemNS(null, "transform").nodeValue;
+  if (tra) {
+    var tta = this.transform.animVal;
+    var commands = tra.match(NAIBU.comR);
+    var degits = tra.match(NAIBU.degR);
+  }
 };
+//あらかじめ正規表現オブジェクトを生成しておく
+NAIBU.comaR = /[A-Za-z]+(?=\s*\()/g;
+NAIBU.degR = /[\-\d\.e]+/g;
+
 SVGPathElement.prototype.set = function( /*float*/ w, /*float*/ h) {
   var dat = "";
   try {
@@ -2653,7 +2663,7 @@
       .replace(/[\s,]{2,}|\s/g, ",")
       .replace(/([\d.])-/g, "$1,-");
     var D = eval('('+dd+')'); //ここまでd属性のパーサ
-    var ttm = this.transformable;
+    var ttm = this.getCTM();
     var preCom;
     var x = 0, y = 0;   //現在の点の絶対座標
     var x0 = 0, y0 = 0; //subpath の始点の絶対座標




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