gxc-renderer-base/lib/src/interfaces/fill.ts
Andrey Kernichniy ea24060c57
Some checks failed
CI / build (push) Failing after 15s
Update CI/CD, added dev dependencies
2026-03-07 01:14:14 +07:00

39 lines
753 B
TypeScript

import { IRgbColor } from "./color";
import { IPoint } from "@gxc-solutions/math";
export type FillType = "solid" | "texture";
export type GradientType = "liner" | "radial" | "conic";
export interface IBaseFill {
type: GradientType | FillType;
}
export interface ISolidFill extends IBaseFill {
type: "solid";
color: IRgbColor;
}
export interface ITextureFill extends IBaseFill {
type: "texture";
texture: HTMLImageElement;
}
export interface IGradientStop {
offset: number;
color: IRgbColor;
}
export interface ILinerGradient extends IBaseFill {
type: "liner";
start: IPoint;
end: IPoint;
stops: IGradientStop[];
}
export interface IRadialGradient {
type: "radial";
}
export interface IConicGradient {
type: "conic";
}