import { Color } from './color'; import { Point2D } from './point2d'; /** * GradientStop data. */ export interface GradientStopData { /** * The position of this color within a gradient as percentage value where 1.0 is 100%. The stop position can be less * than 0 or greater than 1. */ position: number; /** * The color at this stop position within a gradient. */ color: Color; } declare const GradientStop_base: new (overrides?: Partial | undefined) => import("@diez/engine").Prefab & GradientStopData; /** * Provides a gradient stop. * * @noinheritdoc */ export declare class GradientStop extends GradientStop_base { defaults: { position: number; color: Color; }; /** * Creates an gradient stop. * * `const gradientStop = GradientStop.make(0, Color.rgb(255, 0, 0));` */ static make(position: number, color: Color): GradientStop; toPresentableValue(): string; } /** * The direction of a linear gradient relative to the containing view's edges. */ export declare const enum Toward { Top = 0, TopRight = 45, Right = 90, BottomRight = 135, Bottom = 180, BottomLeft = 225, Left = 270, TopLeft = 315 } /** * LinearGradient data. */ export interface LinearGradientData { /** * The color stops within the gradient. * * The position of a stop is represented as a percentage value where 1.0 is 100%. The stop position can be less than * 0 or greater than 1. */ stops: GradientStop[]; /** * The start position of the gradient in a coordinate space where (0, 0) is top left and (1, 1) is bottom right. */ start: Point2D; /** * The end position of the gradient in a coordinate space where (0, 0) is top left and (1, 1) is bottom right. */ end: Point2D; } declare const LinearGradient_base: new (overrides?: Partial | undefined) => import("@diez/engine").Prefab & LinearGradientData; /** * Provides a linear gradient. * * @noinheritdoc */ export declare class LinearGradient extends LinearGradient_base { defaults: { stops: GradientStop[]; start: Point2D; end: Point2D; }; /** * Constructs a linear gradient using an angle in degrees, or a [[Toward]] value, that specifies the direction of the * `LinearGradient`, where 0 degrees generates a gradient from bottom to top and positive is clockwise. * * @param angle: The direction that the linear gradient is generated in. This can be a number (in degrees) or a * [[Toward]] value (e.g. `Toward.TopRight`). * @param colors: The colors that make up the gradient. * * `gradient = LinearGradient.make(Toward.TopRight, Color.rgb(255, 0, 0), Color.rgb(0, 0, 255));` */ static make(angle: Toward | number, ...colors: Color[]): LinearGradient; /** * Creates a multi-colored gradient between the provided start and end points. * * (0, 0) represents the top left. * (1, 1) represents the bottom right. * * `gradient = LinearGradient.makeWithPoints(0, 0, 1, 1, Color.rgb(255, 0, 0), Color.rgb(0, 0, 255));` */ static makeWithPoints(x1: number, y1: number, x2: number, y2: number, ...colors: Color[]): LinearGradient; sanitize(data: LinearGradientData): LinearGradientData; toPresentableValue(): string; } export {}; //# sourceMappingURL=linear-gradient.d.ts.map