changeset 6305:5c4b89a8328d

* src/gnuplot-1-fixes.patch: update patch for updated wxwidgets
author John Donoghue <john.donoghue@ieee.org>
date Sun, 10 Jul 2022 20:22:15 -0400
parents c2b696402a1e
children 358d242b5875
files src/gnuplot-1-fixes.patch
diffstat 1 files changed, 32 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gnuplot-1-fixes.patch	Sun Jul 10 20:22:13 2022 -0400
+++ b/src/gnuplot-1-fixes.patch	Sun Jul 10 20:22:15 2022 -0400
@@ -230,3 +230,35 @@
  	CAIRO_OBJS := gp_cairo.$(O) gp_cairo_helpers.$(O)
  	TERMFLAGS += $(PANGOCAIRO_CFLAGS)
  endif
+diff -ur gnuplot-5.2.8.orig/src/wxterminal/wxt_gui.cpp gnuplot-5.2.8/src/wxterminal/wxt_gui.cpp
+--- gnuplot-5.2.8.orig/src/wxterminal/wxt_gui.cpp	2022-07-07 14:55:37.393547149 -0400
++++ gnuplot-5.2.8/src/wxterminal/wxt_gui.cpp	2022-07-07 15:00:56.929423748 -0400
+@@ -632,9 +632,9 @@
+ 
+ 		RECT rect;
+ 		rect.left = rect.top = 0;
+-		unsigned dpi = GetDPI();
+-		rect.right  = MulDiv(panel->plot.device_xmax, dpi, 10);
+-		rect.bottom = MulDiv(panel->plot.device_ymax, dpi, 10);
++		wxSize dpi = GetDPI();
++		rect.right  = MulDiv(panel->plot.device_xmax, dpi.GetWidth(), 10);
++		rect.bottom = MulDiv(panel->plot.device_ymax, dpi.GetHeight(), 10);
+ 		HDC hmf = CreateEnhMetaFileW(NULL, fullpathFilename.wc_str(), &rect, NULL);
+ 		// The win32_printing surface makes an effort to use the GDI API wherever possible,
+ 		// which should reduce the file size in many cases.
+@@ -700,12 +700,12 @@
+ 		panel->plot.cr = cairo_create(surface);
+ 		// scale the plot according to the ratio of printer and screen dpi
+ 		wxSize ppi = wxdc->GetPPI();
+-		unsigned dpi = 96;
++		wxSize dpi(96,96);
+ #ifdef _WIN32
+ 		dpi = GetDPI();
+ #endif
+-		double scaleX = ppi.GetWidth() / (double) dpi;
+-		double scaleY = ppi.GetHeight() / (double) dpi;
++		double scaleX = ppi.GetWidth() / (double) dpi.GetWidth();
++		double scaleY = ppi.GetHeight() / (double) dpi.GetHeight();
+ 		cairo_surface_set_fallback_resolution(surface, ppi.GetWidth(), ppi.GetHeight());
+ 		cairo_scale(panel->plot.cr,
+ 			scaleX / panel->plot.oversampling_scale,