X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a452af5e682893eb97b15cde1e63a09fd02e5931..41b78190adf985fa6e91a34aba76b1693a8ffc72:/src/msw/dc.cpp diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index e1b6743cd4..ad43d3aa01 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -44,7 +44,10 @@ #include "wx/dcprint.h" #include "wx/module.h" #include "wx/dynload.h" + +#ifdef wxHAVE_RAW_BITMAP #include "wx/rawbmp.h" +#endif #include #include @@ -114,9 +117,12 @@ static const int MM_METRIC = 10; // convert degrees to radians static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } + +#ifdef wxHAVE_RAW_BITMAP // our (limited) AlphaBlend() replacement static void wxAlphaBlend(wxDC& dc, int x, int y, int w, int h, const wxBitmap& bmp); +#endif // ---------------------------------------------------------------------------- // private classes @@ -656,7 +662,7 @@ void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1, wxCoord x2 = x1 + width, y2 = y1 + height; -#if defined(__WIN32__) && !defined(__SC__) && !defined(__WXMICROWIN__) +#if defined(__WIN32__) && !defined(__SYMANTEC__) && !defined(__WXMICROWIN__) RECT rect; rect.left = x1; rect.top = y1; @@ -998,17 +1004,21 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask bf.SourceConstantAlpha = 0xff; bf.AlphaFormat = AC_SRC_ALPHA; - if ( !pfnAlphaBlend(GetHdc(), x, y, width, height, - hdcMem, 0, 0, width, height, - bf) ) + if ( pfnAlphaBlend(GetHdc(), x, y, width, height, + hdcMem, 0, 0, width, height, + bf) ) { - wxLogLastError(_T("AlphaBlend")); + // skip wxAlphaBlend() call below + return; } + + wxLogLastError(_T("AlphaBlend")); } - else // use our own (probably much slower) implementation - { - wxAlphaBlend(*this, x, y, width, height, bmp); - } + + // use our own (probably much slower) implementation +#ifdef wxHAVE_RAW_BITMAP + wxAlphaBlend(*this, x, y, width, height, bmp); +#endif // wxHAVE_RAW_BITMAP return; } @@ -2299,6 +2309,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxDCModule, wxModule) // wxAlphaBlend: our fallback if ::AlphaBlend() is unavailable // ---------------------------------------------------------------------------- +#ifdef wxHAVE_RAW_BITMAP static void wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc) { @@ -2354,3 +2365,4 @@ wxAlphaBlend(wxDC& dc, int xDst, int yDst, int w, int h, const wxBitmap& bmpSrc) } } +#endif // #ifdef wxHAVE_RAW_BITMAP