您的位置:首页 > 其它

如何在symbian下绘制Gif图像

2008-03-22 22:21 429 查看

Gif Animation for symbian 2nd edition phones

Derive your appliation container class from MPAlbAnimationObserver, and declare these

CPAlbImageViewerBasic* iViewer ;
void Notify( TAnimationEvent aEvent );

And, in your container,Animation method/function use this code. Dont forget to return count in CountComponentControls() and iViewer pointer in ComponetControl() methods.

iViewer=CPAlbImageViewerBasic::NewL(this,aRect);
iViewer->SetAnimationObserver(this,ETrue);//for looping
iViewer->LoadImageL(_L("c://nokia//images//anim.gif"),EColor4K);
iViewer->PlayAnimationL(); // support image and animation


Symbian 3rd edition phones

iGifFileDataprovider= new (ELeave) CICLAnimationDataProvider;
iGifFileDataprovider->SetFileL(iFsSession,_L("C://nokia//images//anim.gif"));

igifanimationconfig.iFlags = TAnimationConfig::ELoop;
igifanimationconfig.iData = 10000;
TPoint gifpoint = Position();
iGifAnimatior = CBasicAnimation::NewL(iGifFileDataprovider,gifpoint,CEikonEnv::Static()->WsSession(),Window());
iGifAnimatior->Start(igifanimationconfig);

//In your Draw method
iGifAnimatior->Draw(gc);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: