--- graphics.cc 2007-06-01 20:16:39.000000000 +0300 +++ graphics_n.cc 2007-06-01 20:16:09.000000000 +0300 @@ -371,6 +371,54 @@ return *this; } + color_property& operator = (const octave_value& val) + { + if (val.is_string ()) + { + std::string s = val.string_value (); + + if (radio_val.validate (s)) + { + current_val = s; + current_type = radio_t; + } + + if ( s.length () == 1 ) + { + color_values col (s[0]); + if (! error_state) + { + color_val = col; + current_type = color_t; + } + else if ( !radio_val.validate (s)) + error ("invalid color specification"); + } + else if ( !radio_val.validate (s)) + error ("invalid color specification"); + } + else if (val.is_real_matrix ()) + { + Matrix m = val.matrix_value (); + + if (m.numel () == 3) + { + color_values col (m (0), m (1), m(2)); + if (! error_state) + { + color_val = col; + current_type = color_t; + } + } + else + error ("invalid color specification"); + } + else + error ("invalid color specification"); + + return *this; + } + color_property& operator = (const std::string& newval) { if (radio_val.validate (newval))