*/
function SVGException(code) {
/*unsigned short*/ this.code = code;
- if (this.code === SVGException.SVG_WRONG_TYPE_ERR) {
+ if (this.code === /*SVGException.SVG_WRONG_TYPE_ERR*/ 0) {
this.message = "SVG Wrong Type Error";
- } else if (this.code === SVGException.SVG_INVALID_VALUE_ERR) {
+ } else if (this.code === /*SVGException.SVG_INVALID_VALUE_ERR*/ 1) {
this.message = "SVG Invalid Value Error";
- } else if (this.code === SVGException.SVG_MATRIX_NOT_INVERTABLE) {
+ } else if (this.code === /*SVGException.SVG_MATRIX_NOT_INVERTABLE*/ 2) {
this.message = "SVG Matrix Not Invertable";
}
return this;
};
SVGException.prototype = new Error();
// SVGExceptionCode
-/*const unsigned short*/ SVGException.SVG_WRONG_TYPE_ERR = 0;
-/*const unsigned short*/ SVGException.SVG_INVALID_VALUE_ERR = 1;
-/*const unsigned short*/ SVGException.SVG_MATRIX_NOT_INVERTABLE = 2;
+/*const unsigned short SVGException.SVG_WRONG_TYPE_ERR = 0;
+/*const unsigned short SVGException.SVG_INVALID_VALUE_ERR = 1;
+/*const unsigned short SVGException.SVG_MATRIX_NOT_INVERTABLE = 2;*/
/*SVGElement
*すべてのSVG関連要素の雛形となるオブジェクト
/*readonly SVGICCColor*/ this.iccColor = null;
this._regD = /\d+/g;
this._regDP = /[\d.]+%/g;
- this._exceptionsvg = SVGException.SVG_INVALID_VALUE_ERR;
+ this._exceptionsvg = /*SVGException.SVG_INVALID_VALUE_ERR*/ 1;
/*void*/ this.setRGBColor = function(/*DOMString*/ rgbColor ){
var s,
_parseInt,
s.f = (this.b * this.e - this.a * this.f) / n;
return s;
} else {
- throw (new SVGException(SVGException.SVG_MATRIX_NOT_INVERTABLE));
+ throw (new SVGException(/*SVGException.SVG_MATRIX_NOT_INVERTABLE*/ 2));
}
},
/*SVGMatrix*/ translate : function(/*float*/ x, /*float*/ y ) {
//座標(x, y)と原点の角度の分だけ、回転する
/*SVGMatrix*/ rotateFromVector : function(/*float*/ x, /*float*/ y ) {
if ((x === 0) || (y === 0) || !isFinite(x) || !isFinite(y)) {
- throw (new SVGException(SVGException.SVG_INVALID_VALUE_ERR))
+ throw (new SVGException(/*SVGException.SVG_INVALID_VALUE_ERR*/ 1))
}
var m = new SVGMatrix(), rad = Math.atan2(y, x);
m.a = Math.cos(rad);
};
/*void*/ t.prototype.setPaint = function(/*unsigned short*/ paintType, /*DOMString*/ uri, /*DOMString*/ rgbColor, /*DOMString*/ iccColor ) {
if ((paintType < 101 && uri) || (paintType > 102 && !uri)) {
- throw new SVGException(SVGException.SVG_INVALID_VALUE_ERR);
+ throw new SVGException(/*SVGException.SVG_INVALID_VALUE_ERR*/ 1);
}
this.uri = uri;
this.paintType = paintType;