Purpose:
|
Defines the red, green, and blue colors for the display.
|
|
Derivation:
|
rgb_color : -
|
|
Filename:
|
rbase/rnd_husk/rgbcolor.hxx
|
|
Description:
|
This class defines the red, green, and blue colors for the display.
|
|
References:
|
by RBASE
|
ATTRIB_RGB
|
|
Constructor:
|
public: rgb_color::rgb_color
();
|
|
|
C++ allocation constructor requests memory for this object but does not populate it.
|
|
|
|
|
|
|
public: rgb_color::rgb_color
(
|
|
|
double p[ 3 ]
|
// array of 3 doubles
|
|
|
);
|
|
|
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. Creates a
rgb_color using the specified array of three doubles.
|
|
|
|
|
|
|
public: rgb_color::rgb_color
(
|
|
|
double r,
|
// red color value
|
|
|
double g,
|
// green color value
|
|
|
double b
|
// blue color value
|
|
|
);
|
|
|
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. Creates a
rgb_color using the specified three doubles.
|
|
|
|
|
|
|
public: rgb_color::rgb_color
(
|
|
|
int index
|
// integer color value
|
|
|
);
|
|
|
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
|
|
|
|
Methods:
|
public: double rgb_color::blue
() const;.
|
|
|
Returns the blue color value
|
|
|
|
|
|
|
public: double rgb_color::green
() const;
|
|
|
Returns the green color value.
|
|
|
|
|
|
|
public: operator rgb_color::int
();
|
|
|
Extracts a color value.
|
|
|
|
|
|
|
public: RGBColor* rgb_color::mac_color
(
|
|
|
RGBColor* mac_rgb
|
// mac color
|
|
|
);
|
|
|
When running in the Macintosh Environment, then this defines an additional method for converting to an RGBColor record.
|
|
|
|
|
|
|
public: int rgb_color::operator!=
(
|
|
|
const rgb_color& c
|
// rgb color value
|
|
|
) const;
|
|
|
Determines whether the color is not equal to another color.
|
|
|
|
|
|
|
public: int rgb_color::operator==
(
|
|
|
const rgb_color& c
|
// rgb color value
|
|
|
) const;
|
|
|
Determines whether a color is equal to another color.
|
|
|
|
|
|
|
public: double rgb_color::red
() const;
|
|
|
Returns the red color value.
|
|
|
|
|
|
|
public: void rgb_color::set_blue
(
|
|
|
double b
|
// blue component
|
|
|
);
|
|
|
Sets the blue component.
|
|
|
|
|
|
|
public: void rgb_color::set_green
(
|
|
|
double g
|
// green component
|
|
|
);
|
|
|
Sets the green component.
|
|
|
|
|
|
|
public: void rgb_color::set_mac_color
(
|
|
|
RGBColor mac_rgb
|
// color for mac
|
|
|
);
|
|
|
When running in the Macintosh Environment, then this defines an additional method for converting to an RGBColor record.
|
|
|
|
|
|
|
public: void rgb_color::set_red
(
|
|
|
double r
|
// red component
|
|
|
);
|
|
|
Sets the red component.
|
|
|
|
|
|
|
public: void rgb_color::set_windows_color
(
|
|
|
unsigned long from
|
// Windows GDI color
|
|
|
);
|
|
|
For NT platforms only. Set the color values from a Windows
COLORREF.
|
|
|
|
|
|
|
public: unsigned long
|
|
|
rgb_color::windows_color () const;
|
|
|
For NT platforms only. Convert to a Windows
COLORREF.
|