WEB开发网
开发学院手机开发Symbian 开发 关于在symbian listbox中添加svg图片的问题 阅读

关于在symbian listbox中添加svg图片的问题

 2010-05-31 20:19:00 来源:WEB开发网   
核心提示:// for EListBoxAtestlist2List_iconIndexfor(int i=0;i<11;i++){icon = LoadAndScaleIconL(KATestList2File, EMbmAtestlist2List_icon, EMbmAtestlist2List_icon_mask,

// 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 );

上一页  17 18 19 20 21 22 23 24 25 26 27  下一页

Tags:关于 symbian listbox

编辑录入:coldstar [复制链接] [打 印]
赞助商链接