don't blit too much when copying static box border in OnPaint()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-03-27 13:03:02 +00:00
parent c0f482da5b
commit b79ed636b8

View File

@@ -539,14 +539,16 @@ void wxStaticBox::OnPaint(wxPaintEvent& WXUNUSED(event))
dc.Blit(border, 0, rc.right - border, borderTop, dc.Blit(border, 0, rc.right - border, borderTop,
&memdc, border, 0); &memdc, border, 0);
// bottom // bottom
dc.Blit(border, rc.bottom - border, rc.right - border, rc.bottom, dc.Blit(border, rc.bottom - border, rc.right - border, border,
&memdc, border, rc.bottom - border); &memdc, border, rc.bottom - border);
// left // left
dc.Blit(0, 0, border, rc.bottom, dc.Blit(0, 0, border, rc.bottom,
&memdc, 0, 0); &memdc, 0, 0);
// right // right (note that upper and bottom right corners were already part of the
dc.Blit(rc.right - border, 0, rc.right, rc.bottom, // first two blits so we shouldn't overwrite them here to avoi flicker)
&memdc, rc.right - border, 0); dc.Blit(rc.right - border, borderTop,
border, rc.bottom - borderTop - border,
&memdc, rc.right - border, borderTop);
// create the region excluding box children // create the region excluding box children