import '../../../globals.js';
/**
 * Represents an abstract rendering program, that may be location-varying
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector4 from '../../../dot/js/Vector4.js';
import { ClippableFace, RenderableFace, RenderColorSpace, RenderEvaluationContext, RenderInstruction, RenderPath, RenderProgramNeeds } from '../imports.js';
export type RenderEvaluator = (context: RenderEvaluationContext, output: Vector4) => Vector4;
export default abstract class RenderProgram {
    readonly children: RenderProgram[];
    isSimplified: boolean;
    readonly isFullyTransparent: boolean;
    readonly isFullyOpaque: boolean;
    readonly needsFace: boolean;
    readonly needsArea: boolean;
    readonly needsCentroid: boolean;
    readonly hasPathBoolean: boolean;
    static simplify: boolean;
    constructor(children: RenderProgram[], isFullyTransparent: boolean, isFullyOpaque: boolean, needsFace?: boolean, needsArea?: boolean, needsCentroid?: boolean);
    /**
     * Should return an otherwise-identical version of the RenderProgram with the given children.
     */
    abstract withChildren(children: RenderProgram[]): RenderProgram;
    /**
     * Should return the name of the RenderProgram, for serialization and debugging purposes.
     */
    abstract getName(): string;
    simplified(): RenderProgram;
    /**
     * This is an internal method for RenderPrograms to implement their simplification. It will get called by
     * simplified() with pre-simplified children.
     *
     * null should be returned when there is no simplification possible. The simplification engine will be able to use
     * this information to reduce the number of RenderPrograms created during simplification. (For instance, if
     * none of the children were actually simplified, it will be able to mark THIS RenderProgram as being
     * "fully simplified", and further calls to simplified() can short-circuit.
     */
    protected getSimplified(children: RenderProgram[]): RenderProgram | null;
    writeInstructions(instructions: RenderInstruction[]): void;
    abstract evaluate(context: RenderEvaluationContext): Vector4;
    equals(other: RenderProgram): boolean;
    protected equalsTyped(other: this): boolean;
    getEvaluator(): RenderEvaluator;
    /**
     * Returns a new RenderProgram with the given transform applied to it.
     *
     * NOTE: Default implementation, should be overridden by subclasses that have positioning information embedded inside
     */
    transformed(transform: Matrix3): RenderProgram;
    depthFirst(callback: (program: RenderProgram) => void): void;
    containsRenderProgram(renderProgram: RenderProgram): boolean;
    replace(callback: (program: RenderProgram) => RenderProgram | null): RenderProgram;
    withPathInclusion(pathTest: (renderPath: RenderPath) => boolean): RenderProgram;
    isSplittable(): boolean;
    split(face: RenderableFace): RenderableFace[];
    getNeeds(): RenderProgramNeeds;
    colorConverted(fromSpace: RenderColorSpace, toSpace: RenderColorSpace): RenderProgram;
    toRecursiveString(indent?: string): string;
    protected getExtraDebugString(): string;
    print(): void;
    abstract serialize(): SerializedRenderProgram;
    static deserialize(obj: SerializedRenderProgram): RenderProgram;
    static ensureFace(face: ClippableFace | null, minX: number, minY: number, maxX: number, maxY: number): ClippableFace;
    static closureIsFullyTransparent(renderProgram: RenderProgram): boolean;
    static closureIsFullyOpaque(renderProgram: RenderProgram): boolean;
    static closureSimplified(renderProgram: RenderProgram): RenderProgram;
}
export type SerializedRenderProgram = {
    type: string;
};
//# sourceMappingURL=RenderProgram.d.ts.map