Mercurial > hg > octave-avbm
changeset 11168:36442102c340
Fix treatment of facevertexcdata if facecolor is 'none' with the fltk backend
author | David Bateman <dbateman@free.fr> |
---|---|
date | Fri, 29 Oct 2010 21:46:58 +0200 |
parents | 51ac3a08e53c |
children | 51beeeff9027 |
files | src/ChangeLog src/gl-render.cc src/graphics.cc |
diffstat | 3 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-10-29 David Bateman <dbateman@free.fr> + + * 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 <bpabbott@mac.com> * gl-render.cc: Crop ticks, ticklabels, and gridlines for OpenGL
--- a/src/gl-render.cc +++ b/src/gl-render.cc @@ -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));
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -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); } // ---------------------------------------------------------------------