scaled print

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Geosucher
Newbie
Newbie
Posts: 10
Joined: Tue Feb 05, 2008 12:00 am

scaled print

Post by Geosucher » Mon Oct 27, 2008 1:12 pm

I have to print a chart in a defined horizontal and vertical scale. My experiments have all a defference (for example if the horizontal axis should have a length of 30 centimeters I will get a length of 29 centimeters and for the vertical axis I should have a length of 21.5 centimeters I 'll get a length of 22 centimeters.

Here is a part of the code:

PrinterPixPerInchX:=GetDeviceCaps(Printer.Handle,LogPixelsX);
PrinterPixPerInchY:=GetDeviceCaps(Printer.Handle,LogPixelsY);
iWidth:= ...; {Length horizontal axis in pixel}
iHeight:=...; {Length vertical axis in pixel}
Chart1.Axes.Top.IAxisSize:=iWidth;
Chart1.Axes.Left.IAxisSize:=iHeight;
Chart1.MarginUnits:=muPixels;
iWidth:=iWidth+Chart1.MarginLeft+Chart1.MarginRight;
iHeight:=iHeight+Chart1.MarginTop+Chart1.MarginBottom;
PR.Left:=0;
PR.Top:=trunc((Printer.PageHeight-iHeight)/2);
PR.Right:=iWidth;
PR.Bottom:=PR.Top+iHeight;
Printer.Orientation:=poLandscape;
Printer.Title:=SEGY.Filename;
try
Printer.BeginDoc;
except
Printer.EndDoc;
end;
try
Chart1.PrintPartial(PR);
finally
Printer.EndDoc;
end;

Where is the problem? :roll:

Thanks for your effort!

Roland

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 30, 2008 11:41 am

Hi Roland,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply