X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da052901fda49803ddf9b666d227cdab40bafa30..27a97d02eb2f3dcf031c5cbcd3c1321c6d35fce8:/include/wx/geometry.h diff --git a/include/wx/geometry.h b/include/wx/geometry.h index 62dd5aaade..7bc7f527eb 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -18,6 +18,10 @@ #include "wx/defs.h" +#ifndef wxUSE_GEOMETRY + #define wxUSE_GEOMETRY 0 +#endif + #if wxUSE_GEOMETRY #include "wx/utils.h" @@ -27,7 +31,11 @@ #ifdef __WXMSW__ #define wxMulDivInt32( a , b , c ) ::MulDiv( a , b , c ) #elif defined( __WXMAC__ ) + #ifdef __WXMAC_X__ + #include + #else #include "Math64.h" + #endif #define wxMulDivInt32( a , b , c ) S32Set( S64Div( S64Multiply( S64Set(a) , S64Set(b) ) , S64Set(c) ) ) #else #define wxMulDivInt32( a , b , c ) ((wxInt32)((a)*(((wxDouble)b)/((wxDouble)c)))) @@ -276,7 +284,7 @@ public: inline wxPoint2DDouble GetPosition() { return wxPoint2DDouble(m_x, m_y); } inline wxSize GetSize() - { return wxSize(m_width, m_height); } + { return wxSize((int) m_width, (int) m_height); } // for the edge and corner accessors there are two setters conterparts, the Set.. functions keep the other corners at their // position whenever sensible, the Move.. functions keep the size of the rect and move the other corners apropriately @@ -593,7 +601,7 @@ inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt) inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt) { - return wxPoint2DInt( pt.m_x * n , pt.m_y * n ) ; + return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) ) ; } inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n) @@ -603,7 +611,7 @@ inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n) inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n) { - return wxPoint2DInt( pt.m_x * n , pt.m_y * n ) ; + return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) ) ; } inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) @@ -618,7 +626,7 @@ inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n) inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n) { - return wxPoint2DInt( pt.m_x / n , pt.m_y / n ) ; + return wxPoint2DInt( (int) (pt.m_x / n) , (int) (pt.m_y / n) ) ; } // wxRect2Ds are a axis-aligned rectangles, each side of the rect is parallel to the x- or m_y- axis. The rectangle is either defined by the