WEB开发网
开发学院手机开发Symbian 开发 Symbian 开发中卡拉OK字幕实现方法 阅读

Symbian 开发中卡拉OK字幕实现方法

 2010-02-23 04:09:00 来源:WEB开发网   
核心提示:实现步骤如下:在.h文件中private:void CreateBackBufferL();void ReleaseBackBuffer();void DrawToBackBuffer();//双缓冲用到的私有成员private:CFbsBitmap* iBackBuffer; //双缓冲中用到的位图CFbsBitma

实现步骤如下:

在.h文件中

private:

void CreateBackBufferL();

void ReleaseBackBuffer();

void DrawToBackBuffer();

//双缓冲用到的私有成员

private:

CFbsBitmap* iBackBuffer; //双缓冲中用到的位图

CFbsBitmapDevice* iBackBufferDevice; //用于得到Gc

CFbsBitGc* iBackBufferContext; //双缓冲位图Gc

CFbsBitmap* iBackBuffer_2; //双缓冲中用到的位图

CFbsBitmapDevice* iBackBufferDevice_2; //用于得到Gc

CFbsBitGc* iBackBufferContext_2; //双缓冲位图Gc

在。cpp中函数的实现

void CAuditionContainer::CreateBackBufferL()

{

// Create back buffer bitmap

iBackBuffer = new (ELeave) CFbsBitmap;

User::LeaveIfError( iBackBuffer->Create(TSize(240,30),

iEikonEnv->DefaultDisplayMode()));

// Create back buffer graphics context

iBackBufferDevice = CFbsBitmapDevice::NewL(iBackBuffer);

User::LeaveIfError(iBackBufferDevice->CreateContext(iBackBufferContext));

iBackBufferContext->SetPenStyle(CGraphicsContext::ESolidPen);

iBackBuffer_2 = new (ELeave) CFbsBitmap;

User::LeaveIfError( iBackBuffer_2->Create(TSize(240,30),

iEikonEnv->DefaultDisplayMode()));

// Create back buffer graphics context

iBackBufferDevice_2 = CFbsBitmapDevice::NewL(iBackBuffer_2);

User::LeaveIfError(iBackBufferDevice_2->CreateContext(iBackBufferContext_2));

iBackBufferContext_2->SetPenStyle(CGraphicsContext::ESolidPen);

}

void CAuditionContainer::ReleaseBackBuffer()

{

// Release double buffering classes

if (iBackBufferContext)

{

delete iBackBufferContext;

iBackBufferContext = NULL;

}

if (iBackBufferDevice)

{

delete iBackBufferDevice;

1 2 3  下一页

Tags:Symbian 开发 卡拉OK

编辑录入:coldstar [复制链接] [打 印]
赞助商链接