Printers: Cocoa: fix reported paper dimensions (fix LazReport designer)

git-svn-id: trunk@62455 -
This commit is contained in:
jesus 2019-12-29 19:13:34 +00:00
parent f38e21c5ae
commit 8aae6bd0f3
2 changed files with 12 additions and 7 deletions

View File

@ -144,7 +144,12 @@ var
aInfo: NSPrintInfo; aInfo: NSPrintInfo;
validationResult: Boolean; validationResult: Boolean;
pmOr: PMOrientation; pmOr: PMOrientation;
kx, ky: Double;
begin begin
kx := XDPI/72;
ky := YDPI/72;
aInfo := NSPrintInfo.sharedPrintInfo; aInfo := NSPrintInfo.sharedPrintInfo;
if aInfo.orientation=NSPortraitOrientation then if aInfo.orientation=NSPortraitOrientation then
pmOr := kPMPortrait pmOr := kPMPortrait
@ -188,13 +193,13 @@ begin
PaperRect.PhysicalRect.Left := 0; PaperRect.PhysicalRect.Left := 0;
PaperRect.PhysicalRect.Top := 0; PaperRect.PhysicalRect.Top := 0;
PaperRect.PhysicalRect.Right := Round(paperR.right - paperR.left); PaperRect.PhysicalRect.Right := Round((paperR.right - paperR.left)*kx);
PaperRect.PhysicalRect.Bottom := Round(paperR.bottom - paperR.top); PaperRect.PhysicalRect.Bottom := Round((paperR.bottom - paperR.top)*ky);
PaperRect.WorkRect.Left := Round(-paperR.left); PaperRect.WorkRect.Left := Round(-paperR.left*kx);
PaperRect.WorkRect.Top := Round(-paperR.top); PaperRect.WorkRect.Top := Round(-paperR.top*ky);
PaperRect.WorkRect.Right := Round(pageR.right - pageR.left - paperR.left); PaperRect.WorkRect.Right := Round((pageR.right - pageR.left - paperR.left)*kx);
PaperRect.WorkRect.Bottom := Round(pageR.bottom - pageR.top - paperR.top); PaperRect.WorkRect.Bottom := Round((pageR.bottom - pageR.top - paperR.top)*ky);
end; end;
end; end;

View File

@ -70,7 +70,7 @@
</CodeGeneration> </CodeGeneration>
<Linking> <Linking>
<Debugging> <Debugging>
<DebugInfoType Value="dsStabs"/> <DebugInfoType Value="dsDwarf2"/>
</Debugging> </Debugging>
<Options> <Options>
<Win32> <Win32>