#include "wx/artprov.h"
#include "wx/hashmap.h"
#include "wx/module.h"
+#include "wx/image.h"
+// For the purposes of forcing this module to link
+extern char g_ArtProviderModule;
// ===========================================================================
// implementation
void wxArtProviderCache::Clear()
{
+ // Hack to make the default provider link
+ // with the application
+ g_ArtProviderModule = 0;
m_bitmapsHash.clear();
}
{
bmp = node->GetData()->CreateBitmap(id, client, size);
if ( bmp.Ok() )
+ {
+ if ( size != wxDefaultSize &&
+ (bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) )
+ {
+ wxImage img = bmp.ConvertToImage();
+ img.Rescale(size.x, size.y);
+ bmp = wxBitmap(img);
+ }
break;
+ }
}
+
sm_cache->PutBitmap(hashId, bmp);
}