Mercurial > octave-nkf
changeset 18700:652d9ed6f88d
Fix printing of axis grid lines above/below line objects based on "layer".
* gl2ps-renderer.cc (draw): For 2D plots, use GL2PS_SIMPLE_SORT for Z-depth
sorting rather than GL2PS_NO_SORT which does no calculation whatsoever.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 23 Apr 2014 11:01:30 -0700 |
parents | 900b524d9072 |
children | e42843ceff48 |
files | libinterp/corefcn/gl2ps-renderer.cc |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-renderer.cc Sat Apr 19 09:28:20 2014 -0700 +++ b/libinterp/corefcn/gl2ps-renderer.cc Wed Apr 23 11:01:30 2014 -0700 @@ -53,8 +53,8 @@ GLint gl2ps_term; if (term.find ("eps") != std::string::npos) gl2ps_term = GL2PS_EPS; else if (term.find ("pdf") != std::string::npos) gl2ps_term = GL2PS_PDF; + else if (term.find ("ps") != std::string::npos) gl2ps_term = GL2PS_PS; else if (term.find ("svg") != std::string::npos) gl2ps_term = GL2PS_SVG; - else if (term.find ("ps") != std::string::npos) gl2ps_term = GL2PS_PS; else if (term.find ("pgf") != std::string::npos) gl2ps_term = GL2PS_PGF; else if (term.find ("tex") != std::string::npos) gl2ps_term = GL2PS_TEX; else @@ -68,7 +68,9 @@ // Default sort order optimizes for 3D plots GLint gl2ps_sort = GL2PS_BSP_SORT; - if (term.find ("is2D") != std::string::npos) gl2ps_sort = GL2PS_NO_SORT; + // For 2D plots we can use a simpler Z-depth sorting algorithm + if (term.find ("is2D") != std::string::npos) + gl2ps_sort = GL2PS_SIMPLE_SORT; while (state == GL2PS_OVERFLOW) {