Use white background when rendering print preview

Explicitly use the white brush when erasing background of the bitmap
used for print preview, to match the printed page appearance. Somehow it
worked even without this under other platforms before, but logically
resulted in black background under wxGTK 3.

Closes https://github.com/wxWidgets/wxWidgets/pull/1476

Closes #18371.
This commit is contained in:
Vadim Zeitlin 2019-08-09 23:28:53 +02:00
parent 72272f5901
commit 70f0900799

View File

@ -2054,6 +2054,7 @@ bool wxPrintPreviewBase::RenderPageIntoBitmap(wxBitmap& bmp, int pageNum)
{
wxMemoryDC memoryDC;
memoryDC.SelectObject(bmp);
memoryDC.SetBackground(*wxWHITE_BRUSH);
memoryDC.Clear();
return RenderPageIntoDC(memoryDC, pageNum);