# HG changeset patch # User John Donoghue # Date 1657498935 14400 # Node ID 5c4b89a8328ddb33a8ecde3c8134b8805bfc7351 # Parent c2b696402a1e0d9767dab02038cb5b1e781c13b9 * src/gnuplot-1-fixes.patch: update patch for updated wxwidgets diff -r c2b696402a1e -r 5c4b89a8328d src/gnuplot-1-fixes.patch --- 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,