From 7b7579dcd351cd56fc9d72f2fde18083d3d55ca2 Mon Sep 17 00:00:00 2001 From: ask Date: Tue, 25 Jun 2013 11:34:59 +0000 Subject: [PATCH] TAChart: Allow assignment of TFPCustomBrush to Brush property of canvas drawer git-svn-id: trunk@41890 - --- components/tachart/tadrawercanvas.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/tachart/tadrawercanvas.pas b/components/tachart/tadrawercanvas.pas index 496a228bbe..a7e0c36474 100644 --- a/components/tachart/tadrawercanvas.pas +++ b/components/tachart/tadrawercanvas.pas @@ -265,7 +265,14 @@ end; procedure TCanvasDrawer.SetBrush(ABrush: TFPCustomBrush); begin - GetCanvas.Brush.Assign(ABrush); + if ABrush is TBrush then + GetCanvas.Brush.Assign(ABrush) + else + with GetCanvas.Brush do begin + FPColor := ABrush.FPColor; + Pattern := ABrush.Pattern; + Style := ABrush.Style; + end; if FXor then GetCanvas.Brush.Style := bsClear else if FMonochromeColor <> clTAColor then