LazReport, fix incorrect scaling of unstretched images on PDF export, PDF export addon now requires PowerPDF 0.9.10, issue #23326

git-svn-id: trunk@39284 -
This commit is contained in:
jesus 2012-11-15 21:33:01 +00:00
parent f0e99e4d12
commit 1bb2d62a3c
2 changed files with 11 additions and 8 deletions

View File

@ -23,7 +23,7 @@
</CompilerOptions>
<Description Value="PDF Exporter for PDF
"/>
<Version Minor="7"/>
<Version Minor="8"/>
<Files Count="2">
<Item1>
<Filename Value="lr_e_pdf.pas"/>
@ -45,7 +45,7 @@
</Item2>
<Item3>
<PackageName Value="pack_powerpdf"/>
<MinVersion Minor="9" Release="9" Valid="True"/>
<MinVersion Minor="9" Release="10" Valid="True"/>
</Item3>
<Item4>
<PackageName Value="lazreport"/>

View File

@ -338,12 +338,15 @@ begin
end;
end;
end
else
if (View.Flags and flPictCenter<>0) then begin
pw := trunc(View.Picture.Width * PDFEscX + 1.5);
ph := trunc(View.Picture.Height * PDFEscY + 1.5);
x := x + (w - pw) div 2 - 1;
y := y + (h - ph) div 2 - 1;
else begin
PRImage.ScaleX := PDFEscX;
PRImage.ScaleY := PDFEscY;
if (View.Flags and flPictCenter<>0) then begin
pw := trunc(View.Picture.Width * PDFEscX + 1.5);
ph := trunc(View.Picture.Height * PDFEscY + 1.5);
x := x + (w - pw) div 2 - 1;
y := y + (h - ph) div 2 - 1;
end;
end;
PRImage.Stretch := View.Stretched;