Mercurial > octave
diff libinterp/corefcn/gl2ps-print.cc @ 24686:21e97b50989d
Workaround the presence two background axes in printout (bug #52975).
* gl2ps-print.cc (gl2ps_renderer::draw): make sure the first backplane color is
the same as the second.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sun, 04 Feb 2018 23:58:29 +0100 |
parents | a3031d4967ce |
children | 800876b7132c |
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-print.cc Mon Feb 05 15:27:55 2018 +0100 +++ b/libinterp/corefcn/gl2ps-print.cc Sun Feb 04 23:58:29 2018 +0100 @@ -384,6 +384,13 @@ else include_graph = "foobar-inc"; + // FIXME: workaround gl2ps drawing 2 background planes, the first + // eventually being black and producing visual artifacts + const figure::properties& fprop + = dynamic_cast<const figure::properties&> (go.get_properties ()); + Matrix c = fprop.get_color_rgb (); + glClearColor (c(0), c(1), c(2), 1); + // GL2PS_SILENT was removed to allow gl2ps to print errors on stderr GLint ret = gl2psBeginPage ("gl2ps_renderer figure", "Octave", nullptr, gl2ps_term, gl2ps_sort,