Creates an angle gradient color.
An angle gradient color is a color that depends on the compass bearing of the pixel relative to the center point. The north (upward) direction is zero degree, and the angle is the clockwise angle from the north direction.
ChartDirector supports "smooth angle gradient" and "step angle gradient". For a smooth angle gradient, the color changes smoothly from one color stop to the next color stop. For a step angle gradient, the color remains unchanged between the color stops, but change abruptly once it reaches the next color stop.
The color stops are defined as an array of offsets and colors. For a smooth angle gradient, the offsets and colors should be in the following format:
offset0, color0, offset1, color1, .... offsetN, colorN
The first offset (offset0) should be 0, which represents the start angle of the gradient, and color0 is the color at that offset. The last offset (offsetN) can be any number not greater than 100000. It represents the end angle of the gradient, and colorN represents the color at the that offset. The other offsets and colors represent the angles and colors of the color stops in between.
For a step angle gradient, the offsets and colors should be in the following format:
offset0, color0, offset1, color1, ...., offsetP, colorP, offsetN
Note that for a step color gradient, there is one more offset than colors. If there are 10 color steps, it will have 10 colors and 11 offsets. The offsets represent angles and are interpreted the same as in smooth angle gradient. The colors are applied between the offsets. For example, color0 is the color between offset0 and offset1, and color1 is the color between offset1 and offset2.
© 2021 Advanced Software Engineering Limited. All rights reserved.