Discussion Board

Results 1 to 5 of 5

Thread: Using svg icons

  1. #1
    Registered User tsippa's Avatar
    Join Date
    Oct 2006
    Posts
    37
    I'm trying to add a new svg icon which is to be used in a listbox. Can I add this directly to mifdef generated when I created the project in Carbide, or do I need to create a new mifdef? If I add the svg to the current mifdef, I need to define number_of_icons as 2 in LOCALISABLE_APP_INFO, right?

    Furthermore, how do I find out the Id's used to load the svg from the svg file, as I didn't create it myself? Do I need to include mbg? How exactly do I load the svg anyway? Yes, I have looked at n+1 examples, please don't ask me to look at them again. Too confusing. :)

  2. #2
    Registered User comp_freak's Avatar
    Join Date
    Nov 2006
    Location
    Bangalore
    Posts
    17
    Hi tsippa,

    you just need to call AknIconUtils class to load svg icons. Here is a sample code for you...I assume you are using S60 SDk 3rd Ed

    _LIT( KAppPath, "Z:\\private\\10009AD7\\icons.mif" );

    iIconProvider = CIconFileProvider::NewL(iFsSession, KAppPath);

    // Load svg icon
    iBackground = AknIconUtils::CreateIconL(*iIconProvider, EMbmScalablescreendrawingiconsBackground);


    you need to iclude the corresponding mbg file and
    you no need to alter the number_of_icons in LOCALISABLE_APP_INFO.

    Best of luck

    Cheers
    Peru

  3. #3
    Registered User tsippa's Avatar
    Join Date
    Oct 2006
    Posts
    37
    Thanks. How do I find out the id of the SVG though? I didn't create the SVG myself, so I have a bit of a problem finding it out.

  4. #4
    Registered User comp_freak's Avatar
    Join Date
    Nov 2006
    Location
    Bangalore
    Posts
    17
    Hi tsippa,

    If you are using a S60 3rd Ed and then the starting index would be
    16384
    (or)
    if you are usind 2nd ed then the starting index would be 0.

    Hope this helps you out

    Cheers
    Peru

  5. #5
    Registered User tsippa's Avatar
    Join Date
    Oct 2006
    Posts
    37
    Okies. Thanks.

Similar Threads

  1. transparent svg icons
    By TPMaKom in forum Symbian C++
    Replies: 7
    Last Post: 2009-06-01, 10:19
  2. Animated SVG icons?
    By jome0008 in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-03-06, 11:19
  3. SVG graphics for tab icons
    By TPMaKom in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2005-12-08, 08:11
  4. TinyLine SVG Minute Toolkit: Optimizing SVG for J2ME
    By girow in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-05-05, 18:44
  5. TinyLine SVG Minute Toolkit for J2ME: version 1.4 released
    By girow in forum Mobile Java General
    Replies: 0
    Last Post: 2003-05-05, 16:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved