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

📄 demobmpappview.cpp

📁 SYMBIAN平台的手机开发方面的图像处理程序
💻 CPP
字号:
/* Copyright (c) 2005, Nokia. All rights reserved */
//#include <gdi.h>

#include <eikenv.h>
#include <fbs.h>
#include <eikenv.h>
#include <coecntrl.h>



#include "DemoBMPAppView.h"
#include "demobmp.mbg"

_LIT(pathAppMbm,"\\system\\apps\\demobmp\\demobmp.mbm");

//new size to scale image
static const TInt KNewImageWidth = 150;
static const TInt KNewImageHeight = 150;

CDemoBMPAppView* CDemoBMPAppView::NewL(const TRect& aRect)
    {
    CDemoBMPAppView* self = NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
    }

CDemoBMPAppView* CDemoBMPAppView::NewLC(const TRect& aRect)
    {
    CDemoBMPAppView* self = new (ELeave) CDemoBMPAppView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);



    return self;
    }

void CDemoBMPAppView::ConstructL(const TRect& aRect)
    {
    CreateWindowL();

	image = new (ELeave) CFbsBitmap();
	image = iEikonEnv->CreateBitmapL( pathAppMbm, EMbmDemobmpTemp);	
    
    iScaler = CMdaBitmapScaler::NewL();


    SetRect(aRect);

	ActivateL();
    }

CDemoBMPAppView::CDemoBMPAppView()
:iobserver(*this)
    {
    // Add any construction code that can not leave here
    }


CDemoBMPAppView::~CDemoBMPAppView()
    {
    // Add any destruction code here
	if (image)
		delete image;

	delete iScaler;
	iScaler = NULL;
    }

void CDemoBMPAppView::Draw(const TRect& /*aRect*/) const
    {
    // Clear the screen
    CWindowGc& gc = SystemGc();
    gc.Clear(Rect());
  

	gc.BitBlt(TPoint(0,0),image);
	iScaler->ScaleL( iobserver,*image,TSize(KNewImageWidth,KNewImageHeight));
    }


void CDemoBMPAppView::MiuoOpenComplete(TInt aError)
{
	if (aError == KErrNone)
	{
	_LIT(MSG1, "SCAN FINISHED! " );

	TBuf<60> buffer;
	buffer.Num(3);

	_LIT(MSG2, "  files");
	buffer.Append(MSG2);


	CEikonEnv::Static()->AlertWin( MSG1, buffer );  //打印警告信息
	}
}


void CDemoBMPAppView::MiuoCreateComplete(TInt aError)
{
	;
}


void CDemoBMPAppView::MiuoConvertComplete(TInt aError)
{
	;
}


⌨️ 快捷键说明

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