Mercurial > hg > octave-nkf
changeset 17645:85a057ad1ba6
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.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 12 Oct 2013 21:26:34 -0700 |
parents | ca9a9c0740c5 |
children | 993ea21b7e03 |
files | libinterp/corefcn/graphics.in.h |
diffstat | 1 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h +++ b/libinterp/corefcn/graphics.in.h @@ -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"