From 8cea21770168b403209e07d68a628e29bb6c1e6c Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 20 Dec 2015 10:25:52 -0800 Subject: [PATCH] implement Flush() for wxImage wxGraphicsContext under Cairo and GDI+, see #16694 --- src/generic/graphicc.cpp | 5 +++++ src/msw/graphics.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 37de178537..aa81261ab6 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -499,6 +499,11 @@ public: } virtual ~wxCairoImageContext() + { + Flush(); + } + + virtual void Flush() { m_image = m_data.ConvertToImage(); } diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index f27b66ff43..c02c65d4c2 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -459,6 +459,11 @@ public: } virtual ~wxGDIPlusImageContext() + { + Flush(); + } + + virtual void Flush() { m_image = m_bitmap.ConvertToImage(); }