[Sie-announce] SIEコード [1508] SVGtoVMLオブジェクトのreadメソッドを高速化

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 12月 27日 (日) 22:38:30 JST


Revision: 1508
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1508
Author:   dhrname
Date:     2009-12-27 22:38:30 +0900 (Sun, 27 Dec 2009)

Log Message:
-----------
SVGtoVMLオブジェクトのreadメソッドを高速化

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

Modified: branches/05x/057/sie.js
===================================================================
--- branches/05x/057/sie.js	2009-12-27 13:35:03 UTC (rev 1507)
+++ branches/05x/057/sie.js	2009-12-27 13:38:30 UTC (rev 1508)
@@ -161,16 +161,17 @@
   return this;
 }
 SVGtoVML.prototype.read = function stvread(/*element*/ ob) {
-  this.rootElement.style.visibility = "hidden";
-  this.vi = new STViewSpec(this.rootElement);
+  var dewp = new Date();
+  var tr = this.rootElement;
+  tr.style.visibility = "hidden";
+  alert((new Date()).getTime() - dewp.getTime());
+  this.vi = new STViewSpec(tr);
   try{
   this.children = []; //子要素
   var sw = this.swi.value, sh = this.shi.value;
   this.getObject("USE", STUseElement, "use", sw, sh); //use要素を先に処理
   var mat = this.vi.set(sw, sh, ob); //返り値はMatrix型
-  var dewp = new Date();
-  this.chset(this.rootElement, mat, sw, sh);
-  alert((new Date()).getTime() - dewp.getTime());
+  this.chset(tr, mat, sw, sh);
   } catch(n) {stlog.add(n,109);}
 };
 SVGtoVML.prototype.getObject = function stvgetob( /*string*/ tag, /*object*/ st, /*string*/nodes, /*float*/w, h) {




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