×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    84

    how to make SVG icons transparent.

    I have SVG icons to be displayed in listbox. They appear with black background in the list box. How can i make them transaprent. Idont have any masks for them.. Please letme know . it is very urgent..

    Thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: how to make SVG icons transparent.

    basically when you make the SVG, you should define the backgrounf as transparent with the tool you are using for making SVGs. Then add them into the mif file in a way that the mask is also put into there (for exmaple with /c32,1 option), then you can load the icon & mask separately to your listboxes icon array.

  3. #3
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    84

    Re: how to make SVG icons transparent.

    Basically i need to have mask SVG icons also for all of my icons.
    And in mk file i should be specify as /c32,1 $(ICONDIR)\arrowUpMask.svg.

    I have this code for adding icons.

    CFbsBitmap* arrowUpIcon = AknIconUtils::CreateIconL(KAvkonBitmapFile,EMbmOhstockclientdemoArrowup );
    CleanupStack::PushL( arrowUpIcon );
    CFbsBitmap* ArrowUpIconMask = NULL;
    CGulIcon* ArrowUpListIcon = CGulIcon::NewL(arrowUpIcon, ArrowUpIconMask );
    CleanupStack::Pop( arrowUpIcon ); // now owned by ArrowUpListIcon
    CleanupStack::PushL( ArrowUpListIcon );
    iconArray->AppendL( ArrowUpListIcon );

    In the above code i need to call CreateIconL for mask also..
    Please confirmm....

    Thanks

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: how to make SVG icons transparent.

    you would also need to actually load the mask image, by having it NULL means that it is not used at all..

  5. #5
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    84

    Re: how to make SVG icons transparent.

    Hi,
    I included

    RESOURCE :
    mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME_PRIVATE) \
    /c32 $(ICONDIR)\qgn_menu_OHStockClientDemo.svg \
    /c32 $(ICONDIR)\Stocks.svg \
    /c32 $(ICONDIR)\Bonds.svg \
    /c32 $(ICONDIR)\Currency.svg \
    /c32 $(ICONDIR)\arrowup.svg \
    /c32,1 $(ICONDIR)\arrowdown.svg \

    In the code to add icons i changed to

    AknIconUtils::CreateIconL(arrowDownIcon,ArrowDownIconMask,KAvkonBitmapFile,EMbmOhstockclientdemoArrowdown,EMbmOhstockclientdemoArrowdown_mask );

    I can see EMbmOhstockclientdemoArrowdown_mask created in the mbg file. But i am not getting any icon for the list item now.
    and also EMbmOhstockclientdemoArrowdown_mask appears in red colur not in blue. If the icon id is proper then it is shown in blue color right ? . i dont know what is the problem..

    Thanks

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: how to make SVG icons transparent.

    Dunno really, it should work e just fine, provided that the image has transparent section on it.

Similar Threads

  1. Strange problem with compilation!!! ARM9E
    By dmazgalin in forum Symbian
    Replies: 1
    Last Post: 2007-11-02, 09:33
  2. Semitransparent SVG icons
    By rihoe in forum Symbian
    Replies: 0
    Last Post: 2007-04-05, 14:06
  3. Strange Compilation error
    By stefano.garusi in forum Symbian
    Replies: 7
    Last Post: 2006-10-09, 12:54
  4. Compilation series 60 3rd edition
    By asmobease in forum Symbian
    Replies: 3
    Last Post: 2006-09-10, 14:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×