Page 1 of 1

Blurred 3D chart - GDI+ and 3D series

Posted: Thu Jun 20, 2013 1:22 pm
by 16563198
Dear all,

I've got a little problem with 3D charts and GDI+:

I use a TChart in 3D mode - a few Point3D series and 3-5 surface series.
If I turn on the GDI+ mode TTeeGDIPlus.Active and .Antialias the charts start blurring when it is moved by TRotateTool. (see the pictures attached)

If I click on the graph without moving - the blur reduces by each click. After more or less 10 clicks, the blur effect ist completely gone.

Any ideas on how to solve this ?
Delphi 7 - latest TChart 2013 Version

Thanks for any help in advance.

Re: Blurred 3D chart - GDI+ and 3D series

Posted: Thu Jun 20, 2013 1:33 pm
by narcis
Hi StatusPro,

Could you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Re: Blurred 3D chart - GDI+ and 3D series

Posted: Thu Jun 20, 2013 3:57 pm
by 16563198
Dear Narcis,

hope that simple example helps.
I had no time to add the "normal" Data amount. All the taper lines and multiple rings of data in 3D view.

With these it even blurrs more.

The demo does blur for me, too,
Best regards
Christian

Re: Blurred 3D chart - GDI+ and 3D series

Posted: Fri Jun 21, 2013 9:23 am
by narcis
Dear Christian,

Thanks for the example project.

I started stripping it to the basics and finally found the problem is with TSurfaceSeries transparency. Disabling it in your project makes blur disappear:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  for i:=0 to ChartP.SeriesCount - 1 do
  begin
    if ChartP[i] is TSurfaceSeries then
      (ChartP[i] as TSurfaceSeries).Transparency:=0;
  end;
end;
Then I found the minimal amount of code to reproduce the problem:

Code: Select all

uses TeeSurfa, TeeTools, TeeGDIPlus;

procedure TForm1.FormCreate(Sender: TObject);
var Series1: TSurfaceSeries;
begin
  Series1:=TSurfaceSeries.Create(Self);
  Series1.FillSampleValues();
  Series1.Transparency:=50;

  Chart1.AddSeries(Series1);
  Chart1.Canvas:=TGDIPlusCanvas.Create;

  Chart1.Tools.Add(TRotateTool.Create(Self));
end;
So I have added the issue (TV52016611) to the bug list to be fixed for future releases.

Re: Blurred 3D chart - GDI+ and 3D series

Posted: Fri Jun 21, 2013 9:38 am
by 16563198
Thanks for the help Narcis.
Unfortunately I need the transparency enabled for the surface series.

I found a short workaround for that problem - but this is taking much CPU time on small UMPCs.

I use the "OnRotate" event of the RotateTool and set TeeGDIPlus.Active to "False" and directly after to "True" again.
This way blurring stops.

Please let me know, when the problem is finally gone.

Best regards
Christian

Re: Blurred 3D chart - GDI+ and 3D series

Posted: Fri Jun 21, 2013 10:11 am
by narcis
Hi Christian,
I found a short workaround for that problem - but this is taking much CPU time on small UMPCs.

I use the "OnRotate" event of the RotateTool and set TeeGDIPlus.Active to "False" and directly after to "True" again.
This way blurring stops.
Nice, thanks for sharing.
Please let me know, when the problem is finally gone.
Please be aware at Steema Software communication channels for new release announcements and what's fixed on them.

Thanks in advance.