OpenGL has built-in capabilities to antialias lines and points, and Xceed Chart for WinForms takes advantage of this. By default the chart will always antialias lines and points, greatly improving the quality of the generated chart, because the user will not see jagged lines. The following images show the effect of antialiasing:
Antialiasing is Off | Antialiasing is On |
Sometimes however you may wish to disable this feature, for various reasons:
-
Antialiasing slows down the rendering speed (although not much), which may be undesirable, especially when you're building high-performance or real-time charting applications.
-
You may wish to disable antialiasing when you use jittering because there is no point in using two antialiasing effects together.
The EnableAntialiasing property of the Settings object controls whether the control should use antialiasing or not. The following line of code turns off antialiasing:
VB.NET | |
---|---|
chartControl1.Settings.EnableAntialiasing = False |
C# | |
---|---|
chartControl1.Settings.EnableAntialiasing = false; |
When antialiasing is enabled and the 3D scene contains semi-transparent objects, you may consider using the double-pass blending feature of the component. In some cases it can improve the quality of the blended objects, especially when they overlap antialiased borders. When the feature is enabled, the intensity of the overlapped lines is influenced by the color of the overlapping semi-transparent polygons. The following code enables double-pass blending:
VB.NET | |
---|---|
chartControl1.Settings.DoublePassBlending = True |
C# | |
---|---|
chartControl1.Settings.DoublePassBlending = true; |
In general double-pass blending decreases performance, especially when there are many blended objects in the 3D scene.
Related Examples
Windows Forms: Special Visual Effects\Antialiasing