ChartDirector 6.2 (.NET Edition)

DrawArea.radialGradientColor2


Usage

[C#] public int radialGradientColor2(int cx, int cy, int rx, int ry, int[] colorArray [, bool periodic ]);
[VB] Public Function radialGradientColor2(cx As Integer, cy As Integer, rx As Integer, ry As Integer, colorArray As Integer() [, periodic As Boolean ]) As Integer

Description

Creates a multi-point radial gradient color.

In this method, the color points are defined as an array of radial distances and colors, in the following format:

distance0, color0, distance1, color1, .... distanceN, colorN

The distances are specified as a number from 0 - 256 (0 - 100 in hex), in which 0 represents the center of the gradient defining ellipse, and 256 (100 in hex) represents the perimeter of the gradient defining ellipse.

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 radial distances and colors.
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.