Re: Antialiasing rendering of metafile images
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 02 Feb 2007 18:10:40 +0100
Antialiasing is a cheat. Pixel boundaries are calculated on a sub-pixel level and the pixels near to that boundary are set according to the weight of the colours tat coincide with the larger pixel.
A metafile is a set of drawing instructions that are effectively tokenised commands. If the tokens cannot express the antialiasing command or the metafile playback renderer cannot understand them then the graphics will be rendered at the best quality the tokens can express.
Metafiles have no antialiasing commands because this function is a state setting of the graphics renderer, not a drawing command that can be tokenised and stored.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
Liviu Balan wrote:
Since .Net 2.0 has more support for vector graphics (Metafiles) this can be put to use on a so called "resolution free" GUI. However a big problem appeared here. The rendered metafile object does not use antialiasing and as a result it looks pretty rough on the screen..
As a simple test one might want to draw a circle and draw beside a metafile that contains the same circle, both at the same size. They are both painted on the same DC with SmoothingMode property set to AntiAlias. As you have already guessed the DrawCircle method will provide a smooth result, while the metafile will have a very rough appearence. Probably the redering of the metafile ignores the antialiasing property of the device context it is painted on.
Any thoughts or advice on how to overcome this problem?
Thank you,
Liviu Balan
Systems Engineering
- Follow-Ups:
- Re: Antialiasing rendering of metafile images
- From: Liviu Balan
- Re: Antialiasing rendering of metafile images
- References:
- Antialiasing rendering of metafile images
- From: Liviu Balan
- Antialiasing rendering of metafile images
- Prev by Date: Re: Loading image byte array
- Next by Date: Re: Antialiasing rendering of metafile images
- Previous by thread: Antialiasing rendering of metafile images
- Next by thread: Re: Antialiasing rendering of metafile images
- Index(es):
Relevant Pages
|