Symbian 的Gif顯示.(暫且記錄關鍵信息. 完善后再認真介紹)
我的gif播放這樣設置,為什么只播放一次呢??
if(iImageViewer)
{
delete iImageViewer;
}
TRect r(TPoint(0,0), TSize(50, 50));
iImageViewer = CPAlbImageViewerBasic::NewL(NULL, r);
TRAPD(err, iImageViewer->LoadImageL(tFullFileName, EColor4K));
if (err == KErrNone)
{
iImageViewer->SetAnimationObserver(NULL,ETrue);
iImageViewer->ScaleOptimumL();
iImageViewer->PlayAnimationL();
}
愣愣(65087426) 13:06:35
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
循環播放
無牙老虎(276877017) 13:07:26
iViewer->SetAnimationObserver(this,ETrue);
如果我這里不想設置為this呢??
愣愣(65087426) 13:07:52
不行吧,要一個observer的
無牙老虎(276877017) 13:08:14
我上面的代碼就運行了一次
植物獸獸(39827140) 13:08:16
這個地方傳入的是MPAlbAnimationObserver *aObserver,
愣愣(65087426) 13:08:18
Notify 實現這個就循環了
if(iImageViewer)
{
delete iImageViewer;
}
TRect r(TPoint(0,0), TSize(50, 50));
iImageViewer = CPAlbImageViewerBasic::NewL(NULL, r);
TRAPD(err, iImageViewer->LoadImageL(tFullFileName, EColor4K));
if (err == KErrNone)
{
iImageViewer->SetAnimationObserver(NULL,ETrue);
iImageViewer->ScaleOptimumL();
iImageViewer->PlayAnimationL();
}
愣愣(65087426) 13:06:35
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
循環播放
無牙老虎(276877017) 13:07:26
iViewer->SetAnimationObserver(this,ETrue);
如果我這里不想設置為this呢??
愣愣(65087426) 13:07:52
不行吧,要一個observer的
無牙老虎(276877017) 13:08:14
我上面的代碼就運行了一次
植物獸獸(39827140) 13:08:16
這個地方傳入的是MPAlbAnimationObserver *aObserver,
愣愣(65087426) 13:08:18
Notify 實現這個就循環了
posted on 2007-12-19 14:22 Khan 閱讀(1828) 評論(5) 編輯 收藏 引用 所屬分類: GCC/G++