InterfaceRadialGradientOptions

interface RadialGradientOptions {
    radius?: number;
    stops: number[] | Record<number, number>;
    x?: number;
    y?: number;
}

Hierarchy (View Summary)

Properties

Properties

radius?: number

The radius of the last stop in pixels. Default: the distance to the farthest corner

stops: number[] | Record<number, number>

The colors along the gradient: their positions (0..1) and colors, like Colors.gradient takes them ({ 0: 0xff0000ff, 0.5: 0xffff00ff, 1: 0x00ff00ff }), or just the colors, evenly spaced ([0xff0000ff, 0x00ff00ff])

x?: number

The x position of the center in pixels. Default: the middle of the image

y?: number

The y position of the center in pixels. Default: the middle of the image