mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 06:09:29 +02:00
LCL, fix default values for paper dimensions in TPrinterCanvas which fix boundingbox problem in postscriptcanvas
git-svn-id: trunk@23387 -
This commit is contained in:
parent
3b893a0a99
commit
2563355d3d
@ -973,6 +973,9 @@ function TPrinterCanvas.GetPaperHeight: Integer;
|
||||
begin
|
||||
if Assigned(fPrinter) then
|
||||
result := fPrinter.PaperSize.Height
|
||||
else
|
||||
if fPaperHeight<=0 then
|
||||
result := round(YDPI * 842 / 72) // default to A4 paper
|
||||
else
|
||||
result := fPaperHeight;
|
||||
end;
|
||||
@ -981,6 +984,9 @@ function TPrinterCanvas.GetPaperWidth: Integer;
|
||||
begin
|
||||
if Assigned(fPrinter) then
|
||||
result := fPrinter.PaperSize.Width
|
||||
else
|
||||
if fPaperWidth<=0 then
|
||||
result := round(XDPI * 595 / 72) // default to A4 paper
|
||||
else
|
||||
result := fPaperWidth;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user