[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch for color_properties assignment
From: |
Shai Ayal |
Subject: |
patch for color_properties assignment |
Date: |
Sat, 7 Jul 2007 20:19:46 +0300 |
I attach a patch to fix color_property assignment.
As discussed earlier on at least 2 other threads, color_property and
radio_value are unique in the graphics properties objects in that
their set of allowable values is defined at runtime in their
constructor. This in turn means that assignment of new values to these
objects cannot be done by converting an octave_value object to them
with a constructor, but rather using assignment:
instead of
color_property color("aa|bb|cc");
octave_value ov("bb");
...
// don't use this -- it will destroy the old color definition and
throw an error!
//color = color_property(ov);
// use assignment to keep old definition and give no error
color = ov;
this patch adds the
color_property& color_property::operator = (const octave_value& val)
operator to facilitate this syntax, and also fixes the assignment in
line_properties
Shai
col_prop_assign.patch
Description: Text Data
- patch for color_properties assignment,
Shai Ayal <=
patch for color_properties assignment, John W. Eaton, 2007/07/24