A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Antialiasing / SmoothingLearn how to apply antialiasing on shapes using GDI+. Uses SmoothingMode and PixelOffsetMode enumerations. |
On Wednesday, May 26th 2004 at 11:11 AM By Andrew Pociu (View Profile) ![]() ![]() ![]() ![]() (Rated 4.2 with 43 votes) |
||
|
Antialiasing = smoothing line edges in computer images: smoothing the jagged edges of diagonal lines in computer-generated images by varying the color or shades of gray at the edges
SmoothingModeThe SmoothingMode property creates the antialiasing that makes the graphic object render smoothly. You can choose from the following enumerations: Default: Specifies the default mode. AntiAlias: Specifies antialiased rendering. HighQuality: Specifies high quality, low speed rendering. HighSpeed: Specifies high speed, low quality rendering. Invalid: Specifies an invalid mode. None: Specifies no antialiasing. HighQuality is actually the same as AntiAlias and HighSpeed is the same as None. In the example code we used SmoothingMode.None and SmoothingMode.AntiAlias to demonstrate. PixelOffsetModePixelOffsetMode, also known as an antialiasing enhancement tries to make the shapes a bit more smooth. As its name implies, PixelOffsetMode offsets pixels to improve the quality. Perhaps the easiest way to understand what PixelOffsetMode does is to analyze the screenshot of the code we have created in this tutorial. In the following screenshot, the first circle (top, left) is created without antialias (SmoothingMode.None), the second (top, right) is created using antialiasing (SmoothingMode.AntiAlias) and the third (lower, left) is created with PixelOffsetMode set to HighQuality (PixelOffsetMode.HighQuality). ![]() You can easily see the difference between the circle created only with SmoothingMode.AntiAlias and the circle created with PixelOffsetMode.HighQuality. The coordinates are decreased by the size of half a pixel. Overall the image created with SmoothingMode.AntiAlias and PixelOffsetMode.HighQuality is a bit better than the one created only with SmoothingMode.AntiAlias, of course with the cost of performance. PixelOffsetMode has the following possible enumerations: Default: Specifies the default mode. Half: Specifies that pixels are offset by -.5 units, both horizontally and vertically, for high speed antialiasing. HighQuality: Specifies high quality, low speed rendering. HighSpeed: Specifies high speed, low quality rendering. Invalid: Specifies an invalid mode. None: Specifies no pixel offset. |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current Commentsfirst post!
Thanks for the tips! I'm going to use it to make some antialiased graphs.
Cheers
Thanks:)
Excellent, much more better explanation than MSDN.
urgreat !!!
Excellent
Thank you!
asdasdasd
fucking information!!!! please improve your standard..
Related Tutorials
Related Source Code
C# Job Search