X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48a1108eb87970373e1b1d5debeeaedd8d1916ea..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 617a8d344b..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" @@ -31,6 +32,10 @@ #include "wx/font.h" #endif + +IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) + + WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList; @@ -178,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) @@ -186,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(), @@ -317,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},