Color Class Documentation
classColorNamespace:datalogics_interface
Detailed Description
The values that are offered range from 0 to 1.0 for red, green, and blue (RGB) or cyan, magenta, yellow, and black (CYMK).
Referenced by
Uses types
Constructor & Destructor Documentation
Color
Color(Color &&)Parameters
: Color &&
Color
Color(const class Pattern &pattern)Parameters
pattern: const class Pattern &the grayscale color value for the new color (0.0 - 1.0)
Create a new color in the DeviceGray colorspace with the specified value.
Color
Color(const ColorSpace &color_space, const std::vector< double > &values)Parameters
color_space: const ColorSpace &the grayscale color value for the new color (0.0 - 1.0)
values: const std::vector< double > &
Create a new color in the DeviceGray colorspace with the specified value.
Color
Color(doublec, doublem, doubley, doublek)Parameters
c: doublethe grayscale color value for the new color (0.0 - 1.0)
m: doubley: doublek: double
Create a new color in the DeviceGray colorspace with the specified value.
Color
Color(doublegrey)Parameters
grey: doublethe grayscale color value for the new color (0.0 - 1.0)
Create a new color in the DeviceGray colorspace with the specified value.
Color
Color(doubler, doubleg, doubleb)Parameters
r: doublethe grayscale color value for the new color (0.0 - 1.0)
g: doubleb: double
Create a new color in the DeviceGray colorspace with the specified value.
~Color
~Color()Member Function Documentation
get_space
std::unique_ptr< ColorSpace >get_space()Returns:
The ColorSpace that this color belongs to.The color space of the color.
get_value
std::vector< double >get_value()Returns:
A list of color component values, each ranging from 0.0 to 1.0.The values of the color. Not valid for pattern-based colors.
operator!=
booloperator!=(const Color &other)Parameters
other: const Color &
Returns:
true if <code>other</code> is not equal to this.Inequality.
operator=
Parameters
: Color &&
Returns:
Color &operator==
booloperator==(const Color &other)Parameters
other: const Color &The Color to compare with.
Returns:
true if the two colors are equal, false otherwise.Two Colors are considered equal if they have the same color space and the same component values.
to_string
std::stringto_string()Returns:
A string describing the color, including its color space and component values.Returns a string representation of this Color.