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:
jesus 2010-01-05 21:36:31 +00:00
parent 3b893a0a99
commit 2563355d3d

View File

@ -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;