ChartDirector Ver 3.0 (C++ Edition)

BaseChart.gradientColor2


Usage

int gradientColor(IntArray c, double angle = 90, double scale = 1, int startX = 0, int startY = 0);

Description

Create a multi-point gradient color.

This method is the same as DrawArea.gradientColor2. Please refer to DrawArea.gradientColor2 for details.

Arguments

ArgumentDefaultDescription
colorArray(Mandatory)An array defining the color points along the gradient line. See DrawArea.gradientColor2 for details.
angle90The direction of the gradient line segment in degrees. The default direction is horizontal from left to right (90 degrees).
scale1.0The scaling factor for the gradient line segment. By default, the gradient line segment is 256 pixels in length. The scaling factor can be use to stretch or compress the gradient line segment during drawing.
startX0The x coordinate of the starting point of the gradient line segment.
startY0The y coordinate of the starting point of the gradient line segment.

Return Value

Return a 32-bit integer acting as a handle to the gradient color. The handle can be used in any ChartDirector API that expects a color as an argument.