text: /**
   * skylark-langx-numerics - The skylark JavaScript language extension library.
   * @author Hudaokeji Co.,Ltd
   * @version v0.9.0
   * @link www.skylarkjs.org
   * @license MIT
   */
  define(["skylark-langx-klass","./numerics","./Vector2"],function(t,i,s){var h=Math.PI/180,n={},e=function(t){return n[t]||(n[t]=Math.PI*t/180)},r=t({klassName:"TransformMatrix",_multiplyPoint:function(t){var i=this._,h=t.x*i.m11+t.y*i.m21+i.dx,n=t.x*i.m12+t.y*i.m22+i.dy;return new s(h,n)},m11:{get:function(){return this._.m11}},m12:{get:function(){return this._.m12}},m21:{get:function(){return this._.m21}},m22:{get:function(){return this._.m22}},dx:{get:function(){return this._.dx}},dy:{get:function(){return this._.dy}},alpha:{get:function(){return this._.alpha}},shadow:{get:function(){return this._.shadow}},compositeOperation:{get:function(){return this._.compositeOperation}},multiplyPoint:function(t){return this._multiplyPoint(t)},multiplyRectangle:function(t){if(this.isIdentity())return t.clone();var i=this.multiplyPoint(t.leftTop),s=this.multiplyPoint(t.leftBottom),h=this.multiplyPoint(t.right),n=this.multiplyPoint(t.rightBottom),e=Math.min(i.x,s.x,h.x,n.x),r=Math.min(i.y,s.y,h.y,n.y),a=Math.max(i.x,s.x,h.x,n.x),o=Math.max(i.y,s.y,h.y,n.y);return new Rect(e,r,a-e,o-r)},prepend:function(t,i,s,h,n,e){var r=this.dx;if(1!=t||0!=i||0!=s||1!=h){var a=this.m11,o=this.m21;this.m11=a*t+this.m12*s,this.m12=a*i+this.m12*h,this.m21=o*t+this.m22*s,this.m22=o*i+this.m22*h}return this.dx=r*t+this.dy*s+n,this.dy=r*i+this.dy*h+e,this},append:function(t,i,s,h,n,e){var r=this.m11,a=this.m12,o=this.m21,m=this.m22;return this.m11=t*r+i*o,this.m12=t*a+i*m,this.m21=s*r+h*o,this.m22=s*a+h*m,this.dx=n*r+e*o+this.dx,this.dy=n*a+e*m+this.dy,this},prependMatrix:function(t){return this.prepend(t.m11,t.m12,t.m21,t.m22,t.dx,t.dy),this.prependProperties(t.alpha,t.shadow,t.compositeOperation),this},appendMatrix:function(t){return this.append(t.m11,t.m12,t.m21,t.m22,t.dx,t.dy),this.appendProperties(t.alpha,t.shadow,t.compositeOperation),this},prependTransform:function(t,i,s,n,e,r,a,o,m){if(e%360)var u=e*h,c=Math.cos(u),d=Math.sin(u);else c=1,d=0;return(o||m)&&(this.dx-=o,this.dy-=m),r||a?(r*=h,a*=h,this.prepend(c*s,d*s,-d*n,c*n,0,0),this.prepend(Math.cos(a),Math.sin(a),-Math.sin(r),Math.cos(r),t,i)):this.prepend(c*s,d*s,-d*n,c*n,t,i),this},appendTransform:function(t,i,s,n,e,r,a,o,m){if(e%360)var u=e*h,c=Math.cos(u),d=Math.sin(u);else c=1,d=0;return r||a?(r*=h,a*=h,this.append(Math.cos(a),Math.sin(a),-Math.sin(r),Math.cos(r),t,i),this.append(c*s,d*s,-d*n,c*n,0,0)):this.append(c*s,d*s,-d*n,c*n,t,i),(o||m)&&(this.dx-=o*this.m11+m*this.m21,this.dy-=o*this.m12+m*this.m22),this},rotate:function(t){var i=Math.cos(t),s=Math.sin(t),h=this.m11,n=this.m21,e=this.dx;return this.m11=h*i-this.m12*s,this.m12=h*s+this.m12*i,this.m21=n*i-this.m22*s,this.m22=n*s+this.m22*i,this.dx=e*i-this.dy*s,this.dy=e*s+this.dy*i,this},skew:function(t,i){return t*=h,i*=h,this.append(Math.cos(i),Math.sin(i),-Math.sin(t),Math.cos(t),0,0),this},scale:function(t,i){return this.m11*=t,this.m22*=i,this.dx*=t,this.dy*=i,this},translate:function(t,i){return this.dx+=t,this.dy+=i,this},identity:function(){return this.alpha=this.m11=this.m22=1,this.m12=this.m21=this.dx=this.dy=0,this.shadow=this.compositeOperation=null,this},invert:function(){var t=this.m11,i=this.m12,s=this.m21,h=this.m22,n=this.dx,e=t*h-i*s;return this.m11=h/e,this.m12=-i/e,this.m21=-s/e,this.m22=t/e,this.dx=(s*this.dy-h*n)/e,this.dy=-(t*this.dy-i*n)/e,this},isIdentity:function(){return 0==this.dx&&0==this.dy&&1==this.m11&&0==this.m12&&0==this.m21&&1==this.m22},decompose:function(t){null==t&&(t={}),t.x=this.dx,t.y=this.dy,t.scaleX=Math.sqrt(this.m11*this.m11+this.m12*this.m12),t.scaleY=Math.sqrt(this.m21*this.m21+this.m22*this.m22);var i=Math.atan2(-this.m21,this.m22),s=Math.atan2(this.m12,this.m11);return i==s?(t.rotation=s/h,this.m11<0&&this.m22>=0&&(t.rotation+=t.rotation<=0?180:-180),t.skewX=t.skewY=0):(t.skewX=i/h,t.skewY=s/h),t},reinitialize:function(t,i,s,h,n,e,r,a,o){return this._initialize(t,i,s,h,n,e),this.alpha=r||1,this.shadow=a,this.compositeOperation=o,this},appendProperties:function(t,i,s){return this.alpha*=t,this.shadow=i||this.shadow,this.compositeOperation=s||this.compositeOperation,this},prependProperties:function(t,i,s){return this.alpha*=t,this.shadow=this.shadow||i,this.compositeOperation=this.compositeOperation||s,this},multiply:function(t){var i=this.m11,s=this.m12,h=this.m21,n=this.m22,e=this.dx,r=this.dy,a=t;return this.m11=i*a.m11+h*a.m12,this.m12=s*a.m11+n*a.m12,this.m21=i*a.m21+h*a.m22,this.m22=s*a.m21+n*a.m22,this.dx=i*a.dx+h*a.dy+e,this.dy=s*a.dx+n*a.dy+r,this},clone:function(){var t=this._,i=new r(t.m11,t.m12,t.m21,t.m22,t.dx,t.dy);return i.shadow=this.shadow,i.alpha=this.alpha,i.compositeOperation=this.compositeOperation,i},toString:function(){var t=this._;return"[TransformMatrix (m11="+t.m11+" m12="+t.m12+" m21="+t.m21+" m22="+t.m22+" dx="+t.dx+" dy="+t.dy+")]"},_construct:function(t,i,s,h,n,e){var r=this._={};r.m11=t||1,r.m12=i||0,r.m21=s||0,r.m22=h||1,r.dx=n||0,r.dy=e||0}});return Object.assign(r,{translate:function(t,i){return new r(1,0,0,1,t,i)},scale:function(t,i){return new r(t,0,0,i||t,0,0)},rotate:function(t){var i=Math.cos(t),s=Math.sin(t);return new r(i,s,-s,i,0,0)},rotateg:function(t){return this.rotate(e(t))},skewX:function(t){var i=Math.tan(t);return new r(1,0,i,1)},skewXg:function(t){return this.skewX(e(t))},skewY:function(t){var i=Math.tan(t);return new r(1,i,0,1)},skewYg:function(t){return this.skewY(e(t))},reflect:function(t,i){1==arguments.length&&(i=t.y,t=t.x);var s=t*t,h=i*i,n=s+h,e=2*t*i/n;return new r(2*s/n-1,e,e,2*h/n-1)},project:function(t,i){var s=t*t,h=i*i,n=s+h,e=t*i/n;return yx=e,yy=h/n,new r(s/n,yx,e,yy)},_sandwich:function(t,i,s){return this.translate(i,s).multiply(t).multiply(this.translate(-i,-s))},scaleAt:function(t,i,s,h){switch(arguments.length){case 4:return this._sandwich(this.scale(t,i),s,h);case 3:return"number"==typeof s?this._sandwich(this.scale(t),i,s):this._sandwich(this.scale(t,i),s.x,s.y)}return this._sandwich(this.scale(t),i.x,i.y)},rotateAt:function(t,i,s){return arguments.length>2?this._sandwich(this.rotate(t),i,s):this._sandwich(this.rotate(t),i.x,i.y)},rotategAt:function(t,i,s){return arguments.length>2?this._sandwich(this.rotateg(t),i,s):this._sandwich(this.rotateg(t),i.x,i.y)},skewXAt:function(t,i,s){return arguments.length>2?this._sandwich(this.skewX(t),i,s):this._sandwich(this.skewX(t),i.x,i.y)},skewXgAt:function(t,i,s){return arguments.length>2?this._sandwich(this.skewXg(t),i,s):this._sandwich(this.skewXg(t),i.x,i.y)},skewYAt:function(t,i,s){return arguments.length>2?this._sandwich(this.skewY(t),i,s):this._sandwich(this.skewY(t),i.x,i.y)},skewYgAt:function(t,i,s){return arguments.length>2?this._sandwich(this.skewYg(t),i,s):this._sandwich(this.skewYg(t),i.x,i.y)}}),i.TransformMatrix=r});
  //# sourceMappingURL=sourcemaps/TransformMatrix.js.map
  