LazReport, fix opaque background on rroundrect object print & pdf export

git-svn-id: trunk@34291 -
This commit is contained in:
jesus 2011-12-19 19:25:27 +00:00
parent a454e1415f
commit 45d2898b79
2 changed files with 21 additions and 3 deletions

View File

@ -385,6 +385,9 @@ begin
// draw roundrect // draw roundrect
Data.ShapeType := frstRoundRect; Data.ShapeType := frstRoundRect;
if View.FillColor=clNone then
Data.FillColor := clNone
else
Data.FillColor := ColorToRGB(View.FillColor); Data.FillColor := ColorToRGB(View.FillColor);
if View.Frames=[] then if View.Frames=[] then
Data.FrameColor := Data.FillColor Data.FrameColor := Data.FillColor

View File

@ -550,6 +550,7 @@ begin
Typ := gtAddIn; Typ := gtAddIn;
Frames := frAllFrames; Frames := frAllFrames;
BaseName := 'RoundRect'; BaseName := 'RoundRect';
//Default values //Default values
fCadre.SGradian:=False; fCadre.SGradian:=False;
fCadre.GradStyle:=gsHorizontal; fCadre.GradStyle:=gsHorizontal;
@ -566,7 +567,16 @@ end;
procedure TfrRoundRectView.Assign(From: TfrView); procedure TfrRoundRectView.Assign(From: TfrView);
begin begin
inherited Assign(From); inherited Assign(From);
fCadre := TfrRoundRectView(From).fCadre; if from is TfrRoundRectView then
fCadre := TfrRoundRectView(From).fCadre
else
begin
fCadre.wCurve:=10;
fCadre.sCurve:=true;
fCadre.SGradian:=false;
fCadre.wShadow:=0;
fCadre.Corners:=[ctTopLeft,ctBottomLeft,ctBottomRight,ctTopRight];
end;
end; end;
procedure TfrRoundRectView.LoadFromStream(Stream: TStream); procedure TfrRoundRectView.LoadFromStream(Stream: TStream);
@ -672,7 +682,10 @@ begin
// Trace l'ombre // Trace l'ombre
Pen.Style := psSolid; Pen.Style := psSolid;
Brush.Style := bsSolid; //bsClear if FillColor=clNone then
Brush.Style := bsClear
else
Brush.Style := bsSolid;
Pen.Color := fCadre.SdColor; Pen.Color := fCadre.SdColor;
Pen.Width := Round(FrameWidth); Pen.Width := Round(FrameWidth);
Brush.Color := fCadre.SdColor; Brush.Color := fCadre.SdColor;
@ -702,6 +715,8 @@ begin
end end
else else
Rectangle(x, y, x + dx + 1 - FSW, y + dy + 1 - FSW); Rectangle(x, y, x + dx + 1 - FSW, y + dy + 1 - FSW);
Brush.Style := bsSolid;
end; end;
end; end;