How to draw the chart to a metafile.
This example uses the PaintTo method to draw the chart to a metafile canvas.
var emf: TMetaFile; emfcvs: TMetafileCanvas; begin emf := TMetafile.Create(); try emf.Enhanced := true; emf.Width := RAC.ClientWidth; emf.Height := RAC.ClientHeight; emf.MMWidth := 0; emf.MMHeight := 0; emfcvs := TMetafileCanvas.Create(emf, 0); try RAC.PaintTo(emfcvs, RAC.ClientRect, RAC.FirstDisplayedIndex); finally emfcvs.Free; end; emf.SaveToFile('RAC.emf'); finally emf.Free; end; end;
Copyright © 2000-2010 Simon Armstrong. All Rights Reserved.


