mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 07:59:44 +02:00
Printers: Cocoa: fix reported paper dimensions (fix LazReport designer)
git-svn-id: trunk@62455 -
This commit is contained in:
parent
f38e21c5ae
commit
8aae6bd0f3
@ -144,7 +144,12 @@ var
|
||||
aInfo: NSPrintInfo;
|
||||
validationResult: Boolean;
|
||||
pmOr: PMOrientation;
|
||||
kx, ky: Double;
|
||||
begin
|
||||
|
||||
kx := XDPI/72;
|
||||
ky := YDPI/72;
|
||||
|
||||
aInfo := NSPrintInfo.sharedPrintInfo;
|
||||
if aInfo.orientation=NSPortraitOrientation then
|
||||
pmOr := kPMPortrait
|
||||
@ -188,13 +193,13 @@ begin
|
||||
|
||||
PaperRect.PhysicalRect.Left := 0;
|
||||
PaperRect.PhysicalRect.Top := 0;
|
||||
PaperRect.PhysicalRect.Right := Round(paperR.right - paperR.left);
|
||||
PaperRect.PhysicalRect.Bottom := Round(paperR.bottom - paperR.top);
|
||||
PaperRect.PhysicalRect.Right := Round((paperR.right - paperR.left)*kx);
|
||||
PaperRect.PhysicalRect.Bottom := Round((paperR.bottom - paperR.top)*ky);
|
||||
|
||||
PaperRect.WorkRect.Left := Round(-paperR.left);
|
||||
PaperRect.WorkRect.Top := Round(-paperR.top);
|
||||
PaperRect.WorkRect.Right := Round(pageR.right - pageR.left - paperR.left);
|
||||
PaperRect.WorkRect.Bottom := Round(pageR.bottom - pageR.top - paperR.top);
|
||||
PaperRect.WorkRect.Left := Round(-paperR.left*kx);
|
||||
PaperRect.WorkRect.Top := Round(-paperR.top*ky);
|
||||
PaperRect.WorkRect.Right := Round((pageR.right - pageR.left - paperR.left)*kx);
|
||||
PaperRect.WorkRect.Bottom := Round((pageR.bottom - pageR.top - paperR.top)*ky);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -70,7 +70,7 @@
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsStabs"/>
|
||||
<DebugInfoType Value="dsDwarf2"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
|
Loading…
Reference in New Issue
Block a user