LazReport: support for mixed roundrect in pdf export filter, requires powerpdf 0.9.7, fix roundrect exported size was one unit less

git-svn-id: trunk@33980 -
This commit is contained in:
jesus 2011-12-05 19:19:59 +00:00
parent e575799076
commit 949ffedc46
2 changed files with 9 additions and 5 deletions

View File

@ -1,11 +1,12 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="3">
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="lazreportpdfexport"/>
<AddToProjectUsesSection Value="True"/>
<Author Value="Jesus Reyes A."/>
<CompilerOptions>
<Version Value="9"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
@ -44,7 +45,7 @@
</Item2>
<Item3>
<PackageName Value="pack_powerpdf"/>
<MinVersion Minor="9" Release="6" Valid="True"/>
<MinVersion Minor="9" Valid="True" Release="7"/>
</Item3>
<Item4>
<PackageName Value="lazreport"/>

View File

@ -31,6 +31,7 @@ type
FrameWidth: Double;
FrameColor: TColor;
Radius: Single;
Corners: TCornerSet;
end;
TfrTNPDFExport = class(TComponent) // fake component
@ -105,6 +106,7 @@ begin
frstRoundRect:
with TPRRect(CreateShape(TPRRect)) do begin
Radius := Data.Radius;
SquaredCorners := TPdfCorners(Data.Corners);
end;
frstTriangle:
@ -364,11 +366,12 @@ begin
else
begin
SWidth := Round((View.RoundRectCurve/2) * PDFEscx + 1);
SWidth := Round((View.RoundRectCurve/2) * PDFEscx);
if View.RoundRect then
Data.Radius := SWidth
else
Data.Radius := 0.0;
Data.Corners:=View.SquaredCorners;
// draw shadow
Data.ShapeType := frstRoundRect;
@ -376,7 +379,7 @@ begin
Data.FrameColor := Data.FillColor; //ColorToRGB(View.FrameColor);
Data.FrameWidth := 0;
Data.FrameStyle := frsSolid;
SWidth := Round(View.ShadowWidth * PDFEscx + 1);
SWidth := Round(View.ShadowWidth * PDFEscx);
if View.ShadowWidth>0 then
AddShape(Data, x + SWidth, y + SWidth, h - SWidth, w - SWidth);