javauis/m2g_qt/src/M2GUtils.cpp
changeset 87 1627c337e51e
parent 56 abc41079b313
equal deleted inserted replaced
80:d6dafc5d983f 87:1627c337e51e
     1 /*
     1 /*
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    94     return err;
    94     return err;
    95 }
    95 }
    96 
    96 
    97 
    97 
    98 TInt M2GBitmapUtils::BitQBlt(QImage& aTargetQimage,
    98 TInt M2GBitmapUtils::BitQBlt(QImage& aTargetQimage,
    99                             const QImage& aSourceQimage,
    99                              const QImage& aSourceQimage,
   100                             const TPoint& aPoint,
   100                              const TPoint& aPoint,
   101                             const TRect* aRect,
   101                              const TRect* aRect,
   102                             const CFbsBitmap* aSourceMask)
   102                              const CFbsBitmap* aSourceMask)
   103 {
   103 {
   104     M2G_DEBUG_2("M2G_DEBUG: M2GBitmapUtils::BitQBlt() - Point(x=%d, y=%d)", aPoint.iX, aPoint.iY);
   104     M2G_DEBUG_2("M2G_DEBUG: M2GBitmapUtils::BitQBlt() - Point(x=%d, y=%d)", aPoint.iX, aPoint.iY);
   105     
   105 
   106     QPixmap pixmapTarget = QPixmap::fromImage(aTargetQimage);
   106     QPixmap pixmapTarget = QPixmap::fromImage(aTargetQimage);
   107     CFbsBitmap* aTarget  = pixmapTarget.toSymbianCFbsBitmap();
   107     CFbsBitmap* aTarget  = pixmapTarget.toSymbianCFbsBitmap();
   108 
   108 
   109     QPixmap pixmapSource = QPixmap::fromImage(aSourceQimage);
   109     QPixmap pixmapSource = QPixmap::fromImage(aSourceQimage);
   110     CFbsBitmap* aSource = pixmapSource.toSymbianCFbsBitmap();
   110     CFbsBitmap* aSource = pixmapSource.toSymbianCFbsBitmap();
   339         iTargetContext.BitBlt(iPoint, tempBitmap);
   339         iTargetContext.BitBlt(iPoint, tempBitmap);
   340     }
   340     }
   341     CleanupStack::PopAndDestroy(tempBitmap);
   341     CleanupStack::PopAndDestroy(tempBitmap);
   342     M2G_DEBUG_0("TSWTBitBlt()-");
   342     M2G_DEBUG_0("TSWTBitBlt()-");
   343 }
   343 }
   344 //TODO Check for M2G_DO_LOCK M2G_DO_UNLOCK 
       
   345 //TODO Put Check for aSvgProxyHandle in all the functions.
       
   346 M2G_NS_END
   344 M2G_NS_END