ChartDirector 7.1 (C++ Edition)

DrawArea.adjustBrightness


Usage

int adjustBrightness(int c, double brightness);

Description

Creates a color that is a darkened or brightened version of the given color.

A brightness less than 1 means the color is darkened, while a brightness greater than 1 means the color is brightened. For example, a brightness of 0.5 means the color is half as bright as the original color. If the original color is red, the color will become dark red. Conversely, a brightness of 2 means the color is twice as bright as the original color. If the original color is red, the color will become light red.

Arguments

ArgumentDefaultDescription
c(Mandatory)The given color.
brightness(Mandatory)A non-negative number represent the factor to darken or brighten the color.

Return Value

A 32-bit integer representing the darkened or brightened color.