Mercurial > hg > octave-lojdl
changeset 14380:81183cd6eaae
Fix OpenGL printing of dashed lines (Bug #33765).
* gl2ps-renderer.h (set_linestyle): Fix OpenGL printing of dashed lines (Bug #33765)
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 17 Feb 2012 11:40:27 -0800 |
parents | dbc99d17f0ad |
children | 688e19ca262b |
files | src/gl2ps-renderer.h |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gl2ps-renderer.h +++ b/src/gl2ps-renderer.h @@ -52,13 +52,14 @@ void draw_pixels (GLsizei w, GLsizei h, GLenum format, GLenum type, const GLvoid *data); - void set_linestyle (const std::string& s, bool use_stipple) + void set_linestyle (const std::string& s, bool use_stipple = false) { opengl_renderer::set_linestyle (s, use_stipple); - if (use_stipple) + + if (s == "-" && ! use_stipple) + gl2psDisable (GL2PS_LINE_STIPPLE); + else gl2psEnable (GL2PS_LINE_STIPPLE); - else - gl2psDisable (GL2PS_LINE_STIPPLE); } void set_polygon_offset (bool on, double offset = 0.0)