/*
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 { PolylineBuilder } from "./PolylineBuilder";
import { Number_$type, markType } from "igniteui-react-core/ES2015/type";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
import { Dictionary$2 } from "igniteui-react-core/ES2015/Dictionary$2";
/**
 * @hidden
 */
export class ContourBuilder extends PolylineBuilder {
    constructor() {
        super(...arguments);
        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);
    }
    e() {
        super.e();
        this.f.clear();
        this.i.clear();
        this.j.clear();
    }
    get g() {
        return this.i;
    }
    get h() {
        return this.j;
    }
    k(a, b, c, d, e, f, g, h, i) {
        let j = Math.min(a, e) + 0x100000000 * Math.max(a, e);
        let k = -1;
        if (!((() => { let l = this.f.tryGetValue(j, k); k = l.p1; return l.ret; })())) {
            k = this.i.count;
            let 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.$);
