Need help scaling the chart on the printer

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jorg B
Newbie
Newbie
Posts: 6
Joined: Thu Mar 01, 2001 5:00 am
Location: Netherlands

Need help scaling the chart on the printer

Post by Jorg B » Thu Jan 20, 2005 9:59 am

[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

David Novo
Newbie
Newbie
Posts: 71
Joined: Fri Jul 02, 2004 4:00 am
Location: Culver City
Contact:

Post by David Novo » Fri Jan 28, 2005 1:51 am

Do TeeCreateMetafile to get the metafile.

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

Where coords are the calculated coordinates in the printer resolution.

Post Reply