diff libinterp/corefcn/graphics.in.h @ 23859:7148b237f94f

Fix regression introduced by cset 06805aabbdd1 (bug #50750). * graphics.in.h (axes::properties::has3Dkids, axes::properties::set_has3Dkids): New private attribute and corresponding setter * graphics.in.h (axes::properties::get_is2D): add bool argument to specify whether to include kids in the dimensionality check. Make use of new "has3Dkids" propetrty when necessary. * graphics.cc (axes::update_axis_limits): Set has3Dkids attribute based on Z limits. Allow zlim to be checked (but unchanged) even when zlimmode is manual and add a FIXME note. * gl2ps-print.cc (gl2ps_renderer::has_2D_axes): New method to check all axes are 2D. * gl2ps-print.cc (gl2ps_renderer::draw): Choose sorting algorithm depending on has_2D_axes. * __opengl_print__.m: Don't check dimensionality here. * gl-render.cc (opengl_renderer::draw_axes): include children in dimensionality check.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Thu, 20 Jul 2017 22:59:27 +0200
parents 90689bdbe048
children ec3d37eeafa2
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h	Wed Aug 09 19:54:18 2017 -0700
+++ b/libinterp/corefcn/graphics.in.h	Thu Jul 20 22:59:27 2017 +0200
@@ -3483,7 +3483,9 @@
     bool get_x2Dtop (void) const { return x2Dtop; }
     bool get_y2Dright (void) const { return y2Dright; }
     bool get_layer2Dtop (void) const { return layer2Dtop; }
-    bool get_is2D (void) const { return is2D; }
+    bool get_is2D (bool include_kids = false) const
+    { return (include_kids ? (is2D && ! has3Dkids) : is2D); }
+    void set_has3Dkids (bool val) { has3Dkids = val; }
     bool get_xySym (void) const { return xySym; }
     bool get_xyzSym (void) const { return xyzSym; }
     bool get_zSign (void) const { return zSign; }
@@ -3574,6 +3576,7 @@
     bool y2Dright = false;
     bool layer2Dtop = false;
     bool is2D = false;
+    bool has3Dkids = false;
     bool xySym = false;
     bool xyzSym = false;
     bool zSign = false;