Mercurial > octave
diff libinterp/corefcn/gl2ps-print.cc @ 28189:5624fd0c5efb stable
Fix inconsistent marker size between screen and printout (bug #57552)
* gl2ps-print.cc (gl2ps_renderer::init_marker): undo changes from cset
46fe22bf1458.
* gl-render.h, gl-render.cc (m_printing): New bool data member.
(opengl_renderer::draw_figure): Initialize m_printing with the depending on
"__printing__" property.
(opengl_renderer::points_to_pixels): New method to convert points data to
pixels. Returns the original value when renderering for printing purpose.
(opengl_renderer::set_linewidth, opengl_renderer::set_linewidth,
opengl_renderer::make_marker_list): Use points_to_pixels.
* print.m: Comment out line which prevents redrawing plot after printing.
The markersize may have been changed for printing and this requires a redraw.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Thu, 12 Mar 2020 20:45:47 +0100 |
parents | 46fe22bf1458 |
children | 332e644726f9 0a5b15007766 |
line wrap: on
line diff
--- a/libinterp/corefcn/gl2ps-print.cc Sun Apr 05 14:55:49 2020 -0700 +++ b/libinterp/corefcn/gl2ps-print.cc Thu Mar 12 20:45:47 2020 +0100 @@ -189,15 +189,7 @@ void init_marker (const std::string& m, double size, float width) { - // FIXME: Undo scaling that will take place in opengl_renderer::make_marker_list - gh_manager& gh_mgr - = __get_gh_manager__ ("gl2ps_renderer::init_marker"); - // FIXME: Should this be static? What happens if window is moved to a second - // monitor with a different screenpixelsperinch? - const static double rescale - = 72.0 / gh_mgr.get_object (0).get ("screenpixelsperinch").double_value (); - - opengl_renderer::init_marker (m, size * rescale, width); + opengl_renderer::init_marker (m, size, width); // FIXME: gl2ps can't handle closed contours so we set linecap/linejoin // round to obtain a better looking result for some markers.