Advertisement

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

SVG quality - can it be better?

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4
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.
 
Accepted Solution by eminemence:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by sasapopovic:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-45