mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-08 23:45:54 +02:00
LazReport: powerpdf export support for images with alpha channel/transparency, requires powerpdf 0.9.6
git-svn-id: trunk@28585 -
This commit is contained in:
parent
073533b064
commit
a8bae47cc1
@ -5,7 +5,7 @@
|
||||
<Name Value="lazreportpdfexport"/>
|
||||
<Author Value="Jesus Reyes A."/>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
@ -13,6 +13,7 @@
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<CStyleOperator Value="False"/>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Other>
|
||||
@ -21,7 +22,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="PDF Exporter for PDF
|
||||
"/>
|
||||
<Version Minor="6"/>
|
||||
<Version Minor="7"/>
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="lr_e_pdf.pas"/>
|
||||
@ -43,7 +44,7 @@
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="pack_powerpdf"/>
|
||||
<MinVersion Minor="9" Release="4" Valid="True"/>
|
||||
<MinVersion Minor="9" Release="6" Valid="True"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="lazreport"/>
|
||||
@ -54,7 +55,7 @@
|
||||
</Item5>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)\"/>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
|
@ -129,7 +129,7 @@ var
|
||||
begin
|
||||
PRRect := TPRRect.Create(PRPanel);
|
||||
PRRect.Parent := PRPanel;
|
||||
PRRect.FillColor := View.FillColor;
|
||||
PRRect.FillColor := ColorToRGB(View.FillColor);
|
||||
PRRect.LineColor := clNone;
|
||||
PRRect.LineStyle := psSolid;
|
||||
PRRect.Left := x;
|
||||
@ -215,7 +215,6 @@ end;
|
||||
procedure TfrTNPDFExportFilter.ShowPicture(View: TfrPictureView; x, y, h,
|
||||
w: integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
PRImage: TPRImage;
|
||||
begin
|
||||
|
||||
@ -225,27 +224,15 @@ begin
|
||||
PRImage := TPRImage.Create(PRPanel);
|
||||
PRImage.Parent := PRPanel;
|
||||
PRImage.Stretch := True;
|
||||
PRImage.SharedImage := View.Shared;
|
||||
PRImage.SharedName := View.SharedName;
|
||||
PRImage.SharedImage := (View.SharedName<>'');
|
||||
|
||||
PRImage.Left := x;
|
||||
PRImage.Top := y;
|
||||
PRImage.Height := h;
|
||||
PRImage.Width := w;
|
||||
|
||||
if View.Picture.Graphic is TJpegImage then
|
||||
PRImage.Picture.Graphic := View.Picture.Graphic
|
||||
else
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
Bitmap.Height := View.Picture.Height;
|
||||
Bitmap.Width := View.Picture.Width;
|
||||
Bitmap.Canvas.Draw(0, 0, View.Picture.Graphic);
|
||||
PRImage.Picture.Bitmap := Bitmap;
|
||||
finally
|
||||
FreeAndNil(Bitmap);
|
||||
end;
|
||||
end;
|
||||
|
||||
PRImage.Picture.Graphic := View.Picture.Graphic;
|
||||
end;
|
||||
|
||||
procedure TfrTNPDFExportFilter.ShowShape(View: TfrShapeView; x, y, h, w: integer
|
||||
@ -316,8 +303,12 @@ begin
|
||||
ShowShape(TfrShapeView(View), nx, ny, ndy, ndx);
|
||||
|
||||
end else begin
|
||||
if (View.FillColor <> clNone) and not (View is TfrBarCodeView) then
|
||||
ShowBackGround(View, nx, ny, ndy, ndx);
|
||||
|
||||
if (View.FillColor <> clNone)
|
||||
and not (View is TfrBarCodeView)
|
||||
and not (View is TfrPictureView)
|
||||
then
|
||||
ShowBackGround(View, nx, ny, ndy, ndx);
|
||||
|
||||
if View is TfrBarCodeView then
|
||||
ShowBarCode(TfrBarCodeView(View), nx, ny, ndy, ndx)
|
||||
|
Loading…
Reference in New Issue
Block a user