Page 1 of 1

Printing TRectangleTool in Windows 10 is misaligned

Posted: Tue Jun 26, 2018 2:28 pm
by 16583874
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

Re: Printing TRectangleTool in Windows 10 is misaligned

Posted: Thu Jun 28, 2018 8:37 am
by yeray
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 743 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);