svnno****@sourc*****
svnno****@sourc*****
2010年 1月 15日 (金) 20:56:36 JST
Revision: 1576 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1576 Author: dhrname Date: 2010-01-15 20:56:36 +0900 (Fri, 15 Jan 2010) Log Message: ----------- try構文を見直して高速化 Modified Paths: -------------- branches/05x/058/sie.js Modified: branches/05x/058/sie.js =================================================================== --- branches/05x/058/sie.js 2010-01-13 13:46:42 UTC (rev 1575) +++ branches/05x/058/sie.js 2010-01-15 11:56:36 UTC (rev 1576) @@ -280,7 +280,6 @@ var te = ele.firstChild; if (!!te) { do { - try{ if (name.indexOf(te.nodeName) === -1) { //タグ名が一致しないのであれば var ns = te.nextSibling; //次のノードをnsに収納 var er = ele.removeChild(te); @@ -317,7 +316,6 @@ } te = te.nextSibling; } - } catch(e){stlog.add(e,3002); te=null;} } while (te); } nods = name = gname = matrix = cmatrix = w = h = null; @@ -403,15 +401,13 @@ //g要素の処理 function STGroupElement( /*element*/ g, /*Matrix*/ matrix, /*float*/w, h) { - try{ - this.tar = g; - var _ni = NAIBU; //Alias - this.transformable = _ni.transformToCTM(g,matrix); //g要素のtransform属性を前もって処理 - //以下、ツリーとして処理 - this.children = []; - this.chset(g,this.transformable, w, h); - w = h = null; - } catch(e){stlog.add(e,3144);} + this.tar = g; + var _ni = NAIBU; //Alias + this.transformable = _ni.transformToCTM(g,matrix); //g要素のtransform属性を前もって処理 + //以下、ツリーとして処理 + this.children = []; + this.chset(g,this.transformable, w, h); + w = h = null; return this; } STGroupElement.prototype.set = function(sw,sh) { @@ -755,14 +751,12 @@ com = F = null; } D = dd = Fli = null; //解放 - } catch(e) {if(this.d == ""){/*d属性が空*/}else{stlog.add(e,355);}} - try { var ele = this.tar; ele.path = dat + " e"; ele.coordsize = w + " " + h; this.paint.set(w, h, ttm); ele = dat = this.paint = ttm = this.transformable = preCom = x = y = x0 = y0 = dx = dy = tma = tmb = tmc = tmd = tme = tmf = w = h = null; //解放 - } catch(e) {stlog.add(e,372);} + } catch(e) {if(this.d == ""){/*d属性が空*/}else{stlog.add(e,372);}} }; })(); //QからCに変換 @@ -2238,7 +2232,7 @@ var path = ti.ownerDocument.createElementNS(NAIBU.svgNameSpace, "path"); //advance、すなわち字幅の長さ分、ずらしていく ti.parentNode.insertBefore(path, ti); - path.style.cssText = style.cssText; + path.setAttributeNS(null, "style", style.cssText); var matrix = new Matrix(fe, 0, 0, -fe, 0, 0); if (isTategaki) { var y= dy + adv*fe, x = dx;