import { Helpers } from '../../helpers';
let ctor;
export class DOMMatrix {
    constructor(instance) {
        if (Array.isArray(instance)) {
            this._native = new global.CanvasModule.DOMMatrix(instance);
        }
        else if (!instance) {
            this._native = new global.CanvasModule.DOMMatrix();
        }
        else {
            this._native = instance;
        }
    }
    get native() {
        return this._native;
    }
    get nativeInstance() {
        return this.native;
    }
    get a() {
        return this.nativeInstance.a;
    }
    set a(value) {
        this.nativeInstance.a = value;
    }
    get b() {
        return this.nativeInstance.b;
    }
    set b(value) {
        this.nativeInstance.b = value;
    }
    get c() {
        return this.nativeInstance.c;
    }
    set c(value) {
        this.nativeInstance.c = value;
    }
    get d() {
        return this.nativeInstance.d;
    }
    set d(value) {
        this.nativeInstance.d = value;
    }
    get e() {
        return this.nativeInstance.e;
    }
    set e(value) {
        this.nativeInstance.e = value;
    }
    get f() {
        return this.nativeInstance.f;
    }
    set f(value) {
        this.nativeInstance.f = value;
    }
    get m11() {
        return this.nativeInstance.m11;
    }
    set m11(value) {
        this.nativeInstance.m11 = value;
    }
    get m12() {
        return this.nativeInstance.m12;
    }
    set m12(value) {
        this.nativeInstance.m12 = value;
    }
    get m13() {
        return this.nativeInstance.m13;
    }
    set m13(value) {
        this.nativeInstance.m13 = value;
    }
    get m14() {
        return this.nativeInstance.m14;
    }
    set m14(value) {
        this.nativeInstance.m14 = value;
    }
    get m21() {
        return this.nativeInstance.m21;
    }
    set m21(value) {
        this.nativeInstance.m21 = value;
    }
    get m22() {
        return this.nativeInstance.m22;
    }
    set m22(value) {
        this.nativeInstance.m22 = value;
    }
    get m23() {
        return this.nativeInstance.m23;
    }
    set m23(value) {
        this.nativeInstance.m23 = value;
    }
    get m24() {
        return this.nativeInstance.m24;
    }
    set m24(value) {
        this.nativeInstance.m24 = value;
    }
    get m31() {
        return this.nativeInstance.m31;
    }
    set m31(value) {
        this.nativeInstance.m31 = value;
    }
    get m32() {
        return this.nativeInstance.m32;
    }
    set m32(value) {
        this.nativeInstance.m32 = value;
    }
    get m33() {
        return this.nativeInstance.m33;
    }
    set m33(value) {
        this.nativeInstance.m33 = value;
    }
    get m34() {
        return this.nativeInstance.m34;
    }
    set m34(value) {
        this.nativeInstance.m34 = value;
    }
    get m41() {
        return this.nativeInstance.m41;
    }
    set m41(value) {
        this.nativeInstance.m41 = value;
    }
    get m42() {
        return this.nativeInstance.m42;
    }
    set m42(value) {
        this.nativeInstance.m42 = value;
    }
    get m43() {
        return this.nativeInstance.m43;
    }
    set m43(value) {
        this.nativeInstance.m43 = value;
    }
    get m44() {
        return this.nativeInstance.m44;
    }
    set m44(value) {
        this.nativeInstance.m44 = value;
    }
    translate(x, y) {
        const val = this.native.translate(x, y, this.native);
        if (val) {
            return new DOMMatrix(val);
        }
        return null;
    }
    translateSelf(x, y) {
        this.native.translateSelf(x, y);
    }
    multiplySelf(matrix) {
        this.native.multiplySelf(matrix);
    }
    preMultiplySelf(matrix) {
        this.native.premultiplySelf(matrix);
    }
    scaleNonUniform(x, y) {
        const val = this.native.scaleNonUniform(x, y, this.native);
        if (val) {
            return new DOMMatrix(val);
        }
        return null;
    }
    scale(x, y) {
        return this.scaleNonUniform(x, y);
    }
    scaleNonUniformSelf(x, y) {
        this.native.scaleNonUniformSelf(x, y);
    }
    scaleSelf(x, y) {
        this.scaleNonUniformSelf(x, y);
    }
    rotate(angle, cx, cy) {
        const val = this.native.rotate(angle, cx, cy, this.native);
        if (val) {
            return new DOMMatrix(val);
        }
        return null;
    }
    rotateSelf(angle, cx, cy) {
        this.native.rotateSelf(angle, cx, cy);
    }
    skewX(angle) {
        const val = this.native.skewX(angle, this.native);
        if (val) {
            return new DOMMatrix(val);
        }
        return null;
    }
    skewXSelf(angle) {
        this.native.skewXSelf(angle);
    }
    skewY(angle) {
        const val = this.native.skewY(angle, this.native);
        if (val) {
            return new DOMMatrix(val);
        }
        return null;
    }
    skewYSelf(angle) {
        this.native.skewYSelf(angle);
    }
    toJSON() {
        return {
            a: this.a,
            b: this.b,
            c: this.c,
            d: this.d,
            e: this.e,
            f: this.f,
            m11: this.m11,
            m12: this.m12,
            m13: this.m13,
            m14: this.m14,
            m21: this.m21,
            m22: this.m22,
            m23: this.m23,
            m24: this.m24,
            m31: this.m31,
            m32: this.m32,
            m33: this.m33,
            m34: this.m34,
            m41: this.m41,
            m42: this.m42,
            m43: this.m43,
            m44: this.m44,
        };
    }
}
(() => {
    Helpers.initialize();
})();
//# sourceMappingURL=index.js.map