GradientDiamond
A diamond gradient is a color effect that transitions similar to the luster of a diamond.
class​
RequiredType
string
Value
constant: the value of this property must be equal to:
"gradientDiamond"
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
ellipse​
RequiredDescription
When the type is set to number, the line connecting from to to is regarded as one semi-axis of the ellipse, denoted as A. The length of the other semi-axis of the ellipse is denoted as B. Then, ellipse = B / A, which is used to represent the shape of the gradient. The semi-axis B is perpendicular to A and takes the counterclockwise direction.
When the type is set to point, it represents another point on the ellipse with 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
oneOf<
number
Point>