idlehomescreen/widgetmanager/src/wmimageconverter.cpp
branchRCL_3
changeset 12 9674c1a575e9
parent 11 ff572dfe6d86
child 19 79311d856354
equal deleted inserted replaced
11:ff572dfe6d86 12:9674c1a575e9
   996     if ( aSrcBitmap->DisplayMode() != aTrgBitmap->DisplayMode() )
   996     if ( aSrcBitmap->DisplayMode() != aTrgBitmap->DisplayMode() )
   997         {
   997         {
   998         User::Leave( KErrArgument );
   998         User::Leave( KErrArgument );
   999         }
   999         }
  1000     
  1000     
       
  1001     // make target to correct size
       
  1002     if ( aTrgBitmap->SizeInPixels() != aSize )
       
  1003         {
       
  1004         aTrgBitmap->Resize( aSize );
       
  1005         }
       
  1006     
  1001     TRect targetRect( aSize );
  1007     TRect targetRect( aSize );
  1002 
  1008 
  1003     // calculate aspect ratio
  1009     // calculate aspect ratio
  1004     TInt srcHeight = aSrcBitmap->SizeInPixels().iHeight;
  1010     TInt srcHeight = aSrcBitmap->SizeInPixels().iHeight;
  1005     TInt srcWidth = aSrcBitmap->SizeInPixels().iWidth;
  1011     TInt srcWidth = aSrcBitmap->SizeInPixels().iWidth;