ChartDirector 7.0 (Python Edition)

BaseChart.radialGradientColor2


Usage

radialGradientColor2(cx, cy, rx, ry, colorArray [, periodic ])

Description

Creates a multi-point radial gradient color.

The color stops are defined as an array of offsets and colors in the following format:

offset0, color0, offset1, color1, .... offsetN, colorN

The first offset (offset0) should be 0, which represents the center of the gradient defining ellipse. The last offset (offsetN) can be any number not greater than 100000. It represents the perimeter of the gradient defining ellipse. The other offsets represent the positions of the color stops in between.

For example, the array (in hex):

000000, FF0000, 000080, FFFF00, 000100, 00FF00

means the center (000000) is red (FF0000), the mid-point (000080 in hex) is yellow (FFFF00), and the perimeter (000100 in hex) is green (00FF00).

Arguments

ArgumentDefaultDescription
cx(Mandatory)The x coordinate of the center of the radial gradient.
cy(Mandatory)The y coordinate of the center of the radial gradient.
rx(Mandatory)The horizontal radius of the radial gradient defining ellipse.
ry(Mandatory)The vertical radius of the radial gradient defining ellipse.
colorArray(Mandatory)An array defining the offsets and colors of the color stops along the gradient.
periodicfalseSpecifies whether the gradient will repeat itself periodically. If the gradient does not repeat itself, the points that lie outside the gradient defining ellipse will assume the color at the perimeter of the gradient defining ellipse.

Return Value

A 32-bit integer representing the radial gradient color.