From e50107d0339000c48a955caab8b56d0d4fc56e84 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 19 May 2024 11:26:24 -0400 Subject: Higher quality while still fast --- src/subway_map.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 51f17c5..47ebfdf 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp @@ -1,6 +1,7 @@ #include "subway_map.h" #include +#include #include @@ -185,8 +186,10 @@ void SubwayMap::OnPaint(wxPaintEvent &event) { GetSize().GetHeight() * map_image_.GetWidth() / render_width_ / zoom_; } - dc.StretchBlit(dst_x, dst_y, dst_w, dst_h, &rendered_dc, src_x, src_y, - src_w, src_h); + wxGCDC gcdc(dc); + gcdc.GetGraphicsContext()->SetInterpolationQuality(wxINTERPOLATION_GOOD); + gcdc.StretchBlit(dst_x, dst_y, dst_w, dst_h, &rendered_dc, src_x, src_y, + src_w, src_h); } if (hovered_item_) { -- cgit 1.4.1