Symbian 开发中卡拉OK字幕实现方法
2010-02-23 04:09:00 来源:WEB开发网实现步骤如下:
在.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;
- ››开发Android 日历教程
- ››开发学院总结 Win 8实用技巧大全
- ››开发学院原创教程:把win8的IE10放桌面上方法(非...
- ››开发者眼中的Windows Phone和Android
- ››Symbian S60 SocketConnection参数
- ››开发学院教你用SQL 语句最快速清空MySQL 数据表的...
- ››Symbian乏力:2010年诺基亚悲情大事记
- ››Symbian三大升级开启2011年新战略
- ››Symbian/Android/iOS/WM安装包对比
- ››Symbian一个活动对象的测试例子
- ››Symbian ListBox控件
- ››Symbian下自动切换SDK的批处理代码
更多精彩
赞助商链接