# HG changeset patch # User Rik # Date 1381638394 25200 # Node ID 85a057ad1ba6e1ff0e0671476b98027905c20c16 # Parent ca9a9c0740c524d151472d68f464c13a791ea03b Fix graphic color properties which have a radio value as default. * libinterp/corefcn/graphics.in.h: Add new constructor for color_property where radio_values are default. Update properties, such as markeredgecolor, to use new constructor. diff -r ca9a9c0740c5 -r 85a057ad1ba6 libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h Sat Oct 12 11:11:00 2013 -0400 +++ b/libinterp/corefcn/graphics.in.h Sat Oct 12 21:26:34 2013 -0700 @@ -1085,6 +1085,12 @@ current_val (v.default_value ()) { } + color_property (const radio_values& v, const color_values& c) + : base_property ("", graphics_handle ()), + current_type (radio_t), color_val (c), radio_val (v), + current_val (v.default_value ()) + { } + color_property (const std::string& nm, const graphics_handle& h, const color_values& c = color_values (), const radio_values& v = radio_values ()) @@ -4182,8 +4188,8 @@ radio_property linestyle , "{-}|--|:|-.|none" double_property linewidth , 0.5 radio_property marker , "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram" - color_property markeredgecolor , "{auto}|none" - color_property markerfacecolor , "auto|{none}" + color_property markeredgecolor , color_property (radio_values ("{auto}|none"), color_values (0, 0, 0)) + color_property markerfacecolor , color_property (radio_values ("auto|{none}"), color_values (0, 0, 0)) double_property markersize , 6 row_vector_property xdata u , default_data () string_property xdatasource , "" @@ -4277,7 +4283,7 @@ color_property backgroundcolor , "{none}" color_property color u , color_values (0, 0, 0) string_property displayname , "" - color_property edgecolor , "{none}" + color_property edgecolor , color_property (radio_values ("{none}"), color_values (0, 0, 0)) bool_property editing , "off" radio_property erasemode , "{normal}|none|xor|background" array_property extent rG , Matrix (1, 4, 0.0) @@ -4595,9 +4601,8 @@ radio_property linestyle , "{-}|--|:|-.|none" double_property linewidth , 0.5 radio_property marker , "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram" - //radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h" - color_property markeredgecolor , "none|{auto}|flat" - color_property markerfacecolor , "{none}|auto|flat" + color_property markeredgecolor , color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0)) + color_property markerfacecolor , color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0)) double_property markersize , 6 radio_property normalmode , "{auto}|manual" double_property specularcolorreflectance , 1.0 @@ -4711,7 +4716,7 @@ radio_property edgelighting , "{none}|flat|gouraud|phong" radio_property erasemode , "{normal}|none|xor|background" double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp|texturemap")) - color_property facecolor , "none|{flat}|interp|texturemap" + color_property facecolor , color_property (radio_values ("none|{flat}|interp|texturemap"), color_values (0, 0, 0)) radio_property facelighting , "{none}|flat|gouraud|phong" // FIXME: interpreter is not a Matlab surface property // Octave uses this for legend() with the string displayname. @@ -4719,9 +4724,8 @@ radio_property linestyle , "{-}|--|:|-.|none" double_property linewidth , 0.5 radio_property marker , "{none}|+|o|*|.|x|s|square|d|diamond|^|v|>|<|p|pentagram|h|hexagram" - //radio_property marker , "{none}|+|o|*|.|x|s|d|^|v|>|<|p|h" - color_property markeredgecolor , "none|{auto}|flat" - color_property markerfacecolor , "{none}|auto|flat" + color_property markeredgecolor , color_property (radio_values ("none|{auto}|flat"), color_values (0, 0, 0)) + color_property markerfacecolor , color_property (radio_values ("{none}|auto|flat"), color_values (0, 0, 0)) double_property markersize , 6 radio_property meshstyle , "{both}|row|column" radio_property normalmode u , "{auto}|manual"