X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ac31c429f668e236f4d9686c47b5172f625781c..137c8bde085d6d5b7c459902d2ea1a198ab48765:/src/common/rgncmn.cpp diff --git a/src/common/rgncmn.cpp b/src/common/rgncmn.cpp index 801aaa9e3f..6b7bac3a5c 100644 --- a/src/common/rgncmn.cpp +++ b/src/common/rgncmn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: rgncmn.cpp +// Name: src/common/rgncmn.cpp // Purpose: Methods of wxRegion that have a generic implementation // Author: Robin Dunn // Modified by: @@ -9,27 +9,23 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "rgncmn.h" -#endif - - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #include "wx/region.h" -#include "wx/bitmap.h" -#if wxUSE_IMAGE -#include "wx/image.h" -#endif -#include "wx/dcmemory.h" +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" + #include "wx/bitmap.h" +#endif //WX_PRECOMP -//--------------------------------------------------------------------------- +#if wxUSE_IMAGE + #include "wx/image.h" +#endif @@ -105,6 +101,7 @@ static bool DoRegionUnion(wxRegion& region, bool wxRegion::Union(const wxBitmap& bmp) { +#if (!defined(__WXMSW__) || wxUSE_WXDIB) if (bmp.GetMask()) { wxImage image = bmp.ConvertToImage(); @@ -116,6 +113,7 @@ bool wxRegion::Union(const wxBitmap& bmp) 0); } else +#endif { return Union(0, 0, bmp.GetWidth(), bmp.GetHeight()); } @@ -125,12 +123,16 @@ bool wxRegion::Union(const wxBitmap& bmp, const wxColour& transColour, int tolerance) { +#if (!defined(__WXMSW__) || wxUSE_WXDIB) wxImage image = bmp.ConvertToImage(); return DoRegionUnion(*this, image, transColour.Red(), transColour.Green(), transColour.Blue(), tolerance); +#else + return false; +#endif } #else @@ -150,5 +152,3 @@ bool wxRegion::Union(const wxBitmap& WXUNUSED(bmp), } #endif - -//---------------------------------------------------------------------------