Page 1 of 1

Anti-Aliasing causes lines in transparent series

Posted: Fri Aug 22, 2008 7:33 pm
by 10546565
8.02, D 2007

I added an anti-aslias tool to a chart with a transparent area series and the lines show up. Here is an image:

Image

If I remove the tool, the vertical lines (in the red/pink area) are not visible--and I do not want them to be visible.

Any way of removing the lines? I tried series.pen.visible := false and series.AreaLinesPen.Visible := false, but the lines are printed with an anti alias tool.

Thanks
Ed Dressel

Posted: Sat Aug 23, 2008 1:04 am
by 10546565
Here is a demo project for D2007 that reproduces the problem. Simply click on teh check box at the top to toggle the anti-aliasing tool.

http://www.TBInc.com/misc/AntiAliasing.zip

Posted: Mon Aug 25, 2008 10:51 am
by yeray
Hi Ed Dressel,

As you say, AreaSeries with transparency + Antialias seems do something strange. I've added it to the wish list to be fixed in future releases (TV52013340).

But as workaround you can hide the lines as follows:

Code: Select all

Series1.AreaLinesPen.Style := psClear;

Posted: Fri Oct 31, 2008 3:14 pm
by 10548334
9348257 wrote:Hi Ed Dressel,

As you say, AreaSeries with transparency + Antialias seems do something strange. I've added it to the wish list to be fixed in future releases (TV52013340).

But as workaround you can hide the lines as follows:

Code: Select all

Series1.AreaLinesPen.Style := psClear;
Hi Yeray,

I've run into the same problem too.

Unfortunately, when you set the style to psClear, it immediately turns off anti-aliasing. So it doesn't work very well as a workaround. You still can't have transparency + anti-aliasing at the same time without those area lines.


You may already know what needs fixing in the TeeChart code to to make it work, but it looks to me like it's something to do with the AreaSeries being made up of several different polygons - one for each section of the graph. If the sides of each of these get anti-aliased too, then the overlapping anti-aliased bits of each section could be causing the lines between them. If you set it to only anti-alias on the top edge, it might go away.

But then I'm sure you all know how TeeChart's graphs work better than I do...

Nick

Posted: Fri Oct 31, 2008 3:43 pm
by narcis
Hi Nick,

Thanks for the information. I've updated the bug list entry with your suggestions to be considered when the issue is reviewed. However, setting AreaLinesPen.Style to psClear works fine for me here using v8.04, it doesn't disable AntiAlias. Which TeeChart version are you using?

Posted: Fri Oct 31, 2008 3:48 pm
by 10548334
narcis wrote:Hi Nick,

Thanks for the information. I've updated the bug list entry with your suggestions to be considered when the issue is reviewed. However, setting AreaLinesPen.Style to psClear works fine for me here using v8.04, it doesn't disable AntiAlias. Which TeeChart version are you using?
Ah, I'm using 8.02. I'll update and give it a try. If it works, that'd be really useful.

Thanks,

Nick

Posted: Mon Nov 03, 2008 6:13 pm
by 10548334
Hi Yeray,

I've updated to v8.04 now but the same problem is still happening.

I've looked into it some more, and it seems that setting

Code: Select all

Series1.AreaLinesPen.Style := psClear;
doesn't actually disable anti-aliasing, but it does mean that the edges of AreaSeries are not smoothed. Try it with this (it's an adapted version of the demo project posted earlier):

http://www.b3ta.cr3ation.co.uk/data/zip ... alines.zip

I have put a LineSeries on there, as well as a couple of AreaSeries. The second checkbox switches AreaLinesPen.Style between psClear and psSolid (AreaLinesPen.Visible is always False). When we have psClear, the LineSeries is anti-aliased properly, but the AreaSeries still have a jagged outline. When we have psSolid, all the series are antialiased properly, but the AreaSeries have the ugly lines between sections.

Interestingly, if you change AreaLinesPen.Style to something else, like psDash, then only part of the edge is anti-aliased. It seems to only anti-alias where there is supposed to be a line (even though that line is not meant to be visible).

Posted: Tue Nov 04, 2008 10:12 am
by narcis
Hi Nick,

Thanks for the info and example. I found that what makes a difference here is setting area series pen to not visible:

Code: Select all

  Series1.Pen.Visible:=false;
Doing so makes antialias not to work. I've updated the info in the bug list too.