git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67043
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/intl.h"
#endif
#include "wx/intl.h"
#endif
#include "wx/propgrid/propgrid.h"
#include "wx/propgrid/propgrid.h"
if ( imSz.y != maxSz.y )
{
if ( imSz.y != maxSz.y )
{
// Here we use high-quality wxImage scaling functions available
wxImage img = bmp.ConvertToImage();
double scaleY = (double)maxSz.y / (double)imSz.y;
// Here we use high-quality wxImage scaling functions available
wxImage img = bmp.ConvertToImage();
double scaleY = (double)maxSz.y / (double)imSz.y;
((double)bmp.GetHeight())*scaleY,
wxIMAGE_QUALITY_HIGH);
wxBitmap* bmpNew = new wxBitmap(img, 32);
((double)bmp.GetHeight())*scaleY,
wxIMAGE_QUALITY_HIGH);
wxBitmap* bmpNew = new wxBitmap(img, 32);
+ #else
+ // This is the old, deprecated method of scaling the image
+ wxBitmap* bmpNew = new wxBitmap(maxSz.x,maxSz.y,bmp.GetDepth());
+ wxMemoryDC dc;
+ dc.SelectObject(*bmpNew);
+ double scaleY = (double)maxSz.y / (double)imSz.y;
+ dc.SetUserScale(scaleY, scaleY);
+ dc.DrawBitmap(bmp, 0, 0);
+ #endif
m_valueBitmap = bmpNew;
}
m_valueBitmap = bmpNew;
}