×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    How can I change viewbox attribute in svg image?

    Hello,
    How can I change the attribute viewbox in svg image? In Java there is a method setTrait("viewBox","0,0,200,200"); Is something similar in C++?

    Thank you.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How can I change viewbox attribute in svg image?

    You can not really access the source of .svg-s in Symbian C++, not even for reading.
    What do you want to achieve?

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: How can I change viewbox attribute in svg image?

    Quote Originally Posted by wizard_hu_ View Post
    You can not really access the source of .svg-s in Symbian C++, not even for reading.
    What do you want to achieve?
    I have such a background that is svgt with gradients and opacity. It has also rounded corners. The problem is that simple scaling of such image also scales corners - and I need to preserve the ratio of the corners. See the attachment.

    I can have several parts cut apart so that I can scale the rounded corners separately preserving the size ratio between height and width. Or I was thinking to move the viewbox over the image itself to choose only the part I want to scale. It's only idea but I have to somehow target the problem described in the attachment.

    Thank you Wizard for your interest.
    Attached Images Attached Images

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How can I change viewbox attribute in svg image?

    According to an older thread CImageDecoder may support .svg-s.

  5. #5
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    416

    Re: How can I change viewbox attribute in svg image?

    On this page there is a table with supported formats - svg(t) is not among them. There is a plug-in in SVGEngine.dll, but there is no public api afaik .

    I think I will have to stick with separated parts. After first load of the application I will render the vector graphics with AknIconUtils::CreateIconL into CFbsBitmaps, set sizes for the each component, compose the box and store it with CFbsBitmap::StoreL to avoid repeated rendering during each application's start.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How can I change viewbox attribute in svg image?

    I do not care about that table. Search for svg cimagedecoder, there will not be many hits. The table is part of the Symbian documentation, and I am not sure if SVG support comes from Symbian or not.

Similar Threads

  1. Change the image source for image label
    By nitroxxx123 in forum Symbian
    Replies: 3
    Last Post: 2009-04-05, 18:56
  2. N95 svg image in black frame
    By pka64pka in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2008-01-29, 13:34
  3. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  4. HELP: Mutable Image to Immutable Image?
    By rj_cybersilver in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-03-26, 09:58
  5. Change image in camera server emulator
    By jonawebb in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2003-09-05, 14:57

Posting Permissions

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