transparent svg icons

Login to reply to this topic.
Thu, 2006-05-18 15:30
Joined: 2005-11-16
Forum posts: 63
Hi,

does anyone experienced this problem with svg icons:
I have all my svg icons put into a mif file and use them within my application.

But the icon is drawn some kind of transparent! Depending on the selected theme the icon looks better or worse. I set the mask to NULL and there is no transparency anymore just like i want it - all colors are looking pretty Wink ...  But the icon is _not_ transparent at the edges!

What I guess is that the mask doesnt has 1 bit color depth - so there are some kind of greyscales which cause this transparency. Am I wrong?

Any ideas?

regards
makom

Thu, 2006-05-18 17:31
Joined: 2005-11-16
Forum posts: 63
Re: transparent svg icons
Maybe I have found the solution.
Previously I created Bitmap and Mask separatly
Code:
CFbsBitmap *bitmap = AknIconUtils::CreateIconL(iconfile, EMySvgIcon);
CFbsBitmap *mask = AknIconUtils::CreateIconL(iconfile, EMySvgIcon_mask);

now I create bitmap and mask within on single CreatIconL() method
Code:
AknIconUtils::CreateIconL(bitmap, mask, iconfile, EMySvgIcon, EMySvgIcon_mask);

This works for normal views (listboxes etc.) but on the navipane this doesnt seem to work! Why?

regards
makom
Fri, 2006-09-22 09:24
Joined: 2004-11-25
Forum posts: 5
Re: transparent svg icons
Hi Can you please give me an example how to add the svg files to the mbm file, so I can use svg in list box

rami75lu

Fri, 2006-09-22 15:33
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: transparent svg icons
Quote from: rami75lu
Hi Can you please give me an example how to add the svg files to the mbm file, so I can use svg in list box

What do you mean by add the svg files to mbm file?

Normally the svg file will generate mif files instead of mbm, and as usual an mbg file also will be created for including in the cpp. Earler you've to create two bitmaps - one for the actual image and another for the mask, but now only one svg is enough for an item.

  • Login to reply to this topic.