\r
/*interface SVGLocatable*/\r
/*SVGRect*/ getBBox: function(){\r
- var s = new SVGRect(),\r
+ var s = base("$SVGRect").up("$1"),\r
data = this._tar.path.value,\r
vi = this.ownerDocument.documentElement.viewport,\r
el = vi.width,\r
this.up("$SVGPathSegList");\r
} );\r
\r
-function SVGAnimatedEnumeration() {\r
- /*unsigned short*/ this.baseVal = 0;\r
+base("$SVGAnimatedEnumeration").mix( {\r
+ /*unsigned short*/ baseVal: 0,\r
// raises DOMException on setting\r
- /*readonly unsigned short*/ this.animVal = 0;\r
-};\r
-function SVGAnimatedInteger() {\r
- /*long*/ this.baseVal = 0;\r
+ /*readonly unsigned short*/ animVal: 0\r
+} );\r
+base("$SVGAnimatedInteger").mix( {\r
+ /*long*/ baseVal: 0,\r
// raises DOMException on setting\r
- /*readonly long*/ this.animVal = 0;\r
-};\r
-function SVGNumber() {\r
- /*float*/ this.value = 0;\r
+ /*readonly long*/ animVal: 0\r
+} );\r
+base("$SVGNumber") \r
+ /*float*/ .value = 0;\r
// raises DOMException on setting\r
-};\r
-function SVGAnimatedNumber() {\r
- /*float*/ this.baseVal = this.animVal = 0;\r
-};\r
+base("$SVGAnimatedNumber").mix( {\r
+ /*float*/ baseVal: 0,\r
+ /*float*/ animVal: 0\r
+} );\r
\r
/*SVGUnmberListのメソッドはSVGStringListを参照*/\r
\r
function SVGAnimatedNumberList() {\r
/*readonly SVGNumberList*/ this.animVal = this.baseVal = base("$SVGStringList").$SVGNumberList.up("$1");\r
};\r
-/*SVGLengthクラス\r
+/*$SVGLengthオブジェクト\r
*長さを設定する(単位pxに統一する方便として使う)\r
*valueInSpecifiedUnitsプロパティはpxに統一する前の数値。valueプロパティはpxに統一した後の数値\r
*/\r
-function SVGLength() {\r
-};\r
+base("$SVGLength").mix( {\r
/*(function(t) {\r
// Length Unit Types\r
/*const unsigned short t.SVG_LENGTHTYPE_UNKNOWN = 0;\r
/*const unsigned short t.SVG_LENGTHTYPE_PC = 10;\r
})(SVGLength);*/\r
\r
-SVGLength.prototype = {\r
+\r
/*readonly attribute unsigned short*/ unitType : /*SVGLength.SVG_LENGTHTYPE_UNKNOWN*/ 0,\r
/*attribute float*/ value : 0, //利用単位における値\r
/*attribute float*/ valueInSpecifiedUnits : /*SVGLength.SVG_LENGTHTYPE_UNKNOWN*/ 0, //unitTypeにおける値\r
this.newValueSpecifiedUnits(this.unitType, this.valueInSpecifiedUnits);\r
}\r
}\r
-};\r
+} );\r
function SVGAnimatedLength() {\r
/*readonly SVGLength*/ this.animVal;\r
- this.baseVal = new SVGLength();\r
+ this.baseVal = base("$SVGLength").up("$1");\r
this.baseVal.unitType = 1;\r
};\r
\r
function SVGAnimatedLengthList() {\r
/*readonly SVGLengthList*/ this.animVal = this.baseVal = base("$SVGStringList").$SVGLengthList.up("$1");;\r
};\r
-function SVGAngle() {\r
-};\r
-SVGAngle.prototype = {\r
+\r
+base("$SVGAngle").mix( {\r
/*readonly attribute unsigned short*/ unitType : 0,\r
/*attribute float*/ value : 0,\r
// raises DOMException on setting\r
this.newValueSpecifiedUnits(unitType, v);\r
//raises( DOMException );\r
}\r
-};\r
+} );\r
// Angle Unit Types\r
/*const unsigned short SVGAngle.SVG_ANGLETYPE_UNKNOWN = 0;\r
/*const unsigned short SVGAngle.SVG_ANGLETYPE_UNSPECIFIED = 1;\r
/*const unsigned short SVGAngle.SVG_ANGLETYPE_RAD = 3;\r
/*const unsigned short SVGAngle.SVG_ANGLETYPE_GRAD = 4;*/\r
function SVGAnimatedAngle() {\r
- /*readonly attribute SVGAngle*/ this.baseVal = new SVGAngle();\r
- /*readonly attribute SVGAngle*/ this.animVal = this.baseVal;\r
+ /*readonly attribute SVGAngle*/ this.baseVal = base("$SVGAngle").up("$1");\r
+ /*readonly attribute SVGAngle*/ this.animVal = base("$SVGAngle").up("$1");\r
};\r
\r
base("$CSSValue").up("$SVGColor").mix( {\r
}\r
} );\r
\r
-function SVGRect() {\r
- /*float*/ this.x = 0;\r
+base("$SVGRect").mix( {\r
+ /*float*/ x: 0,\r
// raises DOMException on setting\r
- /*float*/ this.y = 0;\r
+ /*float*/ y: 0,\r
// raises DOMException on setting\r
- /*float*/ this.width = 0;\r
+ /*float*/ width: 0,\r
// raises DOMException on setting\r
- /*float*/ this.height = 0;\r
+ /*float*/ height: 0\r
// raises DOMException on setting\r
-};\r
+} );\r
\r
function SVGAnimatedRect() {\r
- /*readonly SVGRect*/ this.animVal = this.baseVal = new SVGRect();\r
+ /*readonly SVGRect*/ this.baseVal = base("$SVGRect").up("$1");\r
+/*readonly SVGRect*/ this.animVal = base("$SVGRect").up("$1");\r
};\r
\r
/*SVGUnitTypes = {\r
this._currentTime = seconds;\r
},\r
/*SVGNumber*/ createSVGNumber: function(){\r
- var s = new SVGNumber();\r
- s.value = 0;\r
- return s;\r
+ return base("$SVGNumber").up("$1");\r
},\r
/*SVGAngle*/ createSVGAngle: function(){\r
- var s = new SVGAngle();\r
- s.value = 0;\r
+ var s = base("$SVGAngle").up("$1");\r
s.unitType = 1;\r
return s;\r
},\r
/*SVGLength*/ createSVGLength: function(){\r
- var s = new SVGLength();\r
+ var s = base("$SVGLength").up("$1");\r
s.unitType = /*SVG_LENGTHTYPE_NUMBER*/ 1;\r
return s;\r
},\r
/*SVGPoint*/ createSVGPoint: function(){\r
- return new SVGPoint();\r
+ return base("$SVGPoint").up("$1");\r
},\r
/*SVGMatrix*/ createSVGMatrix: function(){\r
//単位行列を作成\r
- return new SVGMatrix();\r
+ return base("$SVGMatrix").up("$1");\r
},\r
/*SVGRect*/ createSVGRect: function(){\r
- return new SVGRect();\r
+ return base("$SVGRect").up("$1");\r
},\r
/*SVGTransform*/ createSVGTransform: function(){\r
var s = this.createSVGTransformFromMatrix(this.createSVGMatrix());\r
/*SVGPoint\r
*2次元座標の点(x,y)を表すオブジェクト\r
*/\r
-function SVGPoint() {\r
-};\r
-/*float*/SVGPoint.prototype.x = SVGPoint.prototype.y = 0;\r
-SVGPoint.prototype.matrixTransform = function(/*SVGMatrix*/ matrix ) {\r
- if (!isFinite(matrix.a) || !isFinite(matrix.b) || !isFinite(matrix.c) || !isFinite(matrix.d) || !isFinite(matrix.e) || !isFinite(matrix.f)) {\r
- throw (new Error("Type Error: 引数の値がNumber型ではありません"));\r
+base("$SVGPoint").mix( {\r
+ /*float*/ x: 0,\r
+ /*float*/ y: 0,\r
+ matrixTransform: function(/*SVGMatrix*/ matrix ) {\r
+ if (!isFinite(matrix.a) || !isFinite(matrix.b) || !isFinite(matrix.c) || !isFinite(matrix.d) || !isFinite(matrix.e) || !isFinite(matrix.f)) {\r
+ throw (new Error("Type Error: 引数の値がNumber型ではありません"));\r
+ }\r
+ var s = base("$SVGPoint").up("$1");\r
+ s.x = matrix.a * this.x + matrix.c * this.y + matrix.e;\r
+ s.y = matrix.b * this.x + matrix.d * this.y + matrix.f;\r
+ return s;\r
}\r
- var s = new SVGPoint();\r
- s.x = matrix.a * this.x + matrix.c * this.y + matrix.e;\r
- s.y = matrix.b * this.x + matrix.d * this.y + matrix.f;\r
- return s;\r
-};\r
+} );\r
\r
\r
/*SVGPointListのメソッドはSVGStringListを参照*/\r
*[b d f]\r
*[0 0 1]\r
*/\r
-function SVGMatrix() {\r
-};\r
-SVGMatrix.prototype = {\r
+base("$SVGMatrix").mix( {\r
/*float*/ a : 1,\r
/*float*/ b : 0,\r
/*float*/ c : 0,\r
*行列の積を求めて返す\r
*/\r
/*SVGMatrix*/ multiply : function(/*SVGMatrix*/ secondMatrix ) {\r
- var s = new SVGMatrix(),\r
+ var s = base("$SVGMatrix").up("$1"),\r
m = secondMatrix,\r
isf = isFinite,\r
t = this;\r
*逆行列を返す\r
*/\r
/*SVGMatrix*/ inverse : function() {\r
- var s = new SVGMatrix(), n = this._determinant();\r
+ var s = base("$SVGMatrix").up("$1"), \r
+ n = this._determinant();\r
if (n !== 0) {\r
s.a = this.d / n;\r
s.b = -this.b / n;\r
}\r
},\r
/*SVGMatrix*/ translate : function(/*float*/ x, /*float*/ y ) {\r
- var m = new SVGMatrix();\r
+ var m = base("$SVGMatrix").up("$1");\r
m.e = x;\r
m.f = y;\r
var s = this.multiply(m);\r
return s;\r
},\r
/*SVGMatrix*/ scale : function(/*float*/ scaleFactor ) {\r
- var m = new SVGMatrix();\r
+ var m = base("$SVGMatrix").up("$1");\r
m.a = scaleFactor;\r
m.d = scaleFactor;\r
var s = this.multiply(m);\r
return s;\r
},\r
/*SVGMatrix*/ scaleNonUniform : function(/*float*/ scaleFactorX, /*float*/ scaleFactorY ) {\r
- var m = new SVGMatrix();\r
+ var m = base("$SVGMatrix").up("$1");\r
m.a = scaleFactorX;\r
m.d = scaleFactorY;\r
var s = this.multiply(m);\r
return s;\r
},\r
/*SVGMatrix*/ rotate : function(/*float*/ angle ) {\r
- var m = new SVGMatrix(), rad = angle / 180 * Math.PI; //ラジアン変換\r
+ var m = base("$SVGMatrix").up("$1"), rad = angle / 180 * Math.PI; //ラジアン変換\r
m.a = Math.cos(rad);\r
m.b = Math.sin(rad);\r
m.c = -m.b;\r
if ((x === 0) || (y === 0) || !isFinite(x) || !isFinite(y)) {\r
throw (new SVGException(/*SVGException.SVG_INVALID_VALUE_ERR*/ 1));\r
}\r
- var m = new SVGMatrix(), rad = Math.atan2(y, x);\r
+ var m = base("$SVGMatrix").up("$1"), rad = Math.atan2(y, x);\r
m.a = Math.cos(rad);\r
m.b = Math.sin(rad);\r
m.c = -m.b;\r
return s;\r
},\r
/*SVGMatrix*/ flipX : function() {\r
- var m = new SVGMatrix();\r
+ var m = base("$SVGMatrix").up("$1");\r
m.a = -m.a;\r
var s = this.multiply(m);\r
m = void 0;\r
return s;\r
},\r
/*SVGMatrix*/ flipY : function() {\r
- var m = new SVGMatrix();\r
+ var m = base("$SVGMatrix").up("$1");\r
m.d = -m.d;\r
var s = this.multiply(m);\r
m = void 0;\r
return s;\r
},\r
/*SVGMatrix*/ skewX : function(/*float*/ angle ){\r
- var m = new SVGMatrix(), rad = angle / 180 * Math.PI; //ラジアン変換\r
+ var m = base("$SVGMatrix").up("$1"), rad = angle / 180 * Math.PI; //ラジアン変換\r
m.c = Math.tan(rad);\r
var s = this.multiply(m);\r
m = void 0;\r
return s;\r
},\r
/*SVGMatrix*/ skewY : function(/*float*/ angle ){\r
- var m = new SVGMatrix(), rad = angle / 180 * Math.PI;\r
+ var m = base("$SVGMatrix").up("$1"), rad = angle / 180 * Math.PI;\r
m.b = Math.tan(rad);\r
var s = this.multiply(m);\r
m = void 0;\r
/*float*/ _determinant : function() {\r
return (this.a * this.d - this.b * this.c);\r
}\r
-};\r
+} );\r
\r
function SVGTransform() {\r
- /*readonly SVGMatrix*/ this.matrix = new SVGMatrix();\r
+ /*readonly SVGMatrix*/ this.matrix = base("$SVGMatrix").up("$1");\r
};\r
// Transform Types\r
/*unsigned short*/ SVGTransform.SVG_TRANSFORM_UNKNOWN = 0;\r
/*unsigned short*/ SVGTransform.SVG_TRANSFORM_SKEWY = 6;\r
SVGTransform.prototype = {\r
/*ダミーの単位行列。各メソッドで使う*/\r
- _matrix : (new SVGMatrix()),\r
+ _matrix : base("$SVGMatrix").up("$1"),\r
/*readonly unsigned short*/ type : /*SVGTransform.SVG_TRANSFORM_UNKNOWN*/ 0,\r
/*readonly float*/ angle : 0,\r
/*void*/ setMatrix : function(/*SVGMatrix*/ matrix ) {\r
/*readonly SVGPathSegList*/ this.normalizedPathSegList = sp.up("$1");\r
sp = _doc = void 0;\r
this.animatedNormalizedPathSegList = this.normalizedPathSegList;\r
- /*readonly SVGAnimatedNumber*/ this.pathLength = new SVGAnimatedNumber();\r
+ /*readonly SVGAnimatedNumber*/ this.pathLength = base("$SVGAnimatedNumber").up("$1");\r
//以下は、d属性に変更があった場合の処理\r
this.addEventListener("DOMAttrModified", this._attrModi, false);\r
/*以下の処理は、このpath要素ノードがDOMツリーに追加されて初めて、\r
\r
function SVGTextContentElement(_doc) {\r
/*readonly SVGAnimatedLength*/ this.textLength = new SVGAnimatedLength();\r
- /*readonly SVGAnimatedEnumeration*/ this.lengthAdjust = new SVGAnimatedEnumeration(/*SVGTextContentElement.LENGTHADJUST_UNKNOWN*/ 0);\r
+ /*readonly SVGAnimatedEnumeration*/ this.lengthAdjust = base("$SVGAnimatedEnumeration").up("$1");\r
this.addEventListener("DOMNodeInserted", function(evt){\r
var tar = evt.target,\r
cur = evt.currentTarget,\r
var sl = SVGAnimatedLength;\r
/*readonly SVGAnimatedLength*/ this.refX = new sl();\r
/*readonly SVGAnimatedLength*/ this.refY = new sl();\r
- /*readonly SVGAnimatedEnumeration*/ this.markerUnits = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.markerUnits = base("$SVGAnimatedEnumeration").up("$1");\r
this.markerUnits.baseVal = /*SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH*/ 2;\r
/*readonly SVGAnimatedLength*/ this.markerWidth = new sl();\r
/*readonly SVGAnimatedLength*/ this.markerHeight = new sl();\r
this.markerWidth.baseVal.newValueSpecifiedUnits(1, 3);\r
this.markerHeight.baseVal.newValueSpecifiedUnits(1, 3);\r
sl = void 0;\r
- /*readonly SVGAnimatedEnumeration*/ this.orientType = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.orientType = base("$SVGAnimatedEnumeration").up("$1");\r
this.orientType.baseVal = /*SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE*/ 2;\r
/*readonly SVGAnimatedAngle*/ this.orientAngle = new SVGAnimatedAngle();\r
//SVGFitToViewBoxのインターフェースはhttp://www.w3.org/2000/svgsvgオブジェクトで代用\r
\r
function SVGGradientElement() {\r
SVGURIReference.apply(this);\r
- /*readonly SVGAnimatedEnumeration*/ this.gradientUnits = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.gradientUnits = base("$SVGAnimatedEnumeration").up("$1");\r
/*readonly SVGAnimatedTransformList*/ this.gradientTransform = new SVGAnimatedTransformList();\r
- /*readonly SVGAnimatedEnumeration*/ this.spreadMethod = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.spreadMethod = base("$SVGAnimatedEnumeration").up("$1");\r
this.addEventListener("DOMNodeInsertedIntoDocument", function(evt) {\r
var grad = evt.target,\r
ele = evt._tar,\r
SVGRadialGradientElement.prototype = Object._create(SVGGradientElement);\r
\r
function SVGStopElement() {\r
- /*readonly SVGAnimatedNumber*/ this.offset = new SVGAnimatedNumber();\r
+ /*readonly SVGAnimatedNumber*/ this.offset = base("$SVGAnimatedNumber").up("$1");\r
this.addEventListener("DOMAttrModified", function(evt) {\r
if (evt.attrName === "offset") {\r
var env = evt.newValue;\r
\r
function SVGPatternElement() {\r
var sl = SVGAnimatedLength;\r
- /*readonly SVGAnimatedEnumeration*/ this.patternUnits = new SVGAnimatedEnumeration();\r
- /*readonly SVGAnimatedEnumeration*/ this.patternContentUnits = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.patternUnits = base("$SVGAnimatedEnumeration").up("$1");\r
+ /*readonly SVGAnimatedEnumeration*/ this.patternContentUnits = base("$SVGAnimatedEnumeration").up("$1");\r
/*readonly SVGAnimatedTransformList*/ this.patternTransform = new SVGAnimatedTransformList();\r
/*readonly SVGAnimatedLength*/ this.x = new sl();\r
/*readonly SVGAnimatedLength*/ this.y = new sl();\r
};\r
\r
function SVGClipPathElement() {\r
- /*readonly SVGAnimatedEnumeration*/ this.clipPathUnits = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.clipPathUnits = base("$SVGAnimatedEnumeration").up("$1");\r
};\r
\r
function SVGMaskElement() {\r
var sl = SVGAnimatedLength;\r
- /*readonly SVGAnimatedEnumeration*/ this.maskUnits = new SVGAnimatedEnumeration();\r
- /*readonly SVGAnimatedEnumeration*/ this.maskContentUnits = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.maskUnits = base("$SVGAnimatedEnumeration").up("$1");\r
+ /*readonly SVGAnimatedEnumeration*/ this.maskContentUnits = base("$SVGAnimatedEnumeration").up("$1");\r
/*readonly SVGAnimatedLength*/ this.x = new sl();\r
/*readonly SVGAnimatedLength*/ this.y = new sl();\r
/*readonly SVGAnimatedLength*/ this.width = new sl();\r
\r
function SVGFilterElement() {\r
var sl = SVGAnimatedLength;\r
- /*readonly SVGAnimatedEnumeration*/ this.filterUnits = new SVGAnimatedEnumeration();\r
- /*readonly SVGAnimatedEnumeration*/ this.primitiveUnits = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.filterUnits = base("$SVGAnimatedEnumeration").up("$1");\r
+ /*readonly SVGAnimatedEnumeration*/ this.primitiveUnits = base("$SVGAnimatedEnumeration").up("$1");\r
/*readonly SVGAnimatedLength*/ this.x = new sl();\r
/*readonly SVGAnimatedLength*/ this.y = new sl();\r
/*readonly SVGAnimatedLength*/ this.width = new sl();\r
/*readonly SVGAnimatedLength*/ this.height = new sl();\r
sl = void 0;\r
- /*readonly SVGAnimatedInteger*/ this.filterResX = new SVGAnimatedInteger();\r
- /*readonly SVGAnimatedInteger*/ this.filterResY = new SVGAnimatedInteger();\r
+ /*readonly SVGAnimatedInteger*/ this.filterResX = base("$SVGAnimatedInteger").up("$1");\r
+ /*readonly SVGAnimatedInteger*/ this.filterResY = base("$SVGAnimatedInteger").up("$1");\r
SVGURIReference.apply(this);\r
//setFilterRes (/*unsigned long*/ filterResX,/*unsigned long*/ filterResY );\r
};\r
function SVGFEBlendElement() {\r
/*readonly SVGAnimatedString*/ this.in1 = base("$SVGAnimatedString").up("$1");\r
/*readonly SVGAnimatedString*/ this.in2 = base("$SVGAnimatedString").up("$1");\r
- /*readonly SVGAnimatedEnumeration*/ this.mode = new SVGAnimatedEnumeration();\r
+ /*readonly SVGAnimatedEnumeration*/ this.mode = base("$SVGAnimatedEnumeration").up("$1");\r
this._fpsa = SVGFilterPrimitiveStandardAttributes(this);\r
};\r
// Blend Mode Types\r
\r
function SVGFEGaussianBlurElement() {\r
/*readonly SVGAnimatedString*/ this.in1 = base("$SVGAnimatedString").up("$1");\r
- /*readonly SVGAnimatedNumber*/ this.stdDeviationX = new SVGAnimatedNumber();\r
- /*readonly SVGAnimatedNumber*/ this.stdDeviationY = new SVGAnimatedNumber();\r
+ /*readonly SVGAnimatedNumber*/ this.stdDeviationX = base("$SVGAnimatedNumber").up("$1");\r
+ /*readonly SVGAnimatedNumber*/ this.stdDeviationY = base("$SVGAnimatedNumber").up("$1");\r
this._fpsa = SVGFilterPrimitiveStandardAttributes(this);\r
};\r
/*void*/ SVGFEGaussianBlurElement.prototype.setStdDeviation = function(/*float*/ stdDeviationX, /*float*/ stdDeviationY ) {\r
base("$event").up("SVGEvents");\r
\r
base("$event").SVGZoomEvents = base("$event").UIEvents.up("SVGZoomEvents").on("itnitialize", function() {\r
- /*readonly SVGRect*/ this.zoomRectScreen = new SVGRect();\r
+ /*readonly SVGRect*/ this.zoomRectScreen = base("$SVGRect").up("$1");\r
/*readonly float*/ this.previousScale = this.newScale = 1;\r
- /*readonly SVGPoint*/ this.previousTranslate = new SVGPoint();\r
- /*readonly SVGPoint*/ this.newTranslate = new SVGPoint();\r
+ /*readonly SVGPoint*/ this.previousTranslate = base("$SVGPoint").up("$1");\r
+ /*readonly SVGPoint*/ this.newTranslate = base("$SVGPoint").up("$1");\r
});\r
\r
function SVGAnimationElement() {\r
ttr = tar.targetElement,\r
tta = ttr[attrName];\r
/*tar.valuesのリスト: ["12px", "13px"]\r
- *tar._valueList: [(new SVGPoint()), (new SVGPoint())]\r
+ *tar._valueList: [(base("$SVGPoint").up("$1")), (base("$SVGPoint").up("$1"))]\r
* tar.valuesを機械が理解できるように変換したものがtar._valueList\r
*この_valueListプロパティはアニメの際に使うので、_valuesプロパティはアニメ中に使わないことに注意\r
*/\r