From 6bc7924b168c98bc299c56dc405b9f5bf99bad6b Mon Sep 17 00:00:00 2001 From: James Crook Date: Thu, 23 Jun 2016 11:33:58 +0100 Subject: [PATCH] Bug 1378 - Screenshot Tools images are mostly white background only. Use 24 bit bitmap rather than default which is 32 bit. Seems to be a wxWidgets 3.0.2 bug with ScreenDC. --- src/commands/ScreenshotCommand.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/ScreenshotCommand.cpp b/src/commands/ScreenshotCommand.cpp index 8460303c8..10f4b43e3 100644 --- a/src/commands/ScreenshotCommand.cpp +++ b/src/commands/ScreenshotCommand.cpp @@ -170,7 +170,11 @@ void ScreenshotCommand::Capture(const wxString &filename, int screenW, screenH; wxDisplaySize(&screenW, &screenH); - wxBitmap full(screenW, screenH); + // Bug 1378 workaround. + // wx 3.0.2 has a bug in Blit from ScreenDC where in default mode + // much is drawn transparent - including for example black text! + // Forcing 24 bit here is a workaround. + wxBitmap full(screenW, screenH, 24); wxScreenDC screenDC; wxMemoryDC fullDC;