import '../../../assert/js/assert.js';
import '../../../globals.js';
import { Paint, TColor } from '../imports.js';
export type GradientStop = {
    ratio: number;
    color: TColor;
};
export default abstract class Gradient extends Paint {
    stops: GradientStop[];
    private lastStopRatio;
    private canvasGradient;
    private colorStopsDirty;
    private lastColorStopValues;
    /**
     * TODO: add the ability to specify the color-stops inline. possibly [ [0,color1], [0.5,color2], [1,color3] ] https://github.com/phetsims/scenery/issues/1581
     */
    constructor();
    /**
     * Adds a color stop to the gradient.
     *
     * Color stops should be added in order (monotonically increasing ratio values).
     *
     * NOTE: Color stops should only be added before using the gradient as a fill/stroke. Adding stops afterwards
     *       will result in undefined behavior.
     * TODO: Catch attempts to do the above. https://github.com/phetsims/scenery/issues/1581
     *
     * @param ratio - Monotonically increasing value in the range of 0 to 1
     * @param color
     * @returns - for chaining
     */
    addColorStop(ratio: number, color: TColor): this;
    /**
     * Subtypes should return a fresh CanvasGradient type.
     */
    abstract createCanvasGradient(): CanvasGradient;
    /**
     * Returns stops suitable for direct SVG use.
     */
    getSVGStops(): GradientStop[];
    /**
     * Forces a re-check of whether colors have changed, so that the Canvas gradient can be regenerated if
     * necessary.
     */
    invalidateCanvasGradient(): void;
    /**
     * Compares the current color values with the last-recorded values for the current Canvas gradient.
     *
     * This is needed since the values of color properties (or the color itself) may change.
     */
    private haveCanvasColorStopsChanged;
    /**
     * Returns an object that can be passed to a Canvas context's fillStyle or strokeStyle.
     */
    getCanvasStyle(): CanvasGradient;
    /**
     * Returns the current value of the generally-allowed color types for Gradient, as a string.
     */
    static colorToString(color: TColor): string;
    isGradient: boolean;
}
//# sourceMappingURL=Gradient.d.ts.map