import { DeletableEntity } from "../../../../Core/DeletableEntity";
import type { IDeletable } from "../../../../Core/IDeletable";
import type { SCRTBrush, SCRTDoubleVector, TSciChart, UIntVector } from "../../../../types/TSciChart";
import { PaletteCache } from "../../../Drawing/PaletteCache";
import type { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D";
import type { IPaletteProvider } from "../../../Model/IPaletteProvider";
import type { IPointMetadata } from "../../../Model/IPointMetadata";
import type { IPointSeries } from "../../../Model/PointSeries/IPointSeries";
import type { RenderPassData } from "../../../Services/RenderPassData";
import type { TDpiChangedEventArgs } from "../../TextureManager/DpiHelper";
import type { IRenderableSeries } from "../IRenderableSeries";
import type { ISeriesDrawingProvider } from "./ISeriesDrawingProvider";
/** @ignore */
export interface ISCRTPen {
    m_bGradient: boolean;
    GetColor(): number;
}
/** @ignore */
export interface ISCRTBrush {
    GetColor(): number;
}
/** @ignore */
export interface ISCRTPalette extends IDeletable {
}
export type TPalettingState = {
    palettedColors: UIntVector;
    palettedColorsHashCode: number;
    gradientPaletting: boolean;
    paletteTextureCache?: PaletteCache;
    lastStartIndex?: number;
    lastCount?: number;
    lastResamplingHash?: number;
    paletteStartIndex?: number;
    requiresUpdate: boolean;
};
/**
 * Used internally - a drawing provider performs drawing for a specific chart-type or series using
 * our WebAssembly WebGL rendering engine
 */
export declare abstract class BaseSeriesDrawingProvider<T extends IRenderableSeries> extends DeletableEntity implements ISeriesDrawingProvider {
    /**
     * The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
     * access to our WebGL2 Engine and WebAssembly numerical methods
     */
    protected webAssemblyContext: TSciChart;
    /**
     * The Parent {@link IRenderableSeries | RenderableSeries}
     */
    protected parentSeries: T;
    /**
     * The Colour Paletting State object.
     */
    protected palettingState: TPalettingState;
    private parentDataSeries;
    /**
     * Creates an instance of the {@link BaseSeriesDrawingProvider}
     * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
     * access to our WebGL2 Engine and WebAssembly numerical methods
     * @param parentSeries the parent {@link IRenderableSeries | Renderable Series} which this drawing provider is attached to
     */
    protected constructor(webAssemblyContext: TSciChart, parentSeries: T, ySelector?: (ps: IPointSeries) => SCRTDoubleVector, xSelector?: (ps: IPointSeries) => SCRTDoubleVector);
    xSelector(ps: IPointSeries): SCRTDoubleVector;
    ySelector(ps: IPointSeries): SCRTDoubleVector;
    /**
     * Returns the startIndex and count to be passed to the native drawing provider.
     * If renderPassData exists and contains an indexRange, this will be used, otherwise the full size of the xValues will be used
     * @param renderPassData
     * @param xValues
     * @returns
     */
    getStartAndCount(renderPassData: RenderPassData, xValues: SCRTDoubleVector): {
        startIndex: number;
        count: number;
    };
    /**
     * Helper function to apply color-paletting to a {@link UIntVector} - where each element in the vector
     * is an ARGB color that defines stroke of the series
     * @param strokePen the current pen, as type {@link SCRTPen}
     * @param renderPassData optional renderPassData.  If not supplied, the current renderPassData for the parent series will be used
     * @returns the new {@link UIntVector} with ARGB colors
     */
    applyStrokePaletting(strokePen: ISCRTPen, renderPassData?: RenderPassData): void;
    applyStrokeFillPaletting(stroke: string, strokePen: ISCRTPen | undefined, fill: string, fillBrush: ISCRTBrush | undefined, opacity: number, usePalette?: boolean, resetPenBrushColors?: boolean, renderPassData?: RenderPassData): void;
    /**
     * Creates a native {@link SCRTBrush} Solid Color Brush from html color code string passed in
     * @param htmlColorCode The HTML Color code
     * @param opacity The opacity factor
     */
    createSolidBrush(htmlColorCode: string, opacity: number): SCRTBrush;
    /**
     * @inheritDoc
     */
    delete(): void;
    /**
     * @inheritDoc
     */
    abstract draw(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void;
    /**
     * @inheritDoc
     */
    onSeriesPropertyChange(propertyName: string): void;
    /**
     * @inheritDoc
     */
    onDpiChanged(args: TDpiChangedEventArgs): void;
    /**
     * @inheritDoc
     */
    onAttachSeries(): void;
    /**
     * @inheritDoc
     */
    onDetachSeries(): void;
    /** A hook so derived classes can change the args */
    updateArgs(renderPassData: RenderPassData): void;
    protected seriesHasDataChanges(): void;
    protected shouldUpdatePalette(renderPassData: RenderPassData, paletteProvider: IPaletteProvider, startIndex: number, count: number, isDoubled: boolean): void;
    protected overridePaletteProviderColors(rs: IRenderableSeries, xValue: number, yValue: number, index: number, opacity?: number, metadata?: IPointMetadata, otherValues?: Map<string, Float64Array>): {
        stroke: number | undefined;
        fill: number | undefined;
    };
    protected isGradientFillPaletting(rs: IRenderableSeries): boolean;
}
