#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#include "wx/image.h"
#include <string.h>
#ifdef __SALFORDC__
-#ifdef FAR
-#undef FAR
-#endif
+ #undef FAR
#endif
#ifdef __WXMSW__
-#include <windows.h>
+ #include "wx/msw/private.h"
#endif
//-----------------------------------------------------------------------------
{
public:
- wxImageRefData(void);
- ~wxImageRefData(void);
+ wxImageRefData();
+ ~wxImageRefData();
int m_width;
int m_height;
bool m_ok;
};
-wxImageRefData::wxImageRefData(void)
+wxImageRefData::wxImageRefData()
{
m_width = 0;
m_height = 0;
m_hasMask = FALSE;
}
-wxImageRefData::~wxImageRefData(void)
+wxImageRefData::~wxImageRefData()
{
if (m_data) free( m_data );
}
#define M_IMGDATA ((wxImageRefData *)m_refData)
#if !USE_SHARED_LIBRARIES
-IMPLEMENT_DYNAMIC_CLASS(wxImage, wxObject)
+ IMPLEMENT_DYNAMIC_CLASS(wxImage, wxObject)
#endif
wxImage::wxImage()
UnRef();
}
-wxImage wxImage::Scale( int width, int height )
+wxImage wxImage::Scale( int width, int height ) const
{
wxImage image;
// Retrieve depth
GdkVisual *visual = gdk_window_get_visual( bitmap.GetPixmap() );
- if (visual == NULL) visual = gdk_window_get_visual( (GdkWindow*) &gdk_root_parent );
+ if (visual == NULL) visual = gdk_visual_get_system();
int bpp = visual->depth;
bitmap.SetDepth( bpp );
vi = XGetVisualInfo( dpy, VisualIDMask|VisualDepthMask, &vinfo_template, &nitem );
- wxCHECK_MSG( vi, wxNullBitmap, _T("no visual") );
+ wxCHECK_RET( vi, _T("no visual") );
if ((bpp == 16) && (vi->red_mask != 0xf800)) bpp = 15;