本文整理汇总了C++中CFbsBitmap::Handle方法的典型用法代码示例。如果您正苦于以下问题:C++ CFbsBitmap::Handle方法的具体用法?C++ CFbsBitmap::Handle怎么用?C++ CFbsBitmap::Handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFbsBitmap
的用法示例。
在下文中一共展示了CFbsBitmap::Handle方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetFrameL
/**
Extracts data from aFrameData, packs them and then it sends this package to the player
*/
void RBitmapAnim::SetFrameL(const CBitmapFrameData& aFrameData, TInt aOpCode)
{
TPckgBuf<TFrameData> dataFrameArg;
CFbsBitmap* bitmap = aFrameData.Bitmap();
dataFrameArg().iBitmapHandle=( (bitmap) ? bitmap->Handle() : 0 );
CFbsBitmap* mask = aFrameData.Mask();
dataFrameArg().iMaskBitmapHandle=( (mask) ? mask->Handle() : 0 );
dataFrameArg().iIntervalInMilliSeconds=aFrameData.IntervalInMilliSeconds();
dataFrameArg().iPosition=aFrameData.Position();
User::LeaveIfError(CommandReply(aOpCode, dataFrameArg));
}
示例2: GetAppIcon
EXPORT_C TInt AknsUtils::GetAppIcon(
MAknsSkinInstance* aInstance, TUid aAppUid, TSize aSize,
CApaMaskedBitmap& aAppBitmap )
{
AKNS_TRACE_OBSOLETE("AknsUtils::GetAppIcon (4 param)");
__ASSERT_DEBUG( aAppBitmap.Mask(),
AKNS_DEBUG_PANIC( EAknsDPanicInvalidParameter ) );
CFbsBitmap* bitmap = NULL;
CFbsBitmap* mask = NULL;
TInt ret = KErrNone;
TBool configuredIcon = EFalse;
if ( !configuredIcon )
{
ret = GetAppIconFromSkin( aInstance, aAppUid, aSize, bitmap, mask );
if( ret == KErrNone )
{
if( bitmap && mask && bitmap->Handle() && mask->Handle() )
{
ret = aAppBitmap.Duplicate( bitmap->Handle() );
ret |= aAppBitmap.Mask()->Duplicate( mask->Handle() );
delete bitmap;
delete mask;
return ret;
}
else
{
// Delete bitmaps and proceed
delete bitmap;
bitmap = NULL;
delete mask;
mask = NULL;
}
}
}
RApaLsSession lsSession;
ret = lsSession.Connect();
if( ret == KErrNone )
{
ret = lsSession.GetAppIcon( aAppUid, aSize, aAppBitmap );
lsSession.Close();
if(ret == KErrNone) //icon case
AknInternalIconUtils::SetAppIcon(bitmap); //icon case
}
return ret;
} //lint !e1746 GetAppIcon syntax
示例3: Copy
// -----------------------------------------------------------------------------
// CMaskedBitmap::Copy
// -----------------------------------------------------------------------------
TInt CMaskedBitmap::Copy( const CFbsBitmap& aBitmap, const CFbsBitmap& aMask, TBool aDuplicate )
{
Reset();
TInt bitmapHandle( aBitmap.Handle() );
TInt maskHandle( aMask.Handle() );
if( bitmapHandle && maskHandle &&
aBitmap.SizeInPixels() != aMask.SizeInPixels() )
{
return KErrArgument;
}
TInt err( KErrNone );
if( bitmapHandle )
{
if( aDuplicate )
{
err = iBitmap->Duplicate( bitmapHandle );
}
else
{
err = BitmapUtil::CopyBitmap( aBitmap, *iBitmap );
}
}
if( !err && maskHandle )
{
if( aDuplicate )
{
err = iMask->Duplicate( maskHandle );
}
else
{
err = BitmapUtil::CopyBitmap( aMask, *iMask );
}
if( err )
{
iBitmap->Reset();
}
}
return err;
}
示例4: getThumbnail
int CAfStorageClient::getThumbnail(const TDesC &imagePath, void *userData)
{
lastMethodCalled = CAfStorageClient::GetThumbnailMethod;
delete lastCallThumbnailPath;
lastCallThumbnailPath = imagePath.Alloc();
lastCallUserData = userData;
CFbsBitmap *bitmap = new (ELeave)CFbsBitmap();
CleanupStack::PushL(bitmap);
User::LeaveIfError(bitmap->Create(TSize(128, 128), EColor4K));
mObserver.getThumbnailRequestCompleted(CAfStorageClient::expectedReturnCode, bitmap->Handle(), userData);
CleanupStack::PopAndDestroy(bitmap);
return CAfStorageClient::expectedReturnCode;
}
示例5: MvpuoFrameReady
void CTestStepVidPlayerDRMGetFrame::MvpuoFrameReady(CFbsBitmap& aFrame, TInt aError)
{
iError = aError;
if (aError==KErrNone)
{
if (aFrame.Handle() == NULL || aFrame.SizeInPixels() != TSize(KFrameWidth,KFrameHeight) )
iError = KErrArgument;
else
{
iError = KErrNone;
INFO_PRINTF1(_L("MvpuoFrameReady: GetFrameL() COMPLETED OK"));
}
}
CActiveScheduler::Stop();
}
示例6: CreateMaskedBitmapL
// -----------------------------------------------------------------------------
// AknsUtils::CreateMaskedBitmapL
// -----------------------------------------------------------------------------
//
EXPORT_C CApaMaskedBitmap* AknsUtils::CreateMaskedBitmapL(
MAknsSkinInstance* aInstance, const TAknsItemID& aID,
const TDesC& aFilename,
const TInt aFileIndex, const TInt aFileMaskIndex )
{
AKNS_TRACE_OBSOLETE("AknsUtils::CreateMaskedBitmapL (5 param)");
CFbsBitmap* bitmap = NULL;
CFbsBitmap* mask = NULL;
CreateIconLC( aInstance, aID, bitmap, mask,
aFilename, aFileIndex, aFileMaskIndex );
// Bitmap and mask always exist here
CApaMaskedBitmap* maskedBitmap = CApaMaskedBitmap::NewLC();
// Note that these calls leave with SVG-originating icons
User::LeaveIfError( maskedBitmap->Duplicate( bitmap->Handle() ) );
User::LeaveIfError( maskedBitmap->Mask()->Duplicate( mask->Handle() ) );
CleanupStack::Pop( maskedBitmap );
CleanupStack::PopAndDestroy( 2 ); // bitmap, mask
return maskedBitmap;
}
示例7: BitmapsL
//.........这里部分代码省略.........
iBitmap.Reset();
iBitmap2.Reset();
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMarkEnd);
iFbs->SendCommand(EFbsMessUserMarkEnd);
}
break;
}
else
TEST2(ret, KErrNone);
}
iFbs->SendCommand(EFbsMessDefaultAllocFail,0);
iFbs->SendCommand(EFbsMessUserAllocFail,0);
TEST(iFbs->ResourceCount()==0);
// Duplicate
CFbsBitmap bmpalt;
ret = bmpalt.Create(KSmallSize,EColor256);
TEST2(ret, KErrNone);
INFO_PRINTF1(_L("CFbsBitmap::Duplicate()\r\n"));
for (count = 1; ; count++)
{
iFbs->SendCommand(EFbsMessDefaultAllocFail,count);
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMark);
iFbs->SendCommand(EFbsMessUserMark);
}
ret = iBitmap.Duplicate(bmpalt.Handle());
if (ret == KErrNoMemory)
{
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMarkEnd);
iFbs->SendCommand(EFbsMessUserMarkEnd);
}
}
else if (ret == KErrNone)
{
iBitmap.Reset();
if(heapMarkCheckFlag)
{
iFbs->SendCommand(EFbsMessDefaultMarkEnd);
iFbs->SendCommand(EFbsMessUserMarkEnd);
}
break;
}
else
TEST2(ret, KErrNone);
}
iFbs->SendCommand(EFbsMessDefaultAllocFail,0);
iFbs->SendCommand(EFbsMessUserAllocFail,0);
TEST(iFbs->ResourceCount()==1);
ret = bmpalt.Create(KSmallSize,EColor256);
TEST2(ret, KErrNone);
for (count = 1; ; count++)
{
iFbs->SendCommand(EFbsMessUserAllocFail,count);