SVG quality - can it be better?

Login to reply to this topic.
Tue, 2006-12-12 23:21
Joined: 2004-02-04
Forum posts: 26
Hello everyone,

I went through all documents that are mentioned on this forum 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):
Code:
_LIT(KIconsFile,  "\\resource\\apps\\myapp_aif.mif");

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

2. Then I set the size of image:
Code:
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:
Code:
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.

It is always nice to help out people that need help.
http://www.vegaitsourcing.rs
http://www.codeplex.com/aspnetlibrary

  • Login to reply to this topic.