X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f10962bc05a793ed48ab95dab276a81f82dd2df..f910a887bbaf6d1bc81e7ba45c54c621f8b33cd2:/src/msw/dc.cpp diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 2f2d0e54a5..f7200155db 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -572,7 +572,7 @@ bool wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style) } CalcBoundingBox(x, y); - + return success; #endif } @@ -878,11 +878,7 @@ void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h if (radius < 0.0) { - double smallest = 0.0; - if (width < height) - smallest = width; - else - smallest = height; + double smallest = (width < height) ? width : height; radius = (- radius * smallest); } @@ -1432,8 +1428,7 @@ void wxDC::SetBrush(const wxBrush& brush) if ( m_brush.GetResourceHandle() ) { - HBRUSH b = 0; - b = (HBRUSH) ::SelectObject(GetHdc(), (HBRUSH)m_brush.GetResourceHandle()); + HBRUSH b = (HBRUSH) ::SelectObject(GetHdc(), (HBRUSH)m_brush.GetResourceHandle()); if (!m_oldBrush) m_oldBrush = (WXHBRUSH) b; } @@ -1869,7 +1864,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, ::SetBkColor(GetHdc(), m_textBackgroundColour.GetPixel() ); } - DWORD dwRop = SRCCOPY; + DWORD dwRop; switch (rop) { case wxXOR: dwRop = SRCINVERT; break; @@ -2047,8 +2042,12 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, } if ( !success && (caps & RC_STRETCHBLT) ) +#endif + // __WXWINCE__ { +#ifndef __WXWINCE__ StretchBltModeChanger changeMode(GetHdc(), COLORONCOLOR); +#endif if ( !::StretchBlt ( @@ -2086,8 +2085,6 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, success = TRUE; } } -#endif - // __WXWINCE__ } ::SetTextColor(GetHdc(), old_textground);