import type { Bounds } from 'vega-scenegraph'; import type { GPUVegaCanvasContext, GPUVegaScene } from '../types/context.js'; import type { SceneItem, SceneRectExt } from '../types/scene.js'; import { BufferManager } from '../util/bufferManager.js'; import { type OutlinePipelines, type Ramp } from './util.js'; /** What a rect, or a group's background, draws with. */ export interface RectResources { device: GPUDevice; /** Labels the pipelines and the bind groups made from them. */ name: string; bufferManager: BufferManager; /** The box, one pipeline per blend mode. */ pipelineFor: (blend: string) => GPURenderPipeline; gradientPipelineFor: (blend: string) => GPURenderPipeline; geometryBuffer: GPUBuffer; /** Pipelines for an outline drawn through the segment shader. */ outline: OutlinePipelines; } export declare function rectResources(ctx: GPUVegaCanvasContext, device: GPUDevice, vb: Bounds, name: string): RectResources; /** * Draws boxes in the order they are painted: fills in runs, and a ramp fill or * a border drawn as segments on its own. */ export declare class BoxPainter { private readonly res; private readonly fill; private readonly outline; private readonly run; constructor(ctx: GPUVegaCanvasContext, device: GPUDevice, res: RectResources); /** A box's fill, and its stroke when the analytic one draws it. */ paint(box: SceneRectExt, fillRamp: Ramp | null, blend: string): void; /** A border drawn as segments, over everything painted before it. */ border(data: Float32Array, ramp: Ramp | null, blend: string): void; flush(): void; private enqueue; } declare function draw(device: GPUDevice, ctx: GPUVegaCanvasContext, scene: GPUVegaScene, vb: Bounds): void; export declare function rectAttributes(items: SceneItem[], whiteGradientFill?: boolean): Float32Array; declare const _default: { draw: typeof draw; }; export default _default;