Mercurial > hg > octave-nkf
diff libinterp/corefcn/gl2ps-renderer.cc @ 18821: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 | 6a71e5030df5 |
children | 78fac67300e8 |
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-renderer.cc +++ b/libinterp/corefcn/gl2ps-renderer.cc @@ -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) {