You are not logged in.
Pages: 1
So, it means that TeeChart exports to EMF file with wrong format when GDI+ and 3D enabled in the settings?
I have tried to export with different settings and it worked!
Finally, I found the settings of TeeChart when the problem starts:
1. GDI+ shall be selected as a Render
2. 3D mode shall be enabled
3. Any series have to be on the chart.
When I changed the render to GDI or disable 3D mode, library works just fine.
Emf files are below:
1. GDI and 3D
3d_gdi.emf
2. GDI+ and 3D
3d_gdi+.emf
I downloaded the latest mORMot, but still the issue remains.
I've downloaded it from GitHub, version is 1.18, but there is not build number mentioined.
Metafile generated by TeeChart is not rendered correctly.
When I render it with bitmap, I get the following image:
But in pdf it is completely wrong:
This is my code:
var
PdfDoc: TPdfDocumentGDI;
PdfPage: TPdfPage;
ChartMetafile: TMetafile;
bmp: TBitmap;
begin
ChartMetafile := nil;
bmp := nil;
PdfDoc := TPdfDocumentGDI.Create(False, 0, true, nil);
try
PdfPage := PdfDoc.AddPage;
PdfPage.PageLandscape := true;
ChartMetafile := Chart.TeeCreateMetafile(False, Rect(0,0, PdfPage.PageWidth, PdfPage.PageHeight));
bmp := TBitmap.Create;
bmp.Width := ChartMetafile.Width;
bmp.Height := ChartMetafile.Height;
bmp.Canvas.Draw(0, 0, ChartMetafile);
bmp.SaveToFile('c:\temp\test.bmp');
PdfDoc.VCLCanvas.Draw(0, 0, ChartMetafile);
PdfDoc.SaveToFile('c:\temp\test.pdf');
finally
PdfDoc.Free;
ChartMetafile.Free;
end;
I tried it with RenderMetafile also, it gave the same result. What can be the problem?
Pages: 1