/* VC++ 6.0 and 5.0 have std::wstring (what about earlier versions?) */
#define HAVE_STD_WSTRING
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
- && wxCHECK_GCC_VERSION(3, 1)
+ && wxCHECK_GCC_VERSION(3, 3)
/* GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it */
#define HAVE_STD_WSTRING
#endif
enum { wxDefaultCoord = -1 };
+/* round-to-nearest (used in scaling) */
+#ifdef __cplusplus
+inline wxCoord wxCoordRound(const float& f)
+{
+ return (f > 0) ? (wxCoord)(f + 0.5) : (f < 0) ? (wxCoord)(f - 0.5) : 0;
+}
+inline wxCoord wxCoordRound(const double& f)
+{
+ return (f > 0) ? (wxCoord)(f + 0.5) : (f < 0) ? (wxCoord)(f - 0.5) : 0;
+}
+#endif
+
/* ---------------------------------------------------------------------------- */
/* define fixed length types */
/* ---------------------------------------------------------------------------- */
#define wxULongLong_t unsigned wxLongLong_t
#endif
- /* these macros allow to definea 64 bit constants in a portable way */
+ /* these macros allow to define 64 bit constants in a portable way */
#define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
#define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
#define wxHAS_INT64 1
#elif wxUSE_LONGLONG
- /* these macros allow to definea 64 bit constants in a portable way */
+ /* these macros allow to define 64 bit constants in a portable way */
#define wxLL(x) wxLongLong(x)
#define wxULL(x) wxULongLong(x)