import type { GPUVegaCanvasContext } from '../types/context.js'; import type { ItemGeometry, PathGeometry } from '../types/geometry.js'; import type { FillStyle, StrokeStyle } from '../types/scene.js'; export type GeometryItem = FillStyle & StrokeStyle & { opacity?: number; }; /** * A path item's own transform, applied the way the canvas mark does it: the * path coordinates scale, then the whole thing rotates about the item origin. * Scaling before the stroke is extruded is what keeps the stroke width uniform, * which is the `non-scaling-stroke` the svg renderer asks for. */ export interface ItemTransform { angle: number; scaleX: number; scaleY: number; } /** An item's `angle` in radians, which vega gives in degrees. */ export declare function itemTurn(item: { angle?: number; }): number; /** * Converts triangulated path geometry into per-item fill and stroke * triangle buffers. `dx`/`dy` apply an item-local translation (e.g. the * x/y of a path mark item). Group translation is handled by the render * offset uniform and must NOT be baked in here. */ export default function geometryForItem(context: GPUVegaCanvasContext, item: GeometryItem, shapeGeom: PathGeometry, cache?: boolean, dx?: number, dy?: number, transform?: ItemTransform): ItemGeometry;