mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 20:37:19 +01:00
TAChart: Fix incorrect conversion of TColor to TFPColor in the SVG and FPVectorial drawers.
git-svn-id: trunk@48180 -
This commit is contained in:
parent
3c41fbda03
commit
c11e9325b6
@ -273,7 +273,10 @@ end;
|
|||||||
|
|
||||||
procedure TFPVectorialDrawer.SetBrush(ABrush: TFPCustomBrush);
|
procedure TFPVectorialDrawer.SetBrush(ABrush: TFPCustomBrush);
|
||||||
begin
|
begin
|
||||||
FBrushColor := ABrush.FPColor;
|
if ABrush is TBrush then
|
||||||
|
SetBrushColor(TBrush(ABrush).Color)
|
||||||
|
else
|
||||||
|
FBrushColor := ABrush.FPColor;
|
||||||
FBrushStyle := ABrush.Style;
|
FBrushStyle := ABrush.Style;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -306,7 +309,10 @@ end;
|
|||||||
|
|
||||||
procedure TFPVectorialDrawer.SetPen(APen: TFPCustomPen);
|
procedure TFPVectorialDrawer.SetPen(APen: TFPCustomPen);
|
||||||
begin
|
begin
|
||||||
FPenColor := APen.FPColor;
|
if APen is TPen then
|
||||||
|
FPenColor := FChartColorToFPColorFunc(TPen(APen).Color)
|
||||||
|
else
|
||||||
|
FPenColor := APen.FPColor;
|
||||||
FPenStyle := APen.Style;
|
FPenStyle := APen.Style;
|
||||||
FPenWidth := APen.Width;
|
FPenWidth := APen.Width;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -425,7 +425,10 @@ end;
|
|||||||
|
|
||||||
procedure TSVGDrawer.SetPen(APen: TFPCustomPen);
|
procedure TSVGDrawer.SetPen(APen: TFPCustomPen);
|
||||||
begin
|
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.Style := APen.Style;
|
||||||
FPen.Width := APen.Width;
|
FPen.Width := APen.Width;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user