svnno****@sourc*****
svnno****@sourc*****
2009年 11月 24日 (火) 22:15:07 JST
Revision: 1434 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1434 Author: dhrname Date: 2009-11-24 22:15:07 +0900 (Tue, 24 Nov 2009) Log Message: ----------- Modified Paths: -------------- branches/05x/055/sie.js Modified: branches/05x/055/sie.js =================================================================== --- branches/05x/055/sie.js 2009-11-24 12:31:14 UTC (rev 1433) +++ branches/05x/055/sie.js 2009-11-24 13:15:07 UTC (rev 1434) @@ -2161,6 +2161,57 @@ matrix = data = t = null; }; +function STSetElement(/*Element*/ ele, /*Matrix*/ matrix, /*float*/w, h) { + var parent = ele.parentNode, pnodeName = parent.nodeName, ancestors = []; + try { + while (pnodeName === "group" || pnodeName === "A" || pnodeName === "DIV") { + parent = parent.parentNode; + pnodeName = parent.nodeName; + ancestors[ancestors.length] = parent; + } + for (var i=ancestors.length-1;i>=0--i) { + matrix = NAIBU.transformToCTM(ancestors[i], matrix); + } + } catch(e) {} + if (parent.nodeName === "shape") { + switch (parent.getAttribute("tag")) { + case "path": + s = new STPath(parent, matrix); + break; + case "rect": + s = new STRectElement(parent, matrix, w, h); + break; + case "circle": + s = new STCircle(parent, matrix, w, h); + break; + case "ellipse": + s = new STEllipse(parent, matrix, w, h); + break; + case "polyline": + s = new STPolyline(parent, matrix); + break; + case "polygon": + s = new STPolygon(parent, matrix); + break; + case "line": + s = new STLine(parent, matrix, w, h); + break; + } + } else if (parent.nodeName === "DIV") { + s = new STText(parent, matrix, w, h); + } else if (parent.nodeName === "group") { + s = new STGroupElement(parent, matrix, w, h); + } else if (parent.nodeName === "A") { + s = new STAElement(parent, matrix); + } else if (parent.nodeName === "image") { + s = new STImage(parent, matrix, w, h); + } + this.target = s; + this.transformable = matrix; + return this; +}; +STSetElement.prototype.set = function (w,h){ +}; function utf16( /*string*/ s) { return unescape(s); }