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

View File

@ -42,13 +42,15 @@ type
procedure cbAntialiasingChange(Sender: TObject);
procedure cbPieChange(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;
ADrawer: IChartDrawer; const ARect: TREct; APointIndex,
AStackIndex: Integer);
procedure chSimpleAfterPaint(ASender: TChart);
procedure chBarEffectsBarSeries1BeforeDrawBar(ASender: TBarSeries;
ACanvas: TCanvas; const ARect: TRect; APointIndex, AStackIndex: Integer;
var ADoDefaultDrawing: Boolean);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure PaintBox1Paint(Sender: TObject);
@ -110,6 +112,10 @@ begin
PaintBox1.Invalidate;
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;
ACanvas: TCanvas; const ARect: TRect; APointIndex, AStackIndex: Integer;
var ADoDefaultDrawing: Boolean);
@ -141,6 +147,7 @@ begin
2: DrawPhong3DBar(ASender, ACanvas, ARect, APointIndex);
end;
end;
}
procedure TForm1.chBarEffectsBarSeries1CustomDrawBar(ASeries: TBarSeries;
ADrawer: IChartDrawer; const ARect: TRect; APointIndex, AStackIndex: Integer);

View File

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