Anti-Aliasing causes lines in transparent series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Anti-Aliasing causes lines in transparent series

Post by TestAlways » Fri Aug 22, 2008 7:33 pm

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

TestAlways
Advanced
Posts: 228
Joined: Tue Aug 28, 2007 12:00 am
Location: Oregon, USA

Post by TestAlways » Sat Aug 23, 2008 1:04 am

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

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Aug 25, 2008 10:51 am

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;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Nick
Newbie
Newbie
Posts: 14
Joined: Wed Feb 13, 2008 12:00 am

Post by Nick » Fri Oct 31, 2008 3:14 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 31, 2008 3:43 pm

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?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Nick
Newbie
Newbie
Posts: 14
Joined: Wed Feb 13, 2008 12:00 am

Post by Nick » Fri Oct 31, 2008 3:48 pm

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

Nick
Newbie
Newbie
Posts: 14
Joined: Wed Feb 13, 2008 12:00 am

Post by Nick » Mon Nov 03, 2008 6:13 pm

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).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Nov 04, 2008 10:12 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply