day_of_week fix to wxDate, wxRect additions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -291,7 +291,11 @@ ostream WXDLLEXPORT & operator << (ostream &os, const wxDate &dt)
|
||||
|
||||
void wxDate::julian_to_wday (void)
|
||||
{
|
||||
// Correction by Peter Stadel <peters@jetcity.com>
|
||||
day_of_week = ((julian - 2) % 7L);
|
||||
/*
|
||||
day_of_week = (int) ((julian + 2) % 7 + 1);
|
||||
*/
|
||||
}
|
||||
|
||||
void wxDate::julian_to_mdy ()
|
||||
|
@@ -88,6 +88,29 @@ bool wxRect::operator==(const wxRect& rect) const
|
||||
(height == rect.height));
|
||||
}
|
||||
|
||||
const wxRect& wxRect::operator += (const wxRect& rect)
|
||||
{
|
||||
*this = (*this + rect);
|
||||
return ( *this ) ;
|
||||
}
|
||||
|
||||
wxRect wxRect::operator + (const wxRect& rect) const
|
||||
{
|
||||
int x1 = min(this->x, rect.x);
|
||||
int y1 = min(this->y, rect.y);
|
||||
int y2 = max(y+height, rect.height+rect.y);
|
||||
int x2 = max(x+width, rect.width+rect.x);
|
||||
return wxRect(x1, y1, x2-x1, y2-y1);
|
||||
}
|
||||
|
||||
bool wxRect::Inside(int cx, int cy) const
|
||||
{
|
||||
return ( (cx >= x) && (cy >= y)
|
||||
&& ((cy - y) < height)
|
||||
&& ((cx - x) < width)
|
||||
);
|
||||
}
|
||||
|
||||
wxColourDatabase::wxColourDatabase (int type) : wxList (type)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user