Advertisement

12.12.2006 at 02:25PM PST, ID: 22091169
[x]
Attachment Details

SVG quality - can it be better?

Asked by sasapopovic in EPOC / Symbian Programming

Tags: symbian, svg, mif

Hello everyone,

I went through all documents that are mentioned on Symbian forums and went through the source code of ScalableScreenDrawing example. I was able to write my own application which loads SVG image from mif file and draws that image on main pane of my application.
The thing is that image that I draw is not perfect and it should be because it is a vector image. I tried a lot of variations but didn't have any success. Then I thought that maybe it can not be shown better then it is in my application but I found SVG viewer on my E50 device and I saw that SVG looks perfect in that application.

Does anyone know if default Nokia 3rd edition SVG viewer application uses some anti aliasing algorithm to show smooth images or maybe I'm doing something wrong? If my approach for showing SVG images is correct, does anyone know how can I perform some anti aliasing to show my image with smooth edges?

Here is how I do this:

1. First load image from mif file (in ConstructL):
_LIT(KIconsFile,  "\\resource\\apps\\myapp_aif.mif");

iBitmap = AknIconUtils::CreateIconL(KIconsFile, EMbmMyAppLogo);

2. Then I set the size of image:
TPixelsTwipsAndRotation pixTwipsRot;
CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(pixTwipsRot);
TSize size = pixTwipsRot.iPixelSize;
   
AknIconUtils::SetSize(iBitmap, TSize(size.iWidth, size.iHeight));

3. And finally I draw the image:
CWindowGc& gc = SystemGc();
gc.Clear();

gc.BitBlt(TPoint(0, 0), iBitmap);

iBitmap is pointer to CFbsBitmap class. Should I maybe use some other class for SVG image loading and drawing?
Just not to be taken wrong, image that is drawn on screen looks good but not the same as it looks in built-in SVG viewer application and I have to make it to look as good as it looks in built-in SVG viewer.

I will appriciate any help. Thx in advance.Start Free Trial
[+][-]12.15.2006 at 05:19AM PST, ID: 18145745

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: EPOC / Symbian Programming
Tags: symbian, svg, mif
Sign Up Now!
Solution Provided By: eminemence
Participating Experts: 1
Solution Grade: C
 
 
[+][-]12.16.2006 at 04:31AM PST, ID: 18151367

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32