关于在symbian listbox中添加svg图片的问题
2010-05-31 20:19:00 来源:WEB开发网// for EListBoxAtestlist2List_iconIndex
for(int i=0;i<11;i++)
{
icon = LoadAndScaleIconL(
KATestList2File, EMbmAtestlist2List_icon, EMbmAtestlist2List_icon_mask,
NULL, EAspectRatioPreserved,i );//创建图标
CleanupStack::PushL( icon );
icons->AppendL( icon );
CleanupStack::Pop( icon );
}
CleanupStack::Pop( icons );
if ( icons != NULL )
{
iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons );//设置图片的图标数组 这样在以后的地方就好用了
}
}
/**
* Handle commands relating to markable lists.
*/
TBool CATestList2ListBox::HandleMarkableListCommandL( TInt aCommand )
{
return EFalse;
}
// ]]] end generated function
// [[[ begin generated function: do not modify
/**
* This routine loads and scales a bitmap or icon.
*
* @param aFileName the MBM or MIF filename
* @param aBitmapId the bitmap id
* @param aMaskId the mask id or -1 for none
* @param aSize the TSize for the icon, or NULL to use real size
* @param aScaleMode one of the EAspectRatio* enums when scaling
*
*/
CGulIcon* CATestList2ListBox::LoadAndScaleIconL(
const TDesC& aFileName,
TInt aBitmapId,
TInt aMaskId,
TSize* aSize,
TScaleMode aScaleMode,TInt i)
{
//icon = LoadAndScaleIconL(
// KATestList2File, EMbmAtestlist2List_icon, EMbmAtestlist2List_icon_mask,
// NULL, EAspectRatioPreserved );
CFbsBitmap* bitmap;
CFbsBitmap* mask;
if(i==0)
{
AknIconUtils::CreateIconL( bitmap, mask, KATestList2SVGFile, EMbmAtestlist2_aifTodisk, EMbmAtestlist2_aifTodisk_mask );
更多精彩
赞助商链接