};
/*documentは引数の変数として登録しておく*/
-(function(_doc, _pInt, _math) {
+(function(_doc, _math) {
//freeArg関数はunloadで使う解放処理
NAIBU.freeArg = function() {
- SVGPathElement = _doc = _pInt = _math = void 0;
+ SVGPathElement = _doc = _math = void 0;
};
//仮のfill属性とstroke属性の処理
NAIBU._setPaint = function(tar, matrix) {
var tar = evt.target,
matrix = tar.getScreenCTM(),
tlist = tar.normalizedPathSegList,
- _parseInt = _pInt,
dat = [],
ma = matrix.a, mb = matrix.b, mc = matrix.c, md = matrix.d, me = matrix.e, mf = matrix.f,
cname = tar._com._nameCom,
- isZ = tar._com._isZ, isC = tar._com._isC;
+ isZ = tar._com._isZ, isC = tar._com._isC,
+ mr = _math.round;
for (var i=0, tli=tlist.numberOfItems;i<tli;++i) {
var ti = tlist[i],
tx = ti.x,
*[mb md mf] * [y]
*[0 0 1 ] [1]
*/
- t += [_parseInt(ma*ti.x1 + mc*ti.y1 + me, 10),
- _parseInt(mb*ti.x1 + md*ti.y1 + mf, 10),
- _parseInt(ma*ti.x2 + mc*ti.y2 + me, 10),
- _parseInt(mb*ti.x2 + md*ti.y2 + mf, 10),
- _parseInt(ma*tx + mc*ty + me, 10),
- _parseInt(mb*tx + md*ty + mf, 10)].join(" ");
+ t += [mr(ma*ti.x1 + mc*ti.y1 + me),
+ mr(mb*ti.x1 + md*ti.y1 + mf),
+ mr(ma*ti.x2 + mc*ti.y2 + me),
+ mr(mb*ti.x2 + md*ti.y2 + mf),
+ mr(ma*tx + mc*ty + me),
+ mr(mb*tx + md*ty + mf)].join(" ");
} else if (!isZ[tps]) {
- t += _parseInt(ma*tx + mc*ty + me, 10)+ " " +_parseInt(mb*tx + md*ty + mf, 10);
+ t += mr(ma*tx + mc*ty + me)+ " " +mr(mb*tx + md*ty + mf);
}
dat[i] = t;
}
tt.coordsize = vi.width.baseVal.value + " " + vi.height.baseVal.value;
NAIBU._setPaint(tar, matrix);
delete tar._cacheMatrix;
- evt = tar = dat = t = tx = ty = matrix = tlist = x = y = _parseInt = ma = mb = mc = md = me = mf = vi = isZ = isC = i = tli = tps = ti = cname = tt = void 0;
+ evt = tar = dat = t = tx = ty = matrix = tlist = x = y = mr = ma = mb = mc = md = me = mf = vi = isZ = isC = i = tli = tps = ti = cname = tt = void 0;
};
_sproto._com = {
_nameCom : {
};
})(SVGPathElement.prototype)
NAIBU.SVGPathElement = SVGPathElement; //IE8では、SVGPathElementはローカル変数
-})(document, parseInt, Math);
+})(document, Math);
function SVGRectElement(_doc) {
SVGElement.apply(this);