/*
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 * as tslib_1 from "tslib";
import { PolylineBuilder } from "./PolylineBuilder";
import { Number_$type, markType } from "igniteui-react-core/ES5/type";
import { List$1 } from "igniteui-react-core/ES5/List$1";
import { Dictionary$2 } from "igniteui-react-core/ES5/Dictionary$2";
/**
 * @hidden
 */
var ContourBuilder = /** @class */ (function (_super) {
    tslib_1.__extends(ContourBuilder, _super);
    function ContourBuilder() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.f = new Dictionary$2(Number_$type, Number_$type, 0);
        _this.i = new List$1(Number_$type, 0);
        _this.j = new List$1(Number_$type, 0);
        return _this;
    }
    ContourBuilder.prototype.e = function () {
        _super.prototype.e.call(this);
        this.f.clear();
        this.i.clear();
        this.j.clear();
    };
    Object.defineProperty(ContourBuilder.prototype, "g", {
        get: function () {
            return this.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ContourBuilder.prototype, "h", {
        get: function () {
            return this.j;
        },
        enumerable: true,
        configurable: true
    });
    ContourBuilder.prototype.k = function (a, b, c, d, e, f, g, h, i) {
        var _this = this;
        var j = Math.min(a, e) + 0x100000000 * Math.max(a, e);
        var k = -1;
        if (!((function () { var l = _this.f.tryGetValue(j, k); k = l.p1; return l.ret; })())) {
            k = this.i.count;
            var l = (i - d) / (h - d);
            this.f.addItem(j, k);
            this.i.add((b + l * (f - b)));
            this.j.add((c + l * (g - c)));
        }
        return k;
    };
    ContourBuilder.$t = markType(ContourBuilder, 'ContourBuilder', PolylineBuilder.$);
    return ContourBuilder;
}(PolylineBuilder));
export { ContourBuilder };
