From a7eade3f9e0421cc950525c073b0191b1027d0b8 Mon Sep 17 00:00:00 2001 From: dhrname Date: Mon, 15 Sep 2014 22:11:46 +0900 Subject: [PATCH] =?utf8?q?svg.js=E3=81=A7=E5=AE=9A=E7=BE=A9=E3=81=95?= =?utf8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E5=8D=98=E4=BD=8D=E3=82=A4?= =?utf8?q?=E3=83=B3=E3=82=BF=E3=83=BC=E3=83=95=E3=82=A7=E3=83=BC=E3=82=B9?= =?utf8?q?=E3=82=92base=E9=96=A2=E6=95=B0=E3=82=92=E4=BD=BF=E3=81=A3?= =?utf8?q?=E3=81=A6=E3=80=81=E3=82=AA=E3=83=96=E3=82=B8=E3=82=A7=E3=82=AF?= =?utf8?q?=E3=83=88=E3=81=AB=E5=A4=89=E6=8F=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- org/w3c/dom/svg.js | 184 ++++++++++++++++++++++++++--------------------------- 1 file changed, 90 insertions(+), 94 deletions(-) diff --git a/org/w3c/dom/svg.js b/org/w3c/dom/svg.js index 483fbad..2e443cf 100644 --- a/org/w3c/dom/svg.js +++ b/org/w3c/dom/svg.js @@ -359,7 +359,7 @@ base("$document").$element.up("$svgelement").mix( { /*interface SVGLocatable*/ /*SVGRect*/ getBBox: function(){ - var s = new SVGRect(), + var s = base("$SVGRect").up("$1"), data = this._tar.path.value, vi = this.ownerDocument.documentElement.viewport, el = vi.width, @@ -507,35 +507,34 @@ base("$SVGStringList").mix(Array.prototype) this.up("$SVGPathSegList"); } ); -function SVGAnimatedEnumeration() { - /*unsigned short*/ this.baseVal = 0; +base("$SVGAnimatedEnumeration").mix( { + /*unsigned short*/ baseVal: 0, // raises DOMException on setting - /*readonly unsigned short*/ this.animVal = 0; -}; -function SVGAnimatedInteger() { - /*long*/ this.baseVal = 0; + /*readonly unsigned short*/ animVal: 0 +} ); +base("$SVGAnimatedInteger").mix( { + /*long*/ baseVal: 0, // raises DOMException on setting - /*readonly long*/ this.animVal = 0; -}; -function SVGNumber() { - /*float*/ this.value = 0; + /*readonly long*/ animVal: 0 +} ); +base("$SVGNumber") + /*float*/ .value = 0; // raises DOMException on setting -}; -function SVGAnimatedNumber() { - /*float*/ this.baseVal = this.animVal = 0; -}; +base("$SVGAnimatedNumber").mix( { + /*float*/ baseVal: 0, + /*float*/ animVal: 0 +} ); /*SVGUnmberListのメソッドはSVGStringListを参照*/ function SVGAnimatedNumberList() { /*readonly SVGNumberList*/ this.animVal = this.baseVal = base("$SVGStringList").$SVGNumberList.up("$1"); }; -/*SVGLengthクラス +/*$SVGLengthオブジェクト *長さを設定する(単位pxに統一する方便として使う) *valueInSpecifiedUnitsプロパティはpxに統一する前の数値。valueプロパティはpxに統一した後の数値 */ -function SVGLength() { -}; +base("$SVGLength").mix( { /*(function(t) { // Length Unit Types /*const unsigned short t.SVG_LENGTHTYPE_UNKNOWN = 0; @@ -551,7 +550,7 @@ function SVGLength() { /*const unsigned short t.SVG_LENGTHTYPE_PC = 10; })(SVGLength);*/ -SVGLength.prototype = { + /*readonly attribute unsigned short*/ unitType : /*SVGLength.SVG_LENGTHTYPE_UNKNOWN*/ 0, /*attribute float*/ value : 0, //利用単位における値 /*attribute float*/ valueInSpecifiedUnits : /*SVGLength.SVG_LENGTHTYPE_UNKNOWN*/ 0, //unitTypeにおける値 @@ -628,10 +627,10 @@ SVGLength.prototype = { this.newValueSpecifiedUnits(this.unitType, this.valueInSpecifiedUnits); } } -}; +} ); function SVGAnimatedLength() { /*readonly SVGLength*/ this.animVal; - this.baseVal = new SVGLength(); + this.baseVal = base("$SVGLength").up("$1"); this.baseVal.unitType = 1; }; @@ -640,9 +639,8 @@ function SVGAnimatedLength() { function SVGAnimatedLengthList() { /*readonly SVGLengthList*/ this.animVal = this.baseVal = base("$SVGStringList").$SVGLengthList.up("$1");; }; -function SVGAngle() { -}; -SVGAngle.prototype = { + +base("$SVGAngle").mix( { /*readonly attribute unsigned short*/ unitType : 0, /*attribute float*/ value : 0, // raises DOMException on setting @@ -683,7 +681,7 @@ SVGAngle.prototype = { this.newValueSpecifiedUnits(unitType, v); //raises( DOMException ); } -}; +} ); // Angle Unit Types /*const unsigned short SVGAngle.SVG_ANGLETYPE_UNKNOWN = 0; /*const unsigned short SVGAngle.SVG_ANGLETYPE_UNSPECIFIED = 1; @@ -691,8 +689,8 @@ SVGAngle.prototype = { /*const unsigned short SVGAngle.SVG_ANGLETYPE_RAD = 3; /*const unsigned short SVGAngle.SVG_ANGLETYPE_GRAD = 4;*/ function SVGAnimatedAngle() { - /*readonly attribute SVGAngle*/ this.baseVal = new SVGAngle(); - /*readonly attribute SVGAngle*/ this.animVal = this.baseVal; + /*readonly attribute SVGAngle*/ this.baseVal = base("$SVGAngle").up("$1"); + /*readonly attribute SVGAngle*/ this.animVal = base("$SVGAngle").up("$1"); }; base("$CSSValue").up("$SVGColor").mix( { @@ -920,19 +918,20 @@ _keywords: { } } ); -function SVGRect() { - /*float*/ this.x = 0; +base("$SVGRect").mix( { + /*float*/ x: 0, // raises DOMException on setting - /*float*/ this.y = 0; + /*float*/ y: 0, // raises DOMException on setting - /*float*/ this.width = 0; + /*float*/ width: 0, // raises DOMException on setting - /*float*/ this.height = 0; + /*float*/ height: 0 // raises DOMException on setting -}; +} ); function SVGAnimatedRect() { - /*readonly SVGRect*/ this.animVal = this.baseVal = new SVGRect(); + /*readonly SVGRect*/ this.baseVal = base("$SVGRect").up("$1"); +/*readonly SVGRect*/ this.animVal = base("$SVGRect").up("$1"); }; /*SVGUnitTypes = { @@ -1392,30 +1391,27 @@ base("$document").$element.$svgelement.up("http://www.w3.org/2000/svgsvg").on("i this._currentTime = seconds; }, /*SVGNumber*/ createSVGNumber: function(){ - var s = new SVGNumber(); - s.value = 0; - return s; + return base("$SVGNumber").up("$1"); }, /*SVGAngle*/ createSVGAngle: function(){ - var s = new SVGAngle(); - s.value = 0; + var s = base("$SVGAngle").up("$1"); s.unitType = 1; return s; }, /*SVGLength*/ createSVGLength: function(){ - var s = new SVGLength(); + var s = base("$SVGLength").up("$1"); s.unitType = /*SVG_LENGTHTYPE_NUMBER*/ 1; return s; }, /*SVGPoint*/ createSVGPoint: function(){ - return new SVGPoint(); + return base("$SVGPoint").up("$1"); }, /*SVGMatrix*/ createSVGMatrix: function(){ //単位行列を作成 - return new SVGMatrix(); + return base("$SVGMatrix").up("$1"); }, /*SVGRect*/ createSVGRect: function(){ - return new SVGRect(); + return base("$SVGRect").up("$1"); }, /*SVGTransform*/ createSVGTransform: function(){ var s = this.createSVGTransformFromMatrix(this.createSVGMatrix()); @@ -2117,18 +2113,19 @@ function SVGStyleElement(_doc) { /*SVGPoint *2次元座標の点(x,y)を表すオブジェクト */ -function SVGPoint() { -}; -/*float*/SVGPoint.prototype.x = SVGPoint.prototype.y = 0; -SVGPoint.prototype.matrixTransform = function(/*SVGMatrix*/ matrix ) { - if (!isFinite(matrix.a) || !isFinite(matrix.b) || !isFinite(matrix.c) || !isFinite(matrix.d) || !isFinite(matrix.e) || !isFinite(matrix.f)) { - throw (new Error("Type Error: 引数の値がNumber型ではありません")); +base("$SVGPoint").mix( { + /*float*/ x: 0, + /*float*/ y: 0, + matrixTransform: function(/*SVGMatrix*/ matrix ) { + if (!isFinite(matrix.a) || !isFinite(matrix.b) || !isFinite(matrix.c) || !isFinite(matrix.d) || !isFinite(matrix.e) || !isFinite(matrix.f)) { + throw (new Error("Type Error: 引数の値がNumber型ではありません")); + } + var s = base("$SVGPoint").up("$1"); + s.x = matrix.a * this.x + matrix.c * this.y + matrix.e; + s.y = matrix.b * this.x + matrix.d * this.y + matrix.f; + return s; } - var s = new SVGPoint(); - s.x = matrix.a * this.x + matrix.c * this.y + matrix.e; - s.y = matrix.b * this.x + matrix.d * this.y + matrix.f; - return s; -}; +} ); /*SVGPointListのメソッドはSVGStringListを参照*/ @@ -2139,9 +2136,7 @@ SVGPoint.prototype.matrixTransform = function(/*SVGMatrix*/ matrix ) { *[b d f] *[0 0 1] */ -function SVGMatrix() { -}; -SVGMatrix.prototype = { +base("$SVGMatrix").mix( { /*float*/ a : 1, /*float*/ b : 0, /*float*/ c : 0, @@ -2152,7 +2147,7 @@ SVGMatrix.prototype = { *行列の積を求めて返す */ /*SVGMatrix*/ multiply : function(/*SVGMatrix*/ secondMatrix ) { - var s = new SVGMatrix(), + var s = base("$SVGMatrix").up("$1"), m = secondMatrix, isf = isFinite, t = this; @@ -2172,7 +2167,8 @@ SVGMatrix.prototype = { *逆行列を返す */ /*SVGMatrix*/ inverse : function() { - var s = new SVGMatrix(), n = this._determinant(); + var s = base("$SVGMatrix").up("$1"), + n = this._determinant(); if (n !== 0) { s.a = this.d / n; s.b = -this.b / n; @@ -2186,7 +2182,7 @@ SVGMatrix.prototype = { } }, /*SVGMatrix*/ translate : function(/*float*/ x, /*float*/ y ) { - var m = new SVGMatrix(); + var m = base("$SVGMatrix").up("$1"); m.e = x; m.f = y; var s = this.multiply(m); @@ -2194,7 +2190,7 @@ SVGMatrix.prototype = { return s; }, /*SVGMatrix*/ scale : function(/*float*/ scaleFactor ) { - var m = new SVGMatrix(); + var m = base("$SVGMatrix").up("$1"); m.a = scaleFactor; m.d = scaleFactor; var s = this.multiply(m); @@ -2202,7 +2198,7 @@ SVGMatrix.prototype = { return s; }, /*SVGMatrix*/ scaleNonUniform : function(/*float*/ scaleFactorX, /*float*/ scaleFactorY ) { - var m = new SVGMatrix(); + var m = base("$SVGMatrix").up("$1"); m.a = scaleFactorX; m.d = scaleFactorY; var s = this.multiply(m); @@ -2210,7 +2206,7 @@ SVGMatrix.prototype = { return s; }, /*SVGMatrix*/ rotate : function(/*float*/ angle ) { - var m = new SVGMatrix(), rad = angle / 180 * Math.PI; //ラジアン変換 + var m = base("$SVGMatrix").up("$1"), rad = angle / 180 * Math.PI; //ラジアン変換 m.a = Math.cos(rad); m.b = Math.sin(rad); m.c = -m.b; @@ -2224,7 +2220,7 @@ SVGMatrix.prototype = { if ((x === 0) || (y === 0) || !isFinite(x) || !isFinite(y)) { throw (new SVGException(/*SVGException.SVG_INVALID_VALUE_ERR*/ 1)); } - var m = new SVGMatrix(), rad = Math.atan2(y, x); + var m = base("$SVGMatrix").up("$1"), rad = Math.atan2(y, x); m.a = Math.cos(rad); m.b = Math.sin(rad); m.c = -m.b; @@ -2234,28 +2230,28 @@ SVGMatrix.prototype = { return s; }, /*SVGMatrix*/ flipX : function() { - var m = new SVGMatrix(); + var m = base("$SVGMatrix").up("$1"); m.a = -m.a; var s = this.multiply(m); m = void 0; return s; }, /*SVGMatrix*/ flipY : function() { - var m = new SVGMatrix(); + var m = base("$SVGMatrix").up("$1"); m.d = -m.d; var s = this.multiply(m); m = void 0; return s; }, /*SVGMatrix*/ skewX : function(/*float*/ angle ){ - var m = new SVGMatrix(), rad = angle / 180 * Math.PI; //ラジアン変換 + var m = base("$SVGMatrix").up("$1"), rad = angle / 180 * Math.PI; //ラジアン変換 m.c = Math.tan(rad); var s = this.multiply(m); m = void 0; return s; }, /*SVGMatrix*/ skewY : function(/*float*/ angle ){ - var m = new SVGMatrix(), rad = angle / 180 * Math.PI; + var m = base("$SVGMatrix").up("$1"), rad = angle / 180 * Math.PI; m.b = Math.tan(rad); var s = this.multiply(m); m = void 0; @@ -2265,10 +2261,10 @@ SVGMatrix.prototype = { /*float*/ _determinant : function() { return (this.a * this.d - this.b * this.c); } -}; +} ); function SVGTransform() { - /*readonly SVGMatrix*/ this.matrix = new SVGMatrix(); + /*readonly SVGMatrix*/ this.matrix = base("$SVGMatrix").up("$1"); }; // Transform Types /*unsigned short*/ SVGTransform.SVG_TRANSFORM_UNKNOWN = 0; @@ -2280,7 +2276,7 @@ function SVGTransform() { /*unsigned short*/ SVGTransform.SVG_TRANSFORM_SKEWY = 6; SVGTransform.prototype = { /*ダミーの単位行列。各メソッドで使う*/ - _matrix : (new SVGMatrix()), + _matrix : base("$SVGMatrix").up("$1"), /*readonly unsigned short*/ type : /*SVGTransform.SVG_TRANSFORM_UNKNOWN*/ 0, /*readonly float*/ angle : 0, /*void*/ setMatrix : function(/*SVGMatrix*/ matrix ) { @@ -2711,7 +2707,7 @@ function SVGPathElement(_doc) { /*readonly SVGPathSegList*/ this.normalizedPathSegList = sp.up("$1"); sp = _doc = void 0; this.animatedNormalizedPathSegList = this.normalizedPathSegList; - /*readonly SVGAnimatedNumber*/ this.pathLength = new SVGAnimatedNumber(); + /*readonly SVGAnimatedNumber*/ this.pathLength = base("$SVGAnimatedNumber").up("$1"); //以下は、d属性に変更があった場合の処理 this.addEventListener("DOMAttrModified", this._attrModi, false); /*以下の処理は、このpath要素ノードがDOMツリーに追加されて初めて、 @@ -3818,7 +3814,7 @@ function SVGPolygonElement(_doc) { function SVGTextContentElement(_doc) { /*readonly SVGAnimatedLength*/ this.textLength = new SVGAnimatedLength(); - /*readonly SVGAnimatedEnumeration*/ this.lengthAdjust = new SVGAnimatedEnumeration(/*SVGTextContentElement.LENGTHADJUST_UNKNOWN*/ 0); + /*readonly SVGAnimatedEnumeration*/ this.lengthAdjust = base("$SVGAnimatedEnumeration").up("$1"); this.addEventListener("DOMNodeInserted", function(evt){ var tar = evt.target, cur = evt.currentTarget, @@ -4492,7 +4488,7 @@ function SVGMarkerElement(_doc) { var sl = SVGAnimatedLength; /*readonly SVGAnimatedLength*/ this.refX = new sl(); /*readonly SVGAnimatedLength*/ this.refY = new sl(); - /*readonly SVGAnimatedEnumeration*/ this.markerUnits = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.markerUnits = base("$SVGAnimatedEnumeration").up("$1"); this.markerUnits.baseVal = /*SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH*/ 2; /*readonly SVGAnimatedLength*/ this.markerWidth = new sl(); /*readonly SVGAnimatedLength*/ this.markerHeight = new sl(); @@ -4501,7 +4497,7 @@ function SVGMarkerElement(_doc) { this.markerWidth.baseVal.newValueSpecifiedUnits(1, 3); this.markerHeight.baseVal.newValueSpecifiedUnits(1, 3); sl = void 0; - /*readonly SVGAnimatedEnumeration*/ this.orientType = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.orientType = base("$SVGAnimatedEnumeration").up("$1"); this.orientType.baseVal = /*SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE*/ 2; /*readonly SVGAnimatedAngle*/ this.orientAngle = new SVGAnimatedAngle(); //SVGFitToViewBoxのインターフェースはhttp://www.w3.org/2000/svgsvgオブジェクトで代用 @@ -4676,9 +4672,9 @@ base("$CSSStyleRule").$SVGCSSRule.up("$SVGColorProfileRule").mix( { function SVGGradientElement() { SVGURIReference.apply(this); - /*readonly SVGAnimatedEnumeration*/ this.gradientUnits = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.gradientUnits = base("$SVGAnimatedEnumeration").up("$1"); /*readonly SVGAnimatedTransformList*/ this.gradientTransform = new SVGAnimatedTransformList(); - /*readonly SVGAnimatedEnumeration*/ this.spreadMethod = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.spreadMethod = base("$SVGAnimatedEnumeration").up("$1"); this.addEventListener("DOMNodeInsertedIntoDocument", function(evt) { var grad = evt.target, ele = evt._tar, @@ -4888,7 +4884,7 @@ function SVGRadialGradientElement(_doc) { SVGRadialGradientElement.prototype = Object._create(SVGGradientElement); function SVGStopElement() { - /*readonly SVGAnimatedNumber*/ this.offset = new SVGAnimatedNumber(); + /*readonly SVGAnimatedNumber*/ this.offset = base("$SVGAnimatedNumber").up("$1"); this.addEventListener("DOMAttrModified", function(evt) { if (evt.attrName === "offset") { var env = evt.newValue; @@ -4904,8 +4900,8 @@ function SVGStopElement() { function SVGPatternElement() { var sl = SVGAnimatedLength; - /*readonly SVGAnimatedEnumeration*/ this.patternUnits = new SVGAnimatedEnumeration(); - /*readonly SVGAnimatedEnumeration*/ this.patternContentUnits = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.patternUnits = base("$SVGAnimatedEnumeration").up("$1"); + /*readonly SVGAnimatedEnumeration*/ this.patternContentUnits = base("$SVGAnimatedEnumeration").up("$1"); /*readonly SVGAnimatedTransformList*/ this.patternTransform = new SVGAnimatedTransformList(); /*readonly SVGAnimatedLength*/ this.x = new sl(); /*readonly SVGAnimatedLength*/ this.y = new sl(); @@ -4920,13 +4916,13 @@ function SVGPatternElement() { }; function SVGClipPathElement() { - /*readonly SVGAnimatedEnumeration*/ this.clipPathUnits = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.clipPathUnits = base("$SVGAnimatedEnumeration").up("$1"); }; function SVGMaskElement() { var sl = SVGAnimatedLength; - /*readonly SVGAnimatedEnumeration*/ this.maskUnits = new SVGAnimatedEnumeration(); - /*readonly SVGAnimatedEnumeration*/ this.maskContentUnits = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.maskUnits = base("$SVGAnimatedEnumeration").up("$1"); + /*readonly SVGAnimatedEnumeration*/ this.maskContentUnits = base("$SVGAnimatedEnumeration").up("$1"); /*readonly SVGAnimatedLength*/ this.x = new sl(); /*readonly SVGAnimatedLength*/ this.y = new sl(); /*readonly SVGAnimatedLength*/ this.width = new sl(); @@ -4936,15 +4932,15 @@ function SVGMaskElement() { function SVGFilterElement() { var sl = SVGAnimatedLength; - /*readonly SVGAnimatedEnumeration*/ this.filterUnits = new SVGAnimatedEnumeration(); - /*readonly SVGAnimatedEnumeration*/ this.primitiveUnits = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.filterUnits = base("$SVGAnimatedEnumeration").up("$1"); + /*readonly SVGAnimatedEnumeration*/ this.primitiveUnits = base("$SVGAnimatedEnumeration").up("$1"); /*readonly SVGAnimatedLength*/ this.x = new sl(); /*readonly SVGAnimatedLength*/ this.y = new sl(); /*readonly SVGAnimatedLength*/ this.width = new sl(); /*readonly SVGAnimatedLength*/ this.height = new sl(); sl = void 0; - /*readonly SVGAnimatedInteger*/ this.filterResX = new SVGAnimatedInteger(); - /*readonly SVGAnimatedInteger*/ this.filterResY = new SVGAnimatedInteger(); + /*readonly SVGAnimatedInteger*/ this.filterResX = base("$SVGAnimatedInteger").up("$1"); + /*readonly SVGAnimatedInteger*/ this.filterResY = base("$SVGAnimatedInteger").up("$1"); SVGURIReference.apply(this); //setFilterRes (/*unsigned long*/ filterResX,/*unsigned long*/ filterResY ); }; @@ -4965,7 +4961,7 @@ SVGFilterPrimitiveStandardAttributes.prototype = Object._create(SVGStylable); function SVGFEBlendElement() { /*readonly SVGAnimatedString*/ this.in1 = base("$SVGAnimatedString").up("$1"); /*readonly SVGAnimatedString*/ this.in2 = base("$SVGAnimatedString").up("$1"); - /*readonly SVGAnimatedEnumeration*/ this.mode = new SVGAnimatedEnumeration(); + /*readonly SVGAnimatedEnumeration*/ this.mode = base("$SVGAnimatedEnumeration").up("$1"); this._fpsa = SVGFilterPrimitiveStandardAttributes(this); }; // Blend Mode Types @@ -4978,8 +4974,8 @@ function SVGFEBlendElement() { function SVGFEGaussianBlurElement() { /*readonly SVGAnimatedString*/ this.in1 = base("$SVGAnimatedString").up("$1"); - /*readonly SVGAnimatedNumber*/ this.stdDeviationX = new SVGAnimatedNumber(); - /*readonly SVGAnimatedNumber*/ this.stdDeviationY = new SVGAnimatedNumber(); + /*readonly SVGAnimatedNumber*/ this.stdDeviationX = base("$SVGAnimatedNumber").up("$1"); + /*readonly SVGAnimatedNumber*/ this.stdDeviationY = base("$SVGAnimatedNumber").up("$1"); this._fpsa = SVGFilterPrimitiveStandardAttributes(this); }; /*void*/ SVGFEGaussianBlurElement.prototype.setStdDeviation = function(/*float*/ stdDeviationX, /*float*/ stdDeviationY ) { @@ -5169,10 +5165,10 @@ function SVGScriptElement() { base("$event").up("SVGEvents"); base("$event").SVGZoomEvents = base("$event").UIEvents.up("SVGZoomEvents").on("itnitialize", function() { - /*readonly SVGRect*/ this.zoomRectScreen = new SVGRect(); + /*readonly SVGRect*/ this.zoomRectScreen = base("$SVGRect").up("$1"); /*readonly float*/ this.previousScale = this.newScale = 1; - /*readonly SVGPoint*/ this.previousTranslate = new SVGPoint(); - /*readonly SVGPoint*/ this.newTranslate = new SVGPoint(); + /*readonly SVGPoint*/ this.previousTranslate = base("$SVGPoint").up("$1"); + /*readonly SVGPoint*/ this.newTranslate = base("$SVGPoint").up("$1"); }); function SVGAnimationElement() { @@ -5696,7 +5692,7 @@ function SVGAnimateElement(){ ttr = tar.targetElement, tta = ttr[attrName]; /*tar.valuesのリスト: ["12px", "13px"] - *tar._valueList: [(new SVGPoint()), (new SVGPoint())] + *tar._valueList: [(base("$SVGPoint").up("$1")), (base("$SVGPoint").up("$1"))] * tar.valuesを機械が理解できるように変換したものがtar._valueList *この_valueListプロパティはアニメの際に使うので、_valuesプロパティはアニメ中に使わないことに注意 */ -- 2.11.0