Page 1 of 1
Strange error with TeeCreateMetafile
Posted: Thu Oct 20, 2016 9:08 am
by 16578522
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
Re: Strange error with TeeCreateMetafile
Posted: Thu Oct 20, 2016 9:11 am
by 16578522
... I am very sorry, could not upload .wmf files so I included them in the attached .zip
Re: Strange error with TeeCreateMetafile
Posted: Thu Oct 20, 2016 11:22 am
by yeray
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 (31.32 KiB) Viewed 12872 times
We'd need a simple application we can run as-is to reproduce the problem here.
Re: Strange error with TeeCreateMetafile
Posted: Thu Oct 20, 2016 12:20 pm
by 16578522
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
Re: Strange error with TeeCreateMetafile
Posted: Fri Oct 21, 2016 7:34 am
by yeray
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.
Re: Strange error with TeeCreateMetafile
Posted: Fri Oct 21, 2016 12:23 pm
by 16578522
So, is there any debug information I can retrieve and save from my clients PC in order to help identify this?
Re: Strange error with TeeCreateMetafile
Posted: Fri Oct 21, 2016 1:48 pm
by yeray
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;