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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user