/*
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 { Base, markType } from "igniteui-angular-core";
import { ExcelUtils } from "./ExcelUtils";
import { ArgumentOutOfRangeException } from "igniteui-angular-core";
/**
 * Describes the location and color of a transition
 * point in a <see cref="ChartGradientFill">gradient</see>.
 */
export class GradientStop extends Base {
    constructor(color, position) {
        super();
        this._a = null;
        this._c = 0;
        GradientStop._e(position);
        this._a = color;
        this._c = position;
    }
    /**
     * Returns the color for this gradient stop.
     */
    get color() {
        return this._a;
    }
    /**
     * Returns the position of this gradient stop, as a number between 0 and 1.
     * <p class="body">
     * The value assigned to the Position property represents a fraction
     * of the area to which the gradient is applied.
     * </p>
     * <p class="body">
     * For example, to add two stops of equal length, create one GradientStop
     * with a position of .5 and another with a position of 1.0.
     * </p>
     * <p class="body">
     * The first stop extends from the origin to the halfway point of the fill area,
     * and the second extends from the end of the first to the endpoint of the area
     * to be filled. For three uniform stops, use .33. .67, and 1.0 as the respective
     * positions; for four, use .25, .5, .75, and 1.0, etc.
     * </p>
     */
    get position() {
        return this._c;
    }
    /**
     * @hidden
     */
    static _e(a, b = null) {
        if (a < 0 || a > 1) {
            let c = ExcelUtils.ef("LE_GradientStop_InvalidPosition");
            throw new ArgumentOutOfRangeException(2, b, c);
        }
    }
}
GradientStop.$t = markType(GradientStop, 'GradientStop');
//# sourceMappingURL=GradientStop.js.map