本文整理汇总了C++中CFbsBitmap::ExternalizeL方法的典型用法代码示例。如果您正苦于以下问题:C++ CFbsBitmap::ExternalizeL方法的具体用法?C++ CFbsBitmap::ExternalizeL怎么用?C++ CFbsBitmap::ExternalizeL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFbsBitmap
的用法示例。
在下文中一共展示了CFbsBitmap::ExternalizeL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INFO_PRINTF1
//.........这里部分代码省略.........
// WriteStore creation
RFs fs;
ret=fs.Connect();
TEST2(ret, KErrNone);
CDirectFileStore* writestore=NULL;
//Construct filename using the thread id to enable concurrent test runs.
_LIT(KSbmFileName,"c:\\tall_");
TBuf<36> buf(KSbmFileName);
TThreadId threadId = RThread().Id();
TUint64 id = threadId.Id();
TBuf<20> threadIdBuf;
threadIdBuf.Num(id);
buf.Append(threadIdBuf);
buf.Append(_L(".sbm"));
TRAP(ret,writestore=CDirectFileStore::ReplaceL(fs,buf,EFileStream|EFileWrite));
TEST2(ret, KErrNone);
TUidType uidtype(KDirectFileStoreLayoutUid,KMultiBitmapFileImageUid);
TRAP(ret,writestore->SetTypeL(uidtype));
TEST2(ret, KErrNone);
RStoreWriteStream writestrm;
TStreamId headerid(0);
TRAP(ret,headerid=writestrm.CreateL(*writestore));
TEST2(ret, KErrNone);
TRAP(ret,writestore->SetRootL(headerid));
TEST2(ret, KErrNone);
// Externalize
ret=iBitmap.Create(KSmallSize,EColor256);
TEST2(ret, KErrNone);
INFO_PRINTF1(_L("CFbsBitmap::ExternalizeL()\r\n"));
for (count = 1; ; count++)
{
__UHEAP_SETFAIL(RHeap::EDeterministic,count);
__UHEAP_MARK;
TRAP(ret,iBitmap.ExternalizeL(writestrm));
if (ret == KErrNoMemory)
{
__UHEAP_MARKEND;
}
else if (ret == KErrNone)
{
iBitmap.Reset();
__UHEAP_MARKEND;
break;
}
else
{
__UHEAP_MARKEND;
TEST2(ret, KErrNone);
}
}
__UHEAP_RESET;
TEST(iFbs->ResourceCount()==0);
// ExternalizeRectangle
ret=iBitmap.Create(KSmallSize,EColor256);
TEST2(ret, KErrNone);
INFO_PRINTF1(_L("CFbsBitmap::ExternalizeRectangleL()\r\n"));