Printing in CLX

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
NG
Newbie
Newbie
Posts: 9
Joined: Tue Aug 17, 2004 4:00 am

Printing in CLX

Post by NG » Thu Sep 23, 2004 2:11 pm

I am having a problem printing in CLX. This is just a real basic print. All I am doing is printing my chart to the top half of a page.

Printer.BeginDoc; { <-- start printer job }
try
arect.Left := 10;
arect.Right := Printer.PageWidth - 10;
arect.Top := 10;
arect.Bottom := (Printer.PageHeight - 10) div 2;
Chart1.PrintPartial(aRect);
finally
Printer.EndDoc; { <-- end job and print !! }
end;

What I get is a small picture at the top left corner of the screen (everything is jumbled together).

If I use this same code in VCL I get the picture correctly.

Any suggestions?

Thanks

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Fri Sep 24, 2004 10:44 am

Hi.

Have you checked if Printer.PageWidth and Printer.PageHeight return the same values as in VCL version ? What happens if you set arect.Right and arect.Bottom to some specific lavel (like 3000, 2000) ?
Marjan Slatinek,
http://www.steema.com

NG
Newbie
Newbie
Posts: 9
Joined: Tue Aug 17, 2004 4:00 am

Post by NG » Mon Sep 27, 2004 1:20 pm

I checked the Printer.PageWidth and Printer.PageHeight in both CLX and VCL.
CLX version - PageWidth = 5100 PageHeight = 6600
VCL version - PageWidth = 4800 PageHeight = 6400

Not much different.

I also tried setting arect.Width to 2000 and arect.Height to 3000 with no effect. I did notice something interesting as I have been trying to make this work - When I set the PrintResolution := -300 I get a larger picture with font staying the same( the higher the negative number the larger the picture). If I set the PrintResolution := 100 I get a smaller picture but font stays the same.

I forgot to mention before that I am using Delphi 7 with TeeChart Pro 7.

Thanks again for your help.

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu Oct 07, 2004 11:09 am

Hi.

It appears the problem is in TeeProcs.pas unit, more precisely in the PrintPartialCanvas method implementation. With all those $IFDEF CLX conditional defines the scale factor is not set if application is running on CLX platform. I'll investigate this a bit closer and also log it to our bug list.
Marjan Slatinek,
http://www.steema.com

Post Reply