X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf78c81c049827da8131c9b8d49a591443f64bbf..ef094fa075bc56bcbc33b12159c395ea28afda3b:/include/wx/image.h diff --git a/include/wx/image.h b/include/wx/image.h index e56104f841..12a0223cc7 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -29,6 +29,10 @@ #if wxUSE_IMAGE +// on some systems (Unixware 7.x) index is defined as a macro in the headers +// which breaks the compilation below +#undef index + #define wxIMAGE_OPTION_FILENAME wxString(_T("FileName")) //----------------------------------------------------------------------------- @@ -93,7 +97,7 @@ private: class WXDLLEXPORT wxImageHistogramEntry { public: - wxImageHistogramEntry() : index(0), value(0) {} + wxImageHistogramEntry() { index = value = 0; } unsigned long index; unsigned long value; }; @@ -136,7 +140,7 @@ class WXDLLEXPORT wxImage: public wxObject { public: wxImage(); - wxImage( int width, int height ); + wxImage( int width, int height, bool clear = true ); wxImage( int width, int height, unsigned char* data, bool static_data = FALSE ); wxImage( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 ); wxImage( const wxString& name, const wxString& mimetype, int index = -1 ); @@ -158,8 +162,8 @@ public: #endif #endif - void Create( int width, int height ); - void Create( int width, int height, unsigned char* data, bool static_data = FALSE ); + bool Create( int width, int height, bool clear = true ); + bool Create( int width, int height, unsigned char* data, bool static_data = FALSE ); void Destroy(); // creates an identical copy of the image (the = operator