Strange error with TeeCreateMetafile

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Newbie
Newbie
Posts: 16
Joined: Mon Jun 20, 2016 12:00 am

Strange error with TeeCreateMetafile

Post by johnnix » Thu Oct 20, 2016 9:08 am

Hello,

I am using TeeChart 2015.16 version and I am having a rare issue with the TeeCreateMetafile function. Attached you can find 2 wmf files created with the TeeCreateMetafile function in 2 different computers. Although the metafile canvas dimensions are different in the "bad" file you can see that the plot is not stretched.

I have 2 users reporting this and they both use a laptop computer, no client of mine reported this when running my application from a desktop. I cannot guess what could be wrong as I cannot reproduce the error here. Any hints on how this can be fixed?

Thank you very much for your time

johnnix
Newbie
Newbie
Posts: 16
Joined: Mon Jun 20, 2016 12:00 am

Re: Strange error with TeeCreateMetafile

Post by johnnix » Thu Oct 20, 2016 9:11 am

... I am very sorry, could not upload .wmf files so I included them in the attached .zip
Attachments
Test.zip
(29.23 KiB) Downloaded 663 times

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

Re: Strange error with TeeCreateMetafile

Post by Yeray » Thu Oct 20, 2016 11:22 am

Hello,

I've tried to reproduce the problem with the following example:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var tmpMetaFile: TMetafile;
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  with Chart1.AddSeries(THorizLineSeries) as THorizLineSeries do
  begin
    Pen.Width:=2;
    FillSampleValues();
  end;

  tmpMetaFile:=Chart1.TeeCreateMetafile(True, Chart1.ClientRect);
  Image1.Picture.Graphic:=tmpMetaFile;
end;
But it seems to work as expected for me here both with TeeChart v2015.16 and the current release v2016.18:
Project3_2016-10-20_13-22-07.png
Project3_2016-10-20_13-22-07.png (31.32 KiB) Viewed 11486 times
We'd need a simple application we can run as-is to reproduce the problem here.
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

johnnix
Newbie
Newbie
Posts: 16
Joined: Mon Jun 20, 2016 12:00 am

Re: Strange error with TeeCreateMetafile

Post by johnnix » Thu Oct 20, 2016 12:20 pm

Hello,

Unfortunately I cannot reproduce the error here also dp creating a sample application will not work, as I mentioned it happens to 2 of my clients only but I do not know what to do to get some ore information on how to trace it

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

Re: Strange error with TeeCreateMetafile

Post by Yeray » Fri Oct 21, 2016 7:34 am

Hello,

I understand it but, as you will understand, we can't fix a bug we can't unequivocally identify. And to do that we need to reproduce it here. That's why we use to ask for simple applications we can run as-is to reproduce the problems.
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

johnnix
Newbie
Newbie
Posts: 16
Joined: Mon Jun 20, 2016 12:00 am

Re: Strange error with TeeCreateMetafile

Post by johnnix » Fri Oct 21, 2016 12:23 pm

So, is there any debug information I can retrieve and save from my clients PC in order to help identify this?

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

Re: Strange error with TeeCreateMetafile

Post by Yeray » Fri Oct 21, 2016 1:48 pm

Hello,

Maybe your customers could export their charts to a .tee file (in Text Format if possible):

Code: Select all

SaveChartToFile(Chart1, 'C:\tmp\exportedChart.tee', True, True);
Then we could try to reproduce the problem here with a code similar to this:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var tmpMetaFile: TMetafile;
begin
  LoadChartFromFile(Chart1, 'C:\tmp\exportedChart.tee');

  tmpMetaFile:=Chart1.TeeCreateMetafile(True, Chart1.ClientRect);
  Image1.Picture.Graphic:=tmpMetaFile;
end;
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

Post Reply