#include <gfx/gbcolor.h>
Public Member Functions | |
GbColor (double v=1.0) | |
Construct with a given luminance (default = white). | |
GbColor (double r, double g, double b, double a) | |
Construct with given red/green/blue/alpha values. | |
Gfx::RgbaColor & | color () |
Get the underlying color value. | |
const Gfx::RgbaColor & | color () const |
Get the underlying color value. | |
virtual rutz::fstring | value_typename () const |
Get a string describing the underlying native type. | |
virtual const double * | const_begin () const |
Returns a const pointer to the start of the underlying storage. | |
double & | r () |
const double & | r () const |
double & | g () |
const double & | g () const |
double & | b () |
const double & | b () const |
double & | a () |
const double & | a () const |
void | get (double &r_, double &g_, double &b_, double &a_) const |
void | set (double r_, double g_, double b_, double a_) |
double * | data () |
const double * | data () const |
virtual void | print_to (std::ostream &os) const |
Write the value to a std::ostream . | |
virtual void | scan_from (std::istream &is) |
Read the value from a std::istream . | |
rutz::fstring | get_string () const |
Get an rutz::fstring representation of the value. | |
void | set_string (rutz::fstring val) |
Set the value from an rutz::fstring. | |
Protected Member Functions | |
const double * | const_end () const |
Returns a const pointer to one-past-the-end of the underlying storage. | |
double * | mutable_begin () |
Returns a non-const pointer to the start of the underlying storage. | |
double * | mutable_end () |
Returns a non-const pointer to one-past-the-end of the underlying storage. |
Definition at line 42 of file gbcolor.h.
rutz::fstring rutz::value::get_string | ( | ) | const [inherited] |
Get an rutz::fstring
representation of the value.
Builds a string stream, calls print_to(), and returns its value.
Definition at line 58 of file value.cc.
References rutz::value::print_to().
void rutz::value::set_string | ( | rutz::fstring | val | ) | [inherited] |
Set the value from an rutz::fstring.
Builds a string stream from val and calling scan_from() with it.
Definition at line 66 of file value.cc.
References rutz::fstring::c_str(), and rutz::value::scan_from().
Referenced by GbVec2< double >::GbVec2(), and GbVec3< double >::GbVec3().