Files
2026-02-21 10:33:18 +01:00

17 lines
527 B
TypeScript

export interface ColorStop {
color: string;
position: number;
}
export interface LinearGradientInfo {
angle: number;
colorStops: ColorStop[];
}
export declare const parseLinearGradient: (backgroundImage: string) => LinearGradientInfo | null;
export declare const createCanvasGradient: ({ ctx, rect, gradientInfo, offsetLeft, offsetTop, }: {
ctx: OffscreenCanvasRenderingContext2D;
rect: DOMRect;
gradientInfo: LinearGradientInfo;
offsetLeft: number;
offsetTop: number;
}) => CanvasGradient;