X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7cf41a5d66bec0a1297f1417852647aa353a148f..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/gdicmn.cpp?ds=sidebyside diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index a81555a5cc..a4b09c9493 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -17,6 +17,7 @@ #endif #include "wx/gdicmn.h" +#include "wx/gdiobj.h" #ifndef WX_PRECOMP #include "wx/log.h" @@ -28,9 +29,12 @@ #include "wx/settings.h" #include "wx/bitmap.h" #include "wx/colour.h" + #include "wx/font.h" #endif -#include "wx/font.h" + +IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) + WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; @@ -179,7 +183,7 @@ wxRect& wxRect::Inflate(wxCoord dx, wxCoord dy) return *this; } -bool wxRect::Inside(int cx, int cy) const +bool wxRect::Contains(int cx, int cy) const { return ( (cx >= x) && (cy >= y) && ((cy - y) < height) @@ -187,6 +191,11 @@ bool wxRect::Inside(int cx, int cy) const ); } +bool wxRect::Contains(const wxRect& rect) const +{ + return Contains(rect.GetTopLeft()) && Contains(rect.GetBottomRight()); +} + wxRect& wxRect::Intersect(const wxRect& rect) { int x2 = GetRight(), @@ -318,7 +327,7 @@ void wxColourDatabase::Initialize() {wxT("ORANGE RED"), 255, 0, 127}, {wxT("ORCHID"), 219, 112, 219}, {wxT("PALE GREEN"), 143, 188, 143}, - {wxT("PINK"), 188, 143, 234}, + {wxT("PINK"), 255, 192, 203}, {wxT("PLUM"), 234, 173, 234}, {wxT("PURPLE"), 176, 0, 255}, {wxT("RED"), 255, 0, 0},