Color Class Documentation
class ColorNamespace:datalogics_interface
Detailed Description
A color specified by values appropriate for its color space.
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(double c, double m, double y, double k)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(double grey)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(double r, double g, double b)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:
std::unique_ptr< ColorSpace >The ColorSpace that this color belongs to.
The color space of the color.
get_value
std::vector< double > get_value()Returns:
std::vector< double >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!=
bool operator!=(const Color & other)Parameters
other: const Color &
Returns:
booltrue if other is not equal to this.
Inequality.
operator=
Parameters
: Color &&
Returns:
Color &operator==
bool operator==(const Color & other)Parameters
other: const Color &The Color to compare with.
Returns:
booltrue if the two colors are equal, false otherwise.
Determines whether this Color is equal to another.
Two Colors are considered equal if they have the same color space and the same component values.
to_string
std::string to_string()Returns:
std::stringA string describing the color, including its color space and component values.
Returns a string representation of this Color.