X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30b25d4e65e8377547b35c9c348b721659c77674..038072e2f1eaf2bf32d748a71234d767ebba8919:/src/msw/dc.cpp diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 0f31dee21b..9691e86fe2 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1009,9 +1009,10 @@ void wxDC::DoDrawRotatedText(const wxString& text, #ifndef __WXMICROWIN__ else { - // NB: don't take DEFAULT_GUI_FONT because it's not TrueType and so - // can't have non zero orientation/escapement - wxFont font = m_font.Ok() ? m_font : *wxNORMAL_FONT; + // NB: don't take DEFAULT_GUI_FONT (a.k.a. wxSYS_DEFAULT_GUI_FONT) + // because it's not TrueType and so can't have non zero + // orientation/escapement under Win9x + wxFont font = m_font.Ok() ? m_font : *wxSWISS_FONT; HFONT hfont = (HFONT)font.GetResourceHandle(); LOGFONT lf; if ( ::GetObject(hfont, sizeof(lf), &lf) == 0 ) @@ -1705,30 +1706,25 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, HBITMAP buffer_bmap ; #if wxUSE_DC_CACHEING - if (TRUE) - { - // create a temp buffer bitmap and DCs to access it and the mask - wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC()); - dc_mask = (HDC) dcCacheEntry1->m_dc; - - wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, GetHDC()); - dc_buffer = (HDC) dcCacheEntry2->m_dc; - - wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(GetHDC(), - width, height); - - buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap; - } - else -#endif - { - // create a temp buffer bitmap and DCs to access it and the mask - dc_mask = ::CreateCompatibleDC(GetHdcOf(*source)); - dc_buffer = ::CreateCompatibleDC(GetHdc()); - buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height); - ::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap()); - ::SelectObject(dc_buffer, buffer_bmap); - } + // create a temp buffer bitmap and DCs to access it and the mask + wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC()); + dc_mask = (HDC) dcCacheEntry1->m_dc; + + wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, GetHDC()); + dc_buffer = (HDC) dcCacheEntry2->m_dc; + + wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(GetHDC(), + width, height); + + buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap; +#else // !wxUSE_DC_CACHEING + // create a temp buffer bitmap and DCs to access it and the mask + dc_mask = ::CreateCompatibleDC(GetHdcOf(*source)); + dc_buffer = ::CreateCompatibleDC(GetHdc()); + buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height); +#endif // wxUSE_DC_CACHEING/!wxUSE_DC_CACHEING + ::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap()); + ::SelectObject(dc_buffer, buffer_bmap); // copy dest to buffer if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,