TAChart: Use GUI connector in "bgra" demo

git-svn-id: trunk@40179 -
This commit is contained in:
ask 2013-02-04 15:34:10 +00:00
parent c26953c4cd
commit 9cd4c96223
3 changed files with 34 additions and 5 deletions

View File

@ -50,12 +50,21 @@ object Form1: TForm1
object cbPie: TCheckBox
Left = 104
Height = 17
Top = 7
Top = 8
Width = 34
Caption = 'Pie'
OnChange = cbPieChange
TabOrder = 1
end
object cbUseConnector: TCheckBox
Left = 164
Height = 17
Top = 8
Width = 172
Caption = 'Use BGRA for standard drawing'
OnChange = cbUseConnectorChange
TabOrder = 2
end
end
object chSimple: TChart
Left = 0
@ -89,6 +98,7 @@ object Form1: TForm1
OnAfterPaint = chSimpleAfterPaint
Align = alLeft
Color = clGreen
DoubleBuffered = True
ParentColor = False
object chSimpleLineSeries1: TLineSeries
ZPosition = 10
@ -374,4 +384,8 @@ object Form1: TForm1
left = 192
top = 320
end
object ChartGUIConnectorBGRA1: TChartGUIConnectorBGRA
left = 440
top = 184
end
end

View File

@ -5,10 +5,9 @@ unit Main;
interface
uses
Classes, ComCtrls, ExtCtrls, StdCtrls, SysUtils, FileUtil, Forms,
Controls, Graphics, Dialogs,
TAGraph, TASeries, TASources, TAAnimatedSource, TACustomSource,
BGRASliceScaling;
Classes, ComCtrls, ExtCtrls, StdCtrls, SysUtils, FileUtil, Forms, Controls,
Graphics, Dialogs, TAGraph, TAGUIConnectorBGRA, TASeries, TASources,
TAAnimatedSource, TACustomSource, BGRASliceScaling;
type
@ -18,6 +17,8 @@ type
btnStartStop: TButton;
cbAntialiasing: TCheckBox;
cbPie: TCheckBox;
ChartGUIConnectorBGRA1: TChartGUIConnectorBGRA;
cbUseConnector: TCheckBox;
chSimple: TChart;
chSimpleAreaSeries1: TAreaSeries;
chSimpleBarSeries1: TBarSeries;
@ -40,6 +41,7 @@ type
procedure btnStartStopClick(Sender: TObject);
procedure cbAntialiasingChange(Sender: TObject);
procedure cbPieChange(Sender: TObject);
procedure cbUseConnectorChange(Sender: TObject);
procedure chSimpleAfterPaint(ASender: TChart);
procedure chBarEffectsBarSeries1BeforeDrawBar(ASender: TBarSeries;
ACanvas: TCanvas; const ARect: TRect; APointIndex, AStackIndex: Integer;
@ -92,6 +94,14 @@ begin
chSimplePieSeries1.Active := cbPie.Checked;
end;
procedure TForm1.cbUseConnectorChange(Sender: TObject);
begin
if cbUseConnector.Checked then
chSimple.GUIConnector := ChartGUIConnectorBGRA1
else
chSimple.GUIConnector := nil;
end;
procedure TForm1.chSimpleAfterPaint(ASender: TChart);
begin
Unused(ASender);

View File

@ -73,6 +73,11 @@
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Checks>
<RangeChecks Value="True"/>
</Checks>
</CodeGeneration>
<Linking>
<Options>
<Win32>