# HG changeset patch # User Rik # Date 1448327738 28800 # Node ID f90295782d604ea4baec004a04402f3fe9fe96ac # Parent 1a329319975badb9b60e10541c93075408067ab9 Accept color value of "none" for line objects (bug #44224). * gl-render.cc: Check color value and don't bother to draw line if value is "none". * graphics.in.h: Set default value of color property to be a union of a color value and a radio value. diff --git a/libinterp/corefcn/gl-render.cc b/libinterp/corefcn/gl-render.cc --- a/libinterp/corefcn/gl-render.cc +++ b/libinterp/corefcn/gl-render.cc @@ -1518,7 +1518,7 @@ clip[i] = (clip_code (x(i), y(i), z_mid) & clip_mask); } - if (! props.linestyle_is ("none")) + if (! props.linestyle_is ("none") && ! props.color_is ("none")) { set_color (props.get_color_rgb ()); set_linestyle (props.get_linestyle (), false); diff --git a/libinterp/corefcn/graphics.in.h b/libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h +++ b/libinterp/corefcn/graphics.in.h @@ -4411,7 +4411,7 @@ // Programming note: Keep property list sorted if new ones are added. BEGIN_PROPERTIES (line) - color_property color , color_values (0, 0, 0) + color_property color , color_property (color_values (0, 0, 0), radio_values ("none")) string_property displayname , "" radio_property erasemode , "{normal}|none|xor|background" // FIXME: interpreter is not a property of Matlab line objects.