GradientLinear
A linear gradient refers to the effect of transitioning between two or more different colors in a straight line.
class​
RequiredType
string
Value
constant: the value of this property must be equal to:
"gradientLinear"
from​
RequiredDescription
A relative coordinate according to the bounds
, where (0, 0)
represents the top-left corner of the bounds
, and (1, -1)
represents the bottom-right corner of the bounds
.
Type
to​
RequiredDescription
A relative coordinate according to the bounds
, where (0, 0)
represents the top-left corner of the bounds
, and (1, -1)
represents the bottom-right corner of the bounds
.
Type
stops​
RequiredDescription
A list of positions shows how the colors transition from one to another.
If the number of items is 1
, it means the color of the stop will not transition.
Type
Array<GradientStop>
Value
minimum number of items: the minimum number of items for this array is: 1