mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-12 17:56:05 +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"/>
|
<Name Value="lazreportpdfexport"/>
|
||||||
<Author Value="Jesus Reyes A."/>
|
<Author Value="Jesus Reyes A."/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="8"/>
|
<Version Value="9"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
@ -13,6 +13,7 @@
|
|||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
||||||
<CStyleOperator Value="False"/>
|
<CStyleOperator Value="False"/>
|
||||||
|
<UseAnsiStrings Value="False"/>
|
||||||
</SyntaxOptions>
|
</SyntaxOptions>
|
||||||
</Parsing>
|
</Parsing>
|
||||||
<Other>
|
<Other>
|
||||||
@ -21,7 +22,7 @@
|
|||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="PDF Exporter for PDF
|
<Description Value="PDF Exporter for PDF
|
||||||
"/>
|
"/>
|
||||||
<Version Minor="6"/>
|
<Version Minor="7"/>
|
||||||
<Files Count="2">
|
<Files Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="lr_e_pdf.pas"/>
|
<Filename Value="lr_e_pdf.pas"/>
|
||||||
@ -43,7 +44,7 @@
|
|||||||
</Item2>
|
</Item2>
|
||||||
<Item3>
|
<Item3>
|
||||||
<PackageName Value="pack_powerpdf"/>
|
<PackageName Value="pack_powerpdf"/>
|
||||||
<MinVersion Minor="9" Release="4" Valid="True"/>
|
<MinVersion Minor="9" Release="6" Valid="True"/>
|
||||||
</Item3>
|
</Item3>
|
||||||
<Item4>
|
<Item4>
|
||||||
<PackageName Value="lazreport"/>
|
<PackageName Value="lazreport"/>
|
||||||
@ -54,7 +55,7 @@
|
|||||||
</Item5>
|
</Item5>
|
||||||
</RequiredPkgs>
|
</RequiredPkgs>
|
||||||
<UsageOptions>
|
<UsageOptions>
|
||||||
<UnitPath Value="$(PkgOutDir)\"/>
|
<UnitPath Value="$(PkgOutDir)"/>
|
||||||
</UsageOptions>
|
</UsageOptions>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
|
@ -129,7 +129,7 @@ var
|
|||||||
begin
|
begin
|
||||||
PRRect := TPRRect.Create(PRPanel);
|
PRRect := TPRRect.Create(PRPanel);
|
||||||
PRRect.Parent := PRPanel;
|
PRRect.Parent := PRPanel;
|
||||||
PRRect.FillColor := View.FillColor;
|
PRRect.FillColor := ColorToRGB(View.FillColor);
|
||||||
PRRect.LineColor := clNone;
|
PRRect.LineColor := clNone;
|
||||||
PRRect.LineStyle := psSolid;
|
PRRect.LineStyle := psSolid;
|
||||||
PRRect.Left := x;
|
PRRect.Left := x;
|
||||||
@ -215,7 +215,6 @@ end;
|
|||||||
procedure TfrTNPDFExportFilter.ShowPicture(View: TfrPictureView; x, y, h,
|
procedure TfrTNPDFExportFilter.ShowPicture(View: TfrPictureView; x, y, h,
|
||||||
w: integer);
|
w: integer);
|
||||||
var
|
var
|
||||||
Bitmap: TBitmap;
|
|
||||||
PRImage: TPRImage;
|
PRImage: TPRImage;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
@ -225,27 +224,15 @@ begin
|
|||||||
PRImage := TPRImage.Create(PRPanel);
|
PRImage := TPRImage.Create(PRPanel);
|
||||||
PRImage.Parent := PRPanel;
|
PRImage.Parent := PRPanel;
|
||||||
PRImage.Stretch := True;
|
PRImage.Stretch := True;
|
||||||
PRImage.SharedImage := View.Shared;
|
PRImage.SharedName := View.SharedName;
|
||||||
|
PRImage.SharedImage := (View.SharedName<>'');
|
||||||
|
|
||||||
PRImage.Left := x;
|
PRImage.Left := x;
|
||||||
PRImage.Top := y;
|
PRImage.Top := y;
|
||||||
PRImage.Height := h;
|
PRImage.Height := h;
|
||||||
PRImage.Width := w;
|
PRImage.Width := w;
|
||||||
|
|
||||||
if View.Picture.Graphic is TJpegImage then
|
PRImage.Picture.Graphic := View.Picture.Graphic;
|
||||||
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;
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrTNPDFExportFilter.ShowShape(View: TfrShapeView; x, y, h, w: integer
|
procedure TfrTNPDFExportFilter.ShowShape(View: TfrShapeView; x, y, h, w: integer
|
||||||
@ -316,7 +303,11 @@ begin
|
|||||||
ShowShape(TfrShapeView(View), nx, ny, ndy, ndx);
|
ShowShape(TfrShapeView(View), nx, ny, ndy, ndx);
|
||||||
|
|
||||||
end else begin
|
end else begin
|
||||||
if (View.FillColor <> clNone) and not (View is TfrBarCodeView) then
|
|
||||||
|
if (View.FillColor <> clNone)
|
||||||
|
and not (View is TfrBarCodeView)
|
||||||
|
and not (View is TfrPictureView)
|
||||||
|
then
|
||||||
ShowBackGround(View, nx, ny, ndy, ndx);
|
ShowBackGround(View, nx, ny, ndy, ndx);
|
||||||
|
|
||||||
if View is TfrBarCodeView then
|
if View is TfrBarCodeView then
|
||||||
|
Loading…
Reference in New Issue
Block a user