Prev: length.html Up Next: object-hierarchy.html
Color

Practical Guide: You can define colors using the RGB values:
color mycolor(0.2, 0.4, 0.9);
There are some predefined colors such as red, green, blue, ....

Blop uses RGB color specifications, where the red, green and blue values can be in the range [0..1]. To define a color, use the constructor, which accepts these three values:
   color mycolor(0.2, 0.3, 0.9);
You can access or set these components with the following member functions (those three functions, which set the corresponding values [= accept a double argument] return a reference to the color object so that other setting functions can be called, according the the general concepts of blop)
   color &red(double);
   double red() const;

   color &green(double);
   double green() const;

   color &blue(double);
   double blue() const;

Source files:
   color.h
   color.cc

Prev: length.html Up Next: object-hierarchy.html