Printing TRectangleTool in Windows 10 is misaligned

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Tom
Newbie
Newbie
Posts: 2
Joined: Thu Jun 21, 2018 12:00 am

Printing TRectangleTool in Windows 10 is misaligned

Post by Tom » Tue Jun 26, 2018 2:28 pm

I'm using TeeChart Pro 2018 in C++ Builder XE5.
On the chart a TRectangle tool is placed below the legend, which is aligned to the right of the chart. It's position is set as follows:

Code: Select all

RectangleToolDates->Left = Chart1->Legend->RectLegend.Left;
This works fine within the application, and within the print preview, but since the most recent Windows 10 update it appears misaligned when the chart is printed. I've tried printing to the Microsoft PDF writer and also to actual printers and the result is the same. See the attached screenshots and printed PDF to view the problem.

The print code is straightforward:

Code: Select all

TRect PrintMarginsRect;
PrintMarginsRect.Top = 5;
PrintMarginsRect.Left = 5;
PrintMarginsRect.Bottom = 5;
PrintMarginsRect.Right = 5;

if(PrinterSetupDialog1->Execute()){
	Chart1->PrintProportional = false;
	Chart1->PrintMargins = PrintMarginsRect;
	TeePreview(this, Chart1);
	Chart1->Print();
}
Can you think why this might be?

Thanks

Tom
Attachments
Print Problem.zip
(198.17 KiB) Downloaded 727 times

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Printing TRectangleTool in Windows 10 is misaligned

Post by Yeray » Thu Jun 28, 2018 8:37 am

Hello Tom,

I've tried to reproduce the problem with a simple example project but it seems to work fine for me here running Windows 10, version 1803, Build 17134.112.
I've tested it with Delphi, in RAD XE and TeeChart v2018.24.
testPrintRectTool.zip
(89.71 KiB) Downloaded 817 times
Could you please check if the attached project works fine for you?
Note there are three options to print (two of them commented out):

Code: Select all

     TeePreview(Self, Chart1);
     //Chart1.Print;
     //ChartPreview(Self, Chart1);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply