2018-01-08 23:33:13 +03:00
|
|
|
namespace CairoChart {
|
2018-01-19 17:43:20 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* R/G/B/A Color.
|
|
|
|
*/
|
2017-08-28 14:47:31 +03:00
|
|
|
public struct Color {
|
2018-01-19 17:43:20 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Red component.
|
|
|
|
*/
|
2017-08-28 14:47:31 +03:00
|
|
|
double red;
|
2018-01-19 17:43:20 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Green component.
|
|
|
|
*/
|
2017-08-28 14:47:31 +03:00
|
|
|
double green;
|
2018-01-19 17:43:20 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Blue component.
|
|
|
|
*/
|
2017-08-28 14:47:31 +03:00
|
|
|
double blue;
|
2018-01-19 17:43:20 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Alpha component.
|
|
|
|
*/
|
2017-08-28 14:47:31 +03:00
|
|
|
double alpha;
|
|
|
|
|
2018-01-19 17:43:20 +03:00
|
|
|
/**
|
|
|
|
* Constructs a new ``Color``.
|
2018-01-19 18:15:51 +03:00
|
|
|
* @param red red component.
|
|
|
|
* @param green green component.
|
|
|
|
* @param blue blue component.
|
|
|
|
* @param alpha alpha component.
|
2018-01-19 17:43:20 +03:00
|
|
|
*/
|
2018-01-22 17:47:00 +03:00
|
|
|
public Color (double red = 0,
|
|
|
|
double green = 0,
|
|
|
|
double blue = 0,
|
|
|
|
double alpha = 1
|
2018-01-19 20:34:08 +03:00
|
|
|
) {
|
2018-01-19 17:43:20 +03:00
|
|
|
this.red = red;
|
|
|
|
this.green = green;
|
|
|
|
this.blue = blue;
|
|
|
|
this.alpha = alpha;
|
2017-08-28 14:47:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|