TAChart: Fix incorrect conversion of TColor to TFPColor in the SVG and FPVectorial drawers.

git-svn-id: trunk@48180 -
This commit is contained in:
wp 2015-03-09 18:04:40 +00:00
parent 3c41fbda03
commit c11e9325b6
2 changed files with 12 additions and 3 deletions

View File

@ -273,7 +273,10 @@ end;
procedure TFPVectorialDrawer.SetBrush(ABrush: TFPCustomBrush);
begin
FBrushColor := ABrush.FPColor;
if ABrush is TBrush then
SetBrushColor(TBrush(ABrush).Color)
else
FBrushColor := ABrush.FPColor;
FBrushStyle := ABrush.Style;
end;
@ -306,7 +309,10 @@ end;
procedure TFPVectorialDrawer.SetPen(APen: TFPCustomPen);
begin
FPenColor := APen.FPColor;
if APen is TPen then
FPenColor := FChartColorToFPColorFunc(TPen(APen).Color)
else
FPenColor := APen.FPColor;
FPenStyle := APen.Style;
FPenWidth := APen.Width;
end;

View File

@ -425,7 +425,10 @@ end;
procedure TSVGDrawer.SetPen(APen: TFPCustomPen);
begin
FPen.FPColor := FPColorOrMono(APen.FPColor);
if APen is TPen then
FPen.FPColor := FChartColorToFPColorFunc(ColorOrMono(TPen(APen).Color))
else
FPen.FPColor := FPColorOrMono(APen.FPColor);
FPen.Style := APen.Style;
FPen.Width := APen.Width;
end;