if( m_resizeMethod == kScale )
{
// Use scaling method
- if( width != m_pImage->getWidth() ||
- height != m_pImage->getHeight() )
+ if( width > 1 && height > 1 )
{
- OSFactory *pOsFactory = OSFactory::instance( getIntf() );
- // Rescale the image with the actual size of the control
- ScaledBitmap bmp( getIntf(), m_rBitmap, width, height );
- SKINS_DELETE( m_pImage );
- m_pImage = pOsFactory->createOSGraphics( width, height );
- m_pImage->drawBitmap( bmp, 0, 0 );
+ if( width != m_pImage->getWidth() ||
+ height != m_pImage->getHeight() )
+ {
+ OSFactory *pOsFactory = OSFactory::instance( getIntf() );
+ // Rescale the image with the actual size of the control
+ ScaledBitmap bmp( getIntf(), m_rBitmap, width, height );
+ SKINS_DELETE( m_pImage );
+ m_pImage = pOsFactory->createOSGraphics( width, height );
+ m_pImage->drawBitmap( bmp, 0, 0 );
+ }
+ rImage.drawGraphics( *m_pImage, 0, 0, xDest, yDest );
}
- rImage.drawGraphics( *m_pImage, 0, 0, xDest, yDest );
}
else
{