fromLinearGradient

fun fromLinearGradient(width: Int, height: Int, angle: Int, start: Color, end: Color): Image

Creates an image with a linear gradient between two colors.

Return

An Image object representing the created gradient image.

Parameters

width

The width of the image.

height

The height of the image.

angle

The angle of the gradient in degrees (0-360).

start

The starting color of the gradient.

end

The ending color of the gradient.