You Are Here:

Community: Wiki

This page was last modified on 23 October 2008, at 15:33.

KIS000398 - SVG rendering problems caused by missing viewBox attribute

From Forum Nokia Wiki



ID KIS000398 Creation date August 7, 2006
Platform S60 3rd Edition, S60 3rd Edition FP1 Devices
Category Subcategory


Keywords (APIs, classes, methods, functions):

Overview

SVG-T graphics files that are missing a ’viewBox’ attribute in their header fail to render correctly on S60 3rd Edition devices.

Description

SVG-T graphics files that are missing a ’viewBox’ attribute in their header fail to render correctly on S60 3rd Edition devices. Specifically, trying to scale the SVG image (AknIconUtils::SetSize()) does not produce correct results.
SVG-T implementation on S60 2nd Edition, FP3 does not require the ’viewBox’ attribute to be specified.

Solution

In addition to ’width’ and ’height’ attributes, also ’viewBox’ must be specified in the ’svg’ element of the SVG file header.
For example,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" width="64px" height="64px">
...
--> should be:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" width="64px" height="64px" viewBox="0 0 64 64">
...

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
User Rating: qfnZuserE5FratingQNx4E2E0000X