# HG changeset patch # User David Bateman # Date 1288381618 -7200 # Node ID 36442102c340e3ff2ad3b779ca0ceda5f1d5615a # Parent 51ac3a08e53cf45a16a03d078970bdf3bf4f37c7 Fix treatment of facevertexcdata if facecolor is 'none' with the fltk backend diff -r 51ac3a08e53c -r 36442102c340 src/ChangeLog --- a/src/ChangeLog Thu Oct 28 14:12:46 2010 +0200 +++ b/src/ChangeLog Fri Oct 29 21:46:58 2010 +0200 @@ -1,3 +1,12 @@ +2010-10-29 David Bateman + + * graphics.cc (octave_value patch::properties::get_color_data + (void) const): Don't call convert_data is the facevertexcdata + property is undefined or empty. + * gl-render.cc (void opengl_renderer::draw_patch + (const patch::properties &)): Set ec_mode to 0 if edgecolor is "none". + Set fc_mode to 0 if facecolor is "none". + 2010-10-29 Ben Abbott * gl-render.cc: Crop ticks, ticklabels, and gridlines for OpenGL diff -r 51ac3a08e53c -r 36442102c340 src/gl-render.cc --- a/src/gl-render.cc Thu Oct 28 14:12:46 2010 +0200 +++ b/src/gl-render.cc Fri Oct 29 21:46:58 2010 +0200 @@ -2449,13 +2449,15 @@ bool has_facecolor = false; bool has_facealpha = false; - int fc_mode = (props.facecolor_is_rgb () ? 0 : + int fc_mode = ((props.facecolor_is("none") + || props.facecolor_is_rgb ()) ? 0 : (props.facecolor_is("flat") ? 1 : 2)); int fl_mode = (props.facelighting_is ("none") ? 0 : (props.facelighting_is ("flat") ? 1 : 2)); int fa_mode = (props.facealpha_is_double () ? 0 : (props.facealpha_is ("flat") ? 1 : 2)); - int ec_mode = (props.edgecolor_is_rgb () ? 0 : + int ec_mode = ((props.edgecolor_is("none") + || props.edgecolor_is_rgb ()) ? 0 : (props.edgecolor_is("flat") ? 1 : 2)); int el_mode = (props.edgelighting_is ("none") ? 0 : (props.edgelighting_is ("flat") ? 1 : 2)); diff -r 51ac3a08e53c -r 36442102c340 src/graphics.cc --- a/src/graphics.cc Thu Oct 28 14:12:46 2010 +0200 +++ b/src/graphics.cc Fri Oct 29 21:46:58 2010 +0200 @@ -4966,8 +4966,11 @@ octave_value patch::properties::get_color_data (void) const { - return convert_cdata (*this, get_facevertexcdata (), - cdatamapping_is ("scaled"), 2); + octave_value fvc = get_facevertexcdata(); + if (fvc.is_undefined () || fvc.is_empty ()) + return Matrix (); + else + return convert_cdata (*this, fvc,cdatamapping_is ("scaled"), 2); } // ---------------------------------------------------------------------