import '../../../assert/js/assert.js';
import '../../../globals.js';
/**
 * RenderProgram for a linear blend (essentially a chunk of a linear gradient with only a linear transition between
 * two things.
 *
 * RenderLinearBlend will interpolate between two different RenderPrograms based on the location. It will evaluate
 * `clamp( dot( scaledNormal, point ) - offset, 0, 1 )`, and will linearly blend between the "zero"
 * program (when the value is 0) and the "one" program (when the value is 1).
 *
 * It can be used in a standalone way, however it is primarily meant to be used when a `RenderLinearGradient`
 * is split into each linear segment.
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import Matrix3 from '../../../dot/js/Matrix3.js';
import Vector2 from '../../../dot/js/Vector2.js';
import Vector4 from '../../../dot/js/Vector4.js';
import { ByteEncoder, RenderEvaluationContext, RenderExecutionStack, RenderExecutor, RenderInstruction, RenderInstructionLocation, RenderProgram, RenderRadialBlendLogic, SerializedRenderProgram } from '../imports.js';
export declare enum RenderLinearBlendAccuracy {
    Accurate = 0,
    PixelCenter = 1
}
export default class RenderLinearBlend extends RenderProgram {
    readonly scaledNormal: Vector2;
    readonly offset: number;
    readonly accuracy: RenderLinearBlendAccuracy;
    readonly zero: RenderProgram;
    readonly one: RenderProgram;
    readonly logic: RenderLinearBlendLogic;
    constructor(scaledNormal: Vector2, offset: number, accuracy: RenderLinearBlendAccuracy, zero: RenderProgram, one: RenderProgram, logic?: RenderLinearBlendLogic);
    getName(): string;
    withChildren(children: RenderProgram[]): RenderLinearBlend;
    transformed(transform: Matrix3): RenderProgram;
    protected equalsTyped(other: this): boolean;
    protected getSimplified(children: RenderProgram[]): RenderProgram | null;
    evaluate(context: RenderEvaluationContext): Vector4;
    writeInstructions(instructions: RenderInstruction[]): void;
    serialize(): SerializedRenderLinearBlend;
    static deserialize(obj: SerializedRenderLinearBlend): RenderLinearBlend;
}
export declare class RenderLinearBlendLogic {
    readonly scaledNormal: Vector2;
    readonly offset: number;
    readonly accuracy: RenderLinearBlendAccuracy;
    constructor(scaledNormal: Vector2, offset: number, accuracy: RenderLinearBlendAccuracy);
    equals(other: RenderLinearBlendLogic): boolean;
    computeLinearValue(context: RenderEvaluationContext): number;
}
export declare class RenderInstructionComputeBlendRatio extends RenderInstruction {
    readonly logic: RenderLinearBlendLogic | RenderRadialBlendLogic;
    readonly zeroLocation: RenderInstructionLocation;
    readonly oneLocation: RenderInstructionLocation;
    readonly blendLocation: RenderInstructionLocation;
    constructor(logic: RenderLinearBlendLogic | RenderRadialBlendLogic, zeroLocation: RenderInstructionLocation, oneLocation: RenderInstructionLocation, blendLocation: RenderInstructionLocation);
    toString(): string;
    equals(other: RenderInstruction, areLocationsEqual: (a: RenderInstructionLocation, b: RenderInstructionLocation) => boolean): boolean;
    execute(stack: RenderExecutionStack, context: RenderEvaluationContext, executor: RenderExecutor): void;
    writeBinary(encoder: ByteEncoder, getOffset: (location: RenderInstructionLocation) => number): void;
    static fromBinary(encoder: ByteEncoder, offset: number, getLocation: (offset: number) => RenderInstructionLocation): RenderInstructionComputeBlendRatio;
    getBinaryLength(): number;
}
export declare class RenderInstructionLinearBlend extends RenderInstruction {
    toString(): string;
    equals(other: RenderInstruction, areLocationsEqual: (a: RenderInstructionLocation, b: RenderInstructionLocation) => boolean): boolean;
    execute(stack: RenderExecutionStack, context: RenderEvaluationContext, executor: RenderExecutor): void;
    writeBinary(encoder: ByteEncoder, getOffset: (location: RenderInstructionLocation) => number): void;
    getBinaryLength(): number;
    static readonly INSTANCE: RenderInstructionLinearBlend;
}
export type SerializedRenderLinearBlend = {
    type: 'RenderLinearBlend';
    scaledNormal: number[];
    offset: number;
    accuracy: RenderLinearBlendAccuracy;
    zero: SerializedRenderProgram;
    one: SerializedRenderProgram;
};
//# sourceMappingURL=RenderLinearBlend.d.ts.map