Page 1 of 1

Need help scaling the chart on the printer

Posted: Thu Jan 20, 2005 9:59 am
by 4206059
[Borland Delphi 5.01, TChart 5.01, Win2K]

Hi there,

I need to be able to print a chart with true size tickmarks. This is needed for medical purposes, so the requirements are pretty solid. I have been searching for possible solutions and have come to a few, from which I like to know what the best one is, and how to accomplish that (after some trial and error attempts I was unsusccesful)

1. Give TChart a factor of the Printer resolution, so it can match the size of the chart to the printer, approaching the 10x10 mm per tick. I thought TChart.PrintResolution was a good guess, but I am not sure if it will actually schrink / enlarge the chart on the printer or just refine the detail ?

2. I am using ReportBuilder, so hook into some event before printing and rescale the chart at print time. I was unsuccesful in rescaling the TChart this way.

Is there a preferred approach or am I just missing the obvious here? Thanks for any suggestions...

- Jorgen

Posted: Fri Jan 28, 2005 1:51 am
by 9338026
Do TeeCreateMetafile to get the metafile.

Then, do printer.canvas.stretchDraw(teeMeta,coords)

Where coords are the calculated coordinates in the printer resolution.