TTeeCanvas.AssignBrush overloads are incorrect

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mcdurdin
Newbie
Newbie
Posts: 2
Joined: Wed Sep 28, 2011 12:00 am

TTeeCanvas.AssignBrush overloads are incorrect

Post by mcdurdin » Mon Feb 13, 2012 9:42 pm

When trying to use TSeriesBandTool, we noted that the colour of the band was incorrect compared with previous versions of TeeChart. We traced this to the TTeeCanvas.AssignBrush overloads, which swap BackColor and Color. These overloaded functions are used in many places, some correctly, some incorrectly; it's quite inconsistent.
Procedure TTeeCanvas.AssignBrush(ABrush:TChartBrush);
begin
AssignBrush(ABrush,ABrush.BackColor,ABrush.Color);
end;

Procedure TTeeCanvas.AssignBrush(ABrush:TChartBrush; ABackColor:TColor);
begin
AssignBrush(ABrush,ABackColor,ABrush.Color);
end;

(snip)

// deprecated, please use AssignBrush
Procedure TTeeCanvas.AssignBrushColor(ABrush:TChartBrush; AColor,ABackColor:TColor); // deprecated;
begin
AssignBrush(ABrush,AColor,ABackColor);
end;

Procedure TTeeCanvas.AssignBrush(ABrush:TChartBrush; AColor,ABackColor:TColor);
The following units use AssignBrush in various ways. There seems to be a real lack of consistency among them. It's not clear to me when the intent is to use BackColor and when the intent is to use Color, in many circumstances, but you'll be clearer on that. A brief review of them yielded:

CandleCh: used correctly, but will fail
ErrorBar: used correctly, but will fail
Series: used correctly, but will fail
StatChar: used correctly, but will fail
TeeArrowTool: used correctly, but will fail
TeeAxisBreaks: used correctly, but will fail
TeeCircularGauge: incorrect?
TeeClusteringTool: used correctly, but will fail
TeeFrameTool: used correctly, but will fail
TeeFunnel: unsure?
TeeGridBandToolEdit: ok
TeeLegendScrollBar: used correctly, but will fail
TeeLinearGauge: used correctly, but will fail
TeeMapSeries: used correctly, but will fail
TeEngine: incorrect?
TeePolar: used correctly, but will fail
TeeProcs: unsure?
TeeRenkoSeries: unsure?
TeeRose: unsure?
TeeSelectorTool: incorrect?
TeeSeriesBandTool: used correctly, but will fail
TeeSeriesRegion: used correctly, but will fail
TeeShape: used correctly, but will fail
TeeSurfa: used correctly, but will fail?
TeeTagCloud: used correctly, but will fail
TeeText3D: used correctly, but will fail
TeeTools: used correctly, but will fail
TeeTriSurface: used correctly, but will fail
TeeVolumePipe: incorrect?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TTeeCanvas.AssignBrush overloads are incorrect

Post by Yeray » Tue Feb 14, 2012 11:57 am

Hi,

Thank you very much for reporting it and the time spent with the list. I've added it to the wish list to be revised asap (TV52016035).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply