more inlines called before defined

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2006-10-10 17:33:49 +00:00
parent 23c386ba20
commit c16b9bfe69
2 changed files with 39 additions and 12 deletions

View File

@ -12,10 +12,10 @@
#ifndef _WX_REGION_H_BASE_
#define _WX_REGION_H_BASE_
#include "wx/bitmap.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
class WXDLLIMPEXP_CORE wxBitmap;
class WXDLLEXPORT wxColour;
class WXDLLEXPORT wxRegion;
@ -207,17 +207,11 @@ protected:
virtual bool DoCombine(const wxRegion& region, wxRegionOp op) = 0;
// implement some wxRegionBase pure virtuals in terms of Combine()
virtual bool DoUnionWithRect(const wxRect& rect)
{ return Combine(rect, wxRGN_OR); }
virtual bool DoUnionWithRegion(const wxRegion& region)
{ return Combine(region, wxRGN_OR); }
virtual bool DoIntersect(const wxRegion& region)
{ return Combine(region, wxRGN_AND); }
virtual bool DoSubtract(const wxRegion& region)
{ return Combine(region, wxRGN_DIFF); }
virtual bool DoXor(const wxRegion& region)
{ return Combine(region, wxRGN_XOR); }
virtual bool DoUnionWithRect(const wxRect& rect);
virtual bool DoUnionWithRegion(const wxRegion& region);
virtual bool DoIntersect(const wxRegion& region);
virtual bool DoSubtract(const wxRegion& region);
virtual bool DoXor(const wxRegion& region);
};
#endif // ports with wxRegion::Combine()

View File

@ -157,3 +157,36 @@ bool wxRegionBase::Union(const wxBitmap& bmp,
}
#endif // wxUSE_IMAGE
#ifdef wxHAS_REGION_COMBINE
// ============================================================================
// wxRegionWithCombine
// ============================================================================
// implement some wxRegionBase pure virtuals in terms of Combine()
bool wxRegionWithCombine::DoUnionWithRect(const wxRect& rect)
{
return Combine(rect, wxRGN_OR);
}
bool wxRegionWithCombine::DoUnionWithRegion(const wxRegion& region)
{
return DoCombine(region, wxRGN_OR);
}
bool wxRegionWithCombine::DoIntersect(const wxRegion& region)
{
return DoCombine(region, wxRGN_AND);
}
bool wxRegionWithCombine::DoSubtract(const wxRegion& region)
{
return DoCombine(region, wxRGN_DIFF);
}
bool wxRegionWithCombine::DoXor(const wxRegion& region)
{
return DoCombine(region, wxRGN_XOR);
}
#endif // wxHAS_REGION_COMBINE