X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c34e3c7930684745d6aaf4696fc18faa32463d0e..5a98fd8de061e3dfcbad732e44ee33017493672f:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 69ddd20986..a525af1b0d 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -79,7 +79,7 @@ template<> void wxStringWriteValue(wxString &s , const wxPoint &data ) s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ; } -WX_CUSTOM_TYPE_INFO(wxPoint, wxToStringConverter , wxFromStringConverter) +wxCUSTOM_TYPE_INFO(wxPoint, wxToStringConverter , wxFromStringConverter) template<> void wxStringReadValue(const wxString &s , wxSize &data ) { @@ -91,30 +91,32 @@ template<> void wxStringWriteValue(wxString &s , const wxSize &data ) s = wxString::Format(wxT("%d,%d"), data.x , data.y ) ; } -WX_CUSTOM_TYPE_INFO(wxSize, wxToStringConverter , wxFromStringConverter) +wxCUSTOM_TYPE_INFO(wxSize, wxToStringConverter , wxFromStringConverter) #endif IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject) -wxRect::wxRect(const wxPoint& topLeft, const wxPoint& bottomRight) +wxRect::wxRect(const wxPoint& point1, const wxPoint& point2) { - x = topLeft.x; - y = topLeft.y; - width = bottomRight.x - topLeft.x + 1; - height = bottomRight.y - topLeft.y + 1; + x = point1.x; + y = point1.y; + width = point2.x - point1.x; + height = point2.y - point1.y; if (width < 0) { width = -width; - x -= width; + x = point2.x; } + width++; if (height < 0) { height = -height; - y -= height; + y = point2.y; } + height++; } wxRect::wxRect(const wxPoint& point, const wxSize& size) @@ -508,7 +510,7 @@ void wxInitializeStockObjects () GetThemeFont(kThemeSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ; sizeFont = fontSize ; - wxSWISS_FONT = new wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal(fontName) ); + wxNORMAL_FONT = new wxFont (fontSize, wxMODERN, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal(fontName) ); #elif defined(__WXPM__) static const int sizeFont = 12; #else @@ -526,7 +528,7 @@ void wxInitializeStockObjects () wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL); wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */ #elif defined(__WXMAC__) - wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL); + wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */ wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL); GetThemeFont(kThemeSmallSystemFont , GetApplicationScript() , fontName , &fontSize , &fontStyle ) ; wxSMALL_FONT = new wxFont (fontSize, wxSWISS, wxNORMAL, wxNORMAL , false , wxMacMakeStringFromPascal( fontName ) );