⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitmapscalerengine.cpp

📁 《基于Symbian OS的手机开发与应用实践》这本书的配套源码。
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CBitmapScalerEngine from BitmapScalerEngine.cpp
*  Part of  : BitmapScaler
*  Created  : 30.01.2006 by ToBeReplacedByAuthor
*  Implementation notes:
*     
*  Version  :
*  Copyright: ToBeReplacedByCopyright
* ============================================================================
*/

// INCLUDE FILES
#include "BitmapScalerEngine.h"


// ================= MEMBER FUNCTIONS =======================

// Two-phased constructor.
CBitmapScalerEngine* CBitmapScalerEngine::NewL(MObserver& aObserver)
    {
    CBitmapScalerEngine* self = new(ELeave) CBitmapScalerEngine(aObserver);
    CleanupStack::PushL( self );
    self->ConstructL();
    CleanupStack::Pop();
    return self; 
    }

// destructor
CBitmapScalerEngine::~CBitmapScalerEngine()
    {
    delete iBitmapScaler;
    }

// constructor
CBitmapScalerEngine::CBitmapScalerEngine(MObserver& aObserver ) : 
    CActive(EPriorityStandard), iObserver(aObserver)
    {
    }

// EPOC default constructor can leave.
void CBitmapScalerEngine::ConstructL()
    {
    iBitmapScaler = CBitmapScaler::NewL();
    CActiveScheduler::Add( this );
    }

void CBitmapScalerEngine::RunL()
    {
    iObserver.OnCompleteL(iStatus.Int());
    }

void CBitmapScalerEngine::DoCancel()
    {
    iBitmapScaler->Cancel();
    }

void CBitmapScalerEngine::Scale(CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap)
    {
    Cancel();
    iBitmapScaler->Scale(&iStatus, aSrcBitmap, aTgtBitmap);
    SetActive();
    }

// End of File  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -