/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { Base, markType } from "igniteui-angular-core";
import { CanvasViewRenderer } from "igniteui-angular-core";
/**
 * @hidden
 */
var MarkerTemplates = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(MarkerTemplates, _super);
    function MarkerTemplates() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    MarkerTemplates.n = function (a, b, c) {
        a.beginPath();
        var d = b.actualItemBrush;
        var e = b.outline;
        if (d != null) {
            if (d.isGradient) {
                var f = c.availableWidth / 2;
                var g = c.availableHeight / 2;
                var h = c.xPosition - f;
                var i = c.yPosition - f;
                h += c.renderOffsetX;
                i += c.renderOffsetY;
                var j = CanvasViewRenderer.k(a, d, h, i, h + c.availableWidth, i + c.availableHeight, b.thickness, false);
                a.fillStyle = j;
            }
            else {
                if (a.fillStyle != d._fill) {
                    a.fillStyle = d._fill;
                }
            }
        }
        if (b.outline != null) {
            if (b.outline.isGradient) {
                var k = c.availableWidth / 2;
                var l = c.availableHeight / 2;
                var m = c.xPosition - k;
                var n = c.yPosition - k;
                m += c.renderOffsetX;
                n += c.renderOffsetY;
                var o = CanvasViewRenderer.k(a, b.outline, m, n, m + c.availableWidth, n + c.availableHeight, b.thickness, true);
                a.strokeStyle = o;
            }
            else {
                if (a.strokeStyle != b.outline._fill) {
                    a.strokeStyle = b.outline._fill;
                }
            }
            a.lineWidth = b.thickness;
        }
    };
    MarkerTemplates.a = function (a, b) {
        a.closePath();
        if (b.actualItemBrush != null) {
            a.fill();
        }
        if (b.outline != null) {
            a.stroke();
        }
    };
    MarkerTemplates.b = function (a) {
        a.isConstant = true;
        a.width = 8;
        a.height = 8;
    };
    MarkerTemplates.d = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = Math.min(a.availableWidth, a.availableHeight) / 2;
        b.arc(a.xPosition, a.yPosition, d, 0, (Math.PI * 2), false);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.m = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f, g);
        b.lineTo(f + e, g + a.availableHeight);
        b.lineTo(f + a.availableWidth, g + 0);
        b.lineTo(f, g);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.j = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f, g + a.availableHeight);
        b.lineTo(f + e, g + 0);
        b.lineTo(f + a.availableWidth, g + a.availableHeight);
        b.lineTo(f, g + a.availableHeight);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.k = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.rect(f, g, a.availableWidth, a.availableHeight);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.c = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var left_ = (a.xPosition - e);
        var top_ = (a.yPosition - d);
        b.rect((left_ | 0), (top_ | 0), a.availableWidth, a.availableHeight);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.e = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f + 0, g + d);
        b.lineTo(f + e, g + a.availableHeight);
        b.lineTo(f + a.availableWidth, g + d);
        b.lineTo(f + e, g + 0);
        b.lineTo(f + 0, g + d);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.h = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f + ((4 / 8) * a.availableWidth), g + 0);
        b.lineTo(f + ((0.1956000030040741 / 8) * a.availableWidth), g + ((2.7639999389648438 / 8) * a.availableHeight));
        b.lineTo(f + ((1.6499999761581421 / 8) * a.availableWidth), g + ((7.2360000610351562 / 8) * a.availableHeight));
        b.lineTo(f + ((6.3499999046325684 / 8) * a.availableWidth), g + ((7.2360000610351562 / 8) * a.availableHeight));
        b.lineTo(f + ((7.8043999671936035 / 8) * a.availableWidth), g + ((2.7639999389648438 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + 0);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.f = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f + ((4 / 8) * a.availableWidth), g + 0);
        b.lineTo(f + ((0.35600000619888306 / 8) * a.availableWidth), g + ((2 / 8) * a.availableHeight));
        b.lineTo(f + ((0.35600000619888306 / 8) * a.availableWidth), g + ((6 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + (a.availableHeight));
        b.lineTo(f + ((7.4640002250671387 / 8) * a.availableWidth), g + ((6 / 8) * a.availableHeight));
        b.lineTo(f + ((7.4640002250671387 / 8) * a.availableWidth), g + ((2 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + 0);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.l = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f + ((4 / 8) * a.availableWidth), g + 0);
        b.lineTo(f + ((2.5855998992919922 / 8) * a.availableWidth), g + ((2.5856 / 8) * a.availableHeight));
        b.lineTo(f + ((0 / 8) * a.availableWidth), g + ((4 / 8) * a.availableHeight));
        b.lineTo(f + ((2.5855998992919922 / 8) * a.availableWidth), g + ((5.4144001007080078 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + ((8 / 8) * a.availableHeight));
        b.lineTo(f + ((5.4144001007080078 / 8) * a.availableWidth), g + ((5.4144001007080078 / 8) * a.availableHeight));
        b.lineTo(f + ((8 / 8) * a.availableWidth), g + ((4 / 8) * a.availableHeight));
        b.lineTo(f + ((5.4144001007080078 / 8) * a.availableWidth), g + ((2.5855998992919922 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + 0);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.i = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f + ((4 / 8) * a.availableWidth), g + 0);
        b.lineTo(f + ((2.8243999481201172 / 8) * a.availableWidth), g + ((2.382 / 8) * a.availableHeight));
        b.lineTo(f + ((0.1956 / 8) * a.availableWidth), g + ((2.7639999389648438 / 8) * a.availableHeight));
        b.lineTo(f + ((2.0980000495910645 / 8) * a.availableWidth), g + ((4.6180000305175781 / 8) * a.availableHeight));
        b.lineTo(f + ((1.6488000154495239 / 8) * a.availableWidth), g + ((7.2360000610351562 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + ((6 / 8) * a.availableHeight));
        b.lineTo(f + ((6.3512 / 8) * a.availableWidth), g + ((7.2360000610351562 / 8) * a.availableHeight));
        b.lineTo(f + ((5.9019999504089355 / 8) * a.availableWidth), g + ((4.6180000305175781 / 8) * a.availableHeight));
        b.lineTo(f + ((7.8043999671936035 / 8) * a.availableWidth), g + ((2.7639999389648438 / 8) * a.availableHeight));
        b.lineTo(f + ((5.1756000518798828 / 8) * a.availableWidth), g + ((2.3819999694824219 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + 0);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.g = function (a) {
        var b = a.context;
        var c = a.data;
        MarkerTemplates.n(b, c, a);
        var d = (a.availableHeight / 2);
        var e = (a.availableWidth / 2);
        var f = (a.xPosition - e);
        var g = (a.yPosition - d);
        b.moveTo(f + ((4 / 8) * a.availableWidth), g + 0);
        b.lineTo(f + ((3 / 8) * a.availableWidth), g + ((2.268 / 8) * a.availableHeight));
        b.lineTo(f + ((0.536 / 8) * a.availableWidth), g + ((2 / 8) * a.availableHeight));
        b.lineTo(f + ((2 / 8) * a.availableWidth), g + ((4 / 8) * a.availableHeight));
        b.lineTo(f + ((0.536 / 8) * a.availableWidth), g + ((6 / 8) * a.availableHeight));
        b.lineTo(f + ((3 / 8) * a.availableWidth), g + ((5.73199987411499 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + ((8 / 8) * a.availableHeight));
        b.lineTo(f + ((5 / 8) * a.availableWidth), g + ((5.73199987411499 / 8) * a.availableHeight));
        b.lineTo(f + ((7.4640002250671387 / 8) * a.availableWidth), g + ((6 / 8) * a.availableHeight));
        b.lineTo(f + ((6 / 8) * a.availableWidth), g + ((4 / 8) * a.availableHeight));
        b.lineTo(f + ((7.4640002250671387 / 8) * a.availableWidth), g + ((2 / 8) * a.availableHeight));
        b.lineTo(f + ((5 / 8) * a.availableWidth), g + ((2.2679998874664307 / 8) * a.availableHeight));
        b.lineTo(f + ((4 / 8) * a.availableWidth), g + 0);
        MarkerTemplates.a(b, c);
    };
    MarkerTemplates.$t = markType(MarkerTemplates, 'MarkerTemplates');
    return MarkerTemplates;
}(Base));
export { MarkerTemplates };
