diff libinterp/corefcn/gl-render.h @ 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 cd7f8df11669
children 496735a910c1 0a5b15007766
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.h	Sun Apr 05 14:55:49 2020 -0700
+++ b/libinterp/corefcn/gl-render.h	Thu Mar 12 20:45:47 2020 +0100
@@ -183,6 +183,8 @@
 
     void set_normal (int bfl_mode, const NDArray& n, int j, int i);
 
+    double points_to_pixels (const double val) const;
+
     unsigned int make_marker_list (const std::string& m, double size,
                                    bool filled) const;
 
@@ -240,6 +242,9 @@
     // Indicate we are drawing for selection purpose
     bool selecting;
 
+    // Indicate we are drawing for printing purpose
+    bool m_printing;
+
   private:
     class patch_tessellator;
   };