TAChart: Deactivate deprecated OnBeforeDrawBar handler in the bgra demo.

This commit is contained in:
wp_xyz 2022-01-08 23:01:08 +01:00
parent ae60967b81
commit eae69e9d8a
3 changed files with 24 additions and 16 deletions

View File

@ -21,9 +21,9 @@ object Form1: TForm1
Height = 481 Height = 481
Top = 0 Top = 0
Width = 716 Width = 716
ActivePage = tsSimple ActivePage = tsBarEffects
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 1
TabOrder = 1 TabOrder = 1
object tsSimple: TTabSheet object tsSimple: TTabSheet
Caption = 'Simple' Caption = 'Simple'
@ -42,7 +42,7 @@ object Form1: TForm1
Left = 8 Left = 8
Height = 19 Height = 19
Top = 8 Top = 8
Width = 82 Width = 80
Caption = 'Antialiasing' Caption = 'Antialiasing'
OnChange = cbAntialiasingChange OnChange = cbAntialiasingChange
TabOrder = 0 TabOrder = 0
@ -51,7 +51,7 @@ object Form1: TForm1
Left = 104 Left = 104
Height = 19 Height = 19
Top = 8 Top = 8
Width = 36 Width = 34
Caption = 'Pie' Caption = 'Pie'
OnChange = cbPieChange OnChange = cbPieChange
TabOrder = 1 TabOrder = 1
@ -60,7 +60,7 @@ object Form1: TForm1
Left = 164 Left = 164
Height = 19 Height = 19
Top = 8 Top = 8
Width = 185 Width = 183
Caption = 'Use BGRA for standard drawing' Caption = 'Use BGRA for standard drawing'
OnChange = cbUseConnectorChange OnChange = cbUseConnectorChange
TabOrder = 2 TabOrder = 2
@ -141,20 +141,20 @@ object Form1: TForm1
ClientHeight = 453 ClientHeight = 453
ClientWidth = 708 ClientWidth = 708
object Panel2: TPanel object Panel2: TPanel
Left = 579 Left = 581
Height = 453 Height = 453
Top = 0 Top = 0
Width = 129 Width = 127
Align = alRight Align = alRight
AutoSize = True AutoSize = True
ClientHeight = 453 ClientHeight = 453
ClientWidth = 129 ClientWidth = 127
TabOrder = 0 TabOrder = 0
object rgAnimation: TRadioGroup object rgAnimation: TRadioGroup
Left = 7 Left = 7
Height = 89 Height = 89
Top = 7 Top = 7
Width = 115 Width = 113
Align = alTop Align = alTop
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
@ -169,7 +169,7 @@ object Form1: TForm1
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 69 ClientHeight = 69
ClientWidth = 111 ClientWidth = 109
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'Grow' 'Grow'
@ -306,7 +306,7 @@ object Form1: TForm1
Left = 7 Left = 7
Height = 85 Height = 85
Top = 102 Top = 102
Width = 115 Width = 113
Align = alTop Align = alTop
AutoFill = True AutoFill = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -320,7 +320,7 @@ object Form1: TForm1
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 65 ClientHeight = 65
ClientWidth = 111 ClientWidth = 109
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'Box' 'Box'
@ -335,7 +335,7 @@ object Form1: TForm1
Left = 0 Left = 0
Height = 453 Height = 453
Top = 0 Top = 0
Width = 579 Width = 581
AxisList = < AxisList = <
item item
Marks.LabelBrush.Style = bsClear Marks.LabelBrush.Style = bsClear

View File

@ -42,13 +42,15 @@ type
procedure cbAntialiasingChange(Sender: TObject); procedure cbAntialiasingChange(Sender: TObject);
procedure cbPieChange(Sender: TObject); procedure cbPieChange(Sender: TObject);
procedure cbUseConnectorChange(Sender: TObject); procedure cbUseConnectorChange(Sender: TObject);
{
procedure chBarEffectsBarSeries1BeforeDrawBar(ASender: TBarSeries;
ACanvas: TCanvas; const ARect: TRect; APointIndex, AStackIndex: Integer;
var ADoDefaultDrawing: Boolean);
}
procedure chBarEffectsBarSeries1CustomDrawBar(ASeries: TBarSeries; procedure chBarEffectsBarSeries1CustomDrawBar(ASeries: TBarSeries;
ADrawer: IChartDrawer; const ARect: TREct; APointIndex, ADrawer: IChartDrawer; const ARect: TREct; APointIndex,
AStackIndex: Integer); AStackIndex: Integer);
procedure chSimpleAfterPaint(ASender: TChart); procedure chSimpleAfterPaint(ASender: TChart);
procedure chBarEffectsBarSeries1BeforeDrawBar(ASender: TBarSeries;
ACanvas: TCanvas; const ARect: TRect; APointIndex, AStackIndex: Integer;
var ADoDefaultDrawing: Boolean);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure PaintBox1Paint(Sender: TObject); procedure PaintBox1Paint(Sender: TObject);
@ -110,6 +112,10 @@ begin
PaintBox1.Invalidate; PaintBox1.Invalidate;
end; end;
{ This handler of the deprecated OnBeforeDrawBar event is left here for
reference only. The code is not executed in the current version of the
demo.
procedure TForm1.chBarEffectsBarSeries1BeforeDrawBar(ASender: TBarSeries; procedure TForm1.chBarEffectsBarSeries1BeforeDrawBar(ASender: TBarSeries;
ACanvas: TCanvas; const ARect: TRect; APointIndex, AStackIndex: Integer; ACanvas: TCanvas; const ARect: TRect; APointIndex, AStackIndex: Integer;
var ADoDefaultDrawing: Boolean); var ADoDefaultDrawing: Boolean);
@ -141,6 +147,7 @@ begin
2: DrawPhong3DBar(ASender, ACanvas, ARect, APointIndex); 2: DrawPhong3DBar(ASender, ACanvas, ARect, APointIndex);
end; end;
end; end;
}
procedure TForm1.chBarEffectsBarSeries1CustomDrawBar(ASeries: TBarSeries; procedure TForm1.chBarEffectsBarSeries1CustomDrawBar(ASeries: TBarSeries;
ADrawer: IChartDrawer; const ARect: TRect; APointIndex, AStackIndex: Integer); ADrawer: IChartDrawer; const ARect: TRect; APointIndex, AStackIndex: Integer);

View File

@ -14,6 +14,7 @@ uses
begin begin
RequireDerivedFormResource := True; RequireDerivedFormResource := True;
Application.Title:='';
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm1, Form1);
Application.Run; Application.Run;