mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-29 09:22:19 +01:00
TAChart: Add some strict protected/strict private annotations. Get rid of TCustomSeriesCrack class.
git-svn-id: trunk@31827 -
This commit is contained in:
parent
d0b5c54609
commit
e8d1819c83
@ -46,7 +46,7 @@ type
|
|||||||
{ TChartAxisTitle }
|
{ TChartAxisTitle }
|
||||||
|
|
||||||
TChartAxisTitle = class(TCustomChartAxisTitle)
|
TChartAxisTitle = class(TCustomChartAxisTitle)
|
||||||
private
|
strict private
|
||||||
FCaption: String;
|
FCaption: String;
|
||||||
|
|
||||||
function GetFont: TFont;
|
function GetFont: TFont;
|
||||||
|
|||||||
@ -122,7 +122,7 @@ type
|
|||||||
{ TIndexedComponent }
|
{ TIndexedComponent }
|
||||||
|
|
||||||
TIndexedComponent = class(TComponent)
|
TIndexedComponent = class(TComponent)
|
||||||
protected
|
strict protected
|
||||||
function GetIndex: Integer; virtual; abstract;
|
function GetIndex: Integer; virtual; abstract;
|
||||||
procedure SetIndex(AValue: Integer); virtual; abstract;
|
procedure SetIndex(AValue: Integer); virtual; abstract;
|
||||||
public
|
public
|
||||||
|
|||||||
@ -34,7 +34,7 @@ type
|
|||||||
{ TCustomChartSeries }
|
{ TCustomChartSeries }
|
||||||
|
|
||||||
TCustomChartSeries = class(TBasicChartSeries)
|
TCustomChartSeries = class(TBasicChartSeries)
|
||||||
private
|
strict private
|
||||||
FAxisIndexX: Integer;
|
FAxisIndexX: Integer;
|
||||||
FAxisIndexY: Integer;
|
FAxisIndexY: Integer;
|
||||||
FLegend: TChartSeriesLegend;
|
FLegend: TChartSeriesLegend;
|
||||||
@ -60,11 +60,11 @@ type
|
|||||||
procedure ReadState(Reader: TReader); override;
|
procedure ReadState(Reader: TReader); override;
|
||||||
procedure SetParentComponent(AParent: TComponent); override;
|
procedure SetParentComponent(AParent: TComponent); override;
|
||||||
|
|
||||||
protected
|
strict protected
|
||||||
function GetIndex: Integer; override;
|
function GetIndex: Integer; override;
|
||||||
procedure SetIndex(AValue: Integer); override;
|
procedure SetIndex(AValue: Integer); override;
|
||||||
|
|
||||||
protected
|
public
|
||||||
function AxisToGraph(const APoint: TDoublePoint): TDoublePoint;
|
function AxisToGraph(const APoint: TDoublePoint): TDoublePoint;
|
||||||
function AxisToGraphX(AX: Double): Double; override;
|
function AxisToGraphX(AX: Double): Double; override;
|
||||||
function AxisToGraphY(AY: Double): Double; override;
|
function AxisToGraphY(AY: Double): Double; override;
|
||||||
@ -73,7 +73,6 @@ type
|
|||||||
function GraphToAxis(APoint: TDoublePoint): TDoublePoint;
|
function GraphToAxis(APoint: TDoublePoint): TDoublePoint;
|
||||||
function GraphToAxisX(AX: Double): Double; override;
|
function GraphToAxisX(AX: Double): Double; override;
|
||||||
function GraphToAxisY(AY: Double): Double; override;
|
function GraphToAxisY(AY: Double): Double; override;
|
||||||
|
|
||||||
function IsRotated: Boolean;
|
function IsRotated: Boolean;
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -106,7 +105,7 @@ type
|
|||||||
{ TChartSeries }
|
{ TChartSeries }
|
||||||
|
|
||||||
TChartSeries = class(TCustomChartSeries)
|
TChartSeries = class(TCustomChartSeries)
|
||||||
private
|
strict private
|
||||||
FBuiltinSource: TCustomChartSource;
|
FBuiltinSource: TCustomChartSource;
|
||||||
FListener: TListener;
|
FListener: TListener;
|
||||||
FMarks: TChartMarks;
|
FMarks: TChartMarks;
|
||||||
@ -187,13 +186,13 @@ type
|
|||||||
{ TBasicPointSeries }
|
{ TBasicPointSeries }
|
||||||
|
|
||||||
TBasicPointSeries = class(TChartSeries)
|
TBasicPointSeries = class(TChartSeries)
|
||||||
private
|
strict private
|
||||||
FMarkPositions: TLinearMarkPositions;
|
FMarkPositions: TLinearMarkPositions;
|
||||||
function GetLabelDirection(AIndex: Integer): TLabelDirection;
|
function GetLabelDirection(AIndex: Integer): TLabelDirection;
|
||||||
procedure SetMarkPositions(AValue: TLinearMarkPositions);
|
procedure SetMarkPositions(AValue: TLinearMarkPositions);
|
||||||
procedure SetPointer(AValue: TSeriesPointer);
|
procedure SetPointer(AValue: TSeriesPointer);
|
||||||
procedure SetUseReticule(AValue: Boolean);
|
procedure SetUseReticule(AValue: Boolean);
|
||||||
protected
|
strict protected
|
||||||
FGraphPoints: array of TDoublePoint;
|
FGraphPoints: array of TDoublePoint;
|
||||||
FLoBound: Integer;
|
FLoBound: Integer;
|
||||||
FMinXRange: Double;
|
FMinXRange: Double;
|
||||||
@ -201,6 +200,7 @@ type
|
|||||||
FUpBound: Integer;
|
FUpBound: Integer;
|
||||||
FUseReticule: Boolean;
|
FUseReticule: Boolean;
|
||||||
|
|
||||||
|
protected
|
||||||
procedure AfterAdd; override;
|
procedure AfterAdd; override;
|
||||||
procedure AfterDrawPointer(
|
procedure AfterDrawPointer(
|
||||||
ADrawer: IChartDrawer; AIndex: Integer; const APos: TPoint); virtual;
|
ADrawer: IChartDrawer; AIndex: Integer; const APos: TPoint); virtual;
|
||||||
@ -214,10 +214,10 @@ type
|
|||||||
procedure UpdateGraphPoints(AIndex: Integer);
|
procedure UpdateGraphPoints(AIndex: Integer);
|
||||||
procedure UpdateMargins(ADrawer: IChartDrawer; var AMargins: TRect); override;
|
procedure UpdateMargins(ADrawer: IChartDrawer; var AMargins: TRect); override;
|
||||||
procedure UpdateMinXRange;
|
procedure UpdateMinXRange;
|
||||||
|
|
||||||
|
property Pointer: TSeriesPointer read FPointer write SetPointer;
|
||||||
property UseReticule: Boolean
|
property UseReticule: Boolean
|
||||||
read FUseReticule write SetUseReticule default false;
|
read FUseReticule write SetUseReticule default false;
|
||||||
protected
|
|
||||||
property Pointer: TSeriesPointer read FPointer write SetPointer;
|
|
||||||
public
|
public
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
public
|
public
|
||||||
|
|||||||
@ -51,10 +51,10 @@ type
|
|||||||
{ TCustomChartSource }
|
{ TCustomChartSource }
|
||||||
|
|
||||||
TCustomChartSource = class(TComponent)
|
TCustomChartSource = class(TComponent)
|
||||||
private
|
strict private
|
||||||
FBroadcaster: TBroadcaster;
|
FBroadcaster: TBroadcaster;
|
||||||
FUpdateCount: Integer;
|
FUpdateCount: Integer;
|
||||||
protected
|
strict protected
|
||||||
FExtent: TDoubleRect;
|
FExtent: TDoubleRect;
|
||||||
FExtentIsValid: Boolean;
|
FExtentIsValid: Boolean;
|
||||||
FValuesTotal: Double;
|
FValuesTotal: Double;
|
||||||
@ -100,7 +100,7 @@ type
|
|||||||
{ TChartSourceBuffer }
|
{ TChartSourceBuffer }
|
||||||
|
|
||||||
TChartSourceBuffer = class
|
TChartSourceBuffer = class
|
||||||
private
|
strict private
|
||||||
FBuf: array of TChartDataItem;
|
FBuf: array of TChartDataItem;
|
||||||
FCount: Cardinal;
|
FCount: Cardinal;
|
||||||
FStart: Cardinal;
|
FStart: Cardinal;
|
||||||
|
|||||||
@ -40,7 +40,7 @@ type
|
|||||||
{ TBasicFuncSeries }
|
{ TBasicFuncSeries }
|
||||||
|
|
||||||
TBasicFuncSeries = class(TCustomChartSeries)
|
TBasicFuncSeries = class(TCustomChartSeries)
|
||||||
private
|
strict private
|
||||||
FExtent: TChartExtent;
|
FExtent: TChartExtent;
|
||||||
procedure SetExtent(AValue: TChartExtent);
|
procedure SetExtent(AValue: TChartExtent);
|
||||||
protected
|
protected
|
||||||
@ -61,7 +61,7 @@ type
|
|||||||
{ TFuncSeries }
|
{ TFuncSeries }
|
||||||
|
|
||||||
TFuncSeries = class(TBasicFuncSeries)
|
TFuncSeries = class(TBasicFuncSeries)
|
||||||
private
|
strict private
|
||||||
FDomainExclusions: TIntervalList;
|
FDomainExclusions: TIntervalList;
|
||||||
FOnCalculate: TFuncCalculateEvent;
|
FOnCalculate: TFuncCalculateEvent;
|
||||||
FPen: TChartPen;
|
FPen: TChartPen;
|
||||||
@ -99,7 +99,7 @@ type
|
|||||||
{ TBSplineSeries }
|
{ TBSplineSeries }
|
||||||
|
|
||||||
TBSplineSeries = class(TBasicPointSeries)
|
TBSplineSeries = class(TBasicPointSeries)
|
||||||
private
|
strict private
|
||||||
FDegree: TSplineDegree;
|
FDegree: TSplineDegree;
|
||||||
FPen: TChartPen;
|
FPen: TChartPen;
|
||||||
FStep: TFuncSeriesStep;
|
FStep: TFuncSeriesStep;
|
||||||
@ -198,7 +198,7 @@ type
|
|||||||
{ TColorMapSeries }
|
{ TColorMapSeries }
|
||||||
|
|
||||||
TColorMapSeries = class(TBasicFuncSeries)
|
TColorMapSeries = class(TBasicFuncSeries)
|
||||||
private
|
strict private
|
||||||
FBrush: TBrush;
|
FBrush: TBrush;
|
||||||
FColorSource: TCustomChartSource;
|
FColorSource: TCustomChartSource;
|
||||||
FColorSourceListener: TListener;
|
FColorSourceListener: TListener;
|
||||||
@ -337,9 +337,6 @@ begin
|
|||||||
OnCalculate(AX, Result)
|
OnCalculate(AX, Result)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
type
|
|
||||||
TCustomSeriesCrack = class(TCustomChartSeries);
|
|
||||||
|
|
||||||
procedure DrawFunction(
|
procedure DrawFunction(
|
||||||
ADrawer: IChartDrawer; ASeries: TCustomChartSeries;
|
ADrawer: IChartDrawer; ASeries: TCustomChartSeries;
|
||||||
ADomainExclusions: TIntervalList; ACalc: TTransformFunc; AStep: Integer);
|
ADomainExclusions: TIntervalList; ACalc: TTransformFunc; AStep: Integer);
|
||||||
@ -388,10 +385,10 @@ var
|
|||||||
hint: Integer;
|
hint: Integer;
|
||||||
xg, xa, xg1, xa1, xmax, graphStep: Double;
|
xg, xa, xg1, xa1, xmax, graphStep: Double;
|
||||||
begin
|
begin
|
||||||
chart := TCustomSeriesCrack(ASeries).FChart;
|
chart := ASeries.ParentChart;
|
||||||
r := chart.CurrentExtent;
|
r := chart.CurrentExtent;
|
||||||
|
|
||||||
with TCustomSeriesCrack(ASeries) do
|
with ASeries do
|
||||||
if IsRotated then begin
|
if IsRotated then begin
|
||||||
axisToGraphXr := @AxisToGraphY;
|
axisToGraphXr := @AxisToGraphY;
|
||||||
axisToGraphYr := @AxisToGraphX;
|
axisToGraphYr := @AxisToGraphX;
|
||||||
@ -444,9 +441,7 @@ begin
|
|||||||
else
|
else
|
||||||
exit;
|
exit;
|
||||||
ADrawer.Pen := Pen;
|
ADrawer.Pen := Pen;
|
||||||
DrawFunction(
|
DrawFunction(ADrawer, Self, DomainExclusions, calc, Step);
|
||||||
ADrawer, TCustomSeriesCrack(TCustomChartSeries(Self)),
|
|
||||||
DomainExclusions, calc, Step);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFuncSeries.GetLegendItems(AItems: TChartLegendItems);
|
procedure TFuncSeries.GetLegendItems(AItems: TChartLegendItems);
|
||||||
|
|||||||
@ -67,7 +67,7 @@ type
|
|||||||
procedure VisitSources(
|
procedure VisitSources(
|
||||||
AVisitor: TChartOnSourceVisitor; AAxis: TChartAxis; var AData); virtual;
|
AVisitor: TChartOnSourceVisitor; AAxis: TChartAxis; var AData); virtual;
|
||||||
|
|
||||||
protected
|
public
|
||||||
function AxisToGraphX(AX: Double): Double; virtual;
|
function AxisToGraphX(AX: Double): Double; virtual;
|
||||||
function AxisToGraphY(AY: Double): Double; virtual;
|
function AxisToGraphY(AY: Double): Double; virtual;
|
||||||
function GraphToAxisX(AX: Double): Double; virtual;
|
function GraphToAxisX(AX: Double): Double; virtual;
|
||||||
|
|||||||
@ -51,7 +51,7 @@ type
|
|||||||
{ TChartPen }
|
{ TChartPen }
|
||||||
|
|
||||||
TChartPen = class(TPen)
|
TChartPen = class(TPen)
|
||||||
private
|
strict private
|
||||||
FVisible: Boolean;
|
FVisible: Boolean;
|
||||||
procedure SetVisible(AValue: Boolean);
|
procedure SetVisible(AValue: Boolean);
|
||||||
public
|
public
|
||||||
@ -67,7 +67,7 @@ type
|
|||||||
{ TChartElement }
|
{ TChartElement }
|
||||||
|
|
||||||
TChartElement = class(TPersistent)
|
TChartElement = class(TPersistent)
|
||||||
protected
|
strict protected
|
||||||
FVisible: Boolean;
|
FVisible: Boolean;
|
||||||
procedure SetVisible(AValue: Boolean);
|
procedure SetVisible(AValue: Boolean);
|
||||||
protected
|
protected
|
||||||
@ -275,7 +275,7 @@ type
|
|||||||
{ TSeriesPointer }
|
{ TSeriesPointer }
|
||||||
|
|
||||||
TSeriesPointer = class(TChartElement)
|
TSeriesPointer = class(TChartElement)
|
||||||
private
|
strict private
|
||||||
FBrush: TBrush;
|
FBrush: TBrush;
|
||||||
FHorizSize: Integer;
|
FHorizSize: Integer;
|
||||||
FPen: TChartPen;
|
FPen: TChartPen;
|
||||||
@ -308,7 +308,7 @@ type
|
|||||||
EExtentError = class(EChartError);
|
EExtentError = class(EChartError);
|
||||||
|
|
||||||
TChartRange = class(TChartElement)
|
TChartRange = class(TChartElement)
|
||||||
private
|
strict private
|
||||||
FBounds: array [1..2] of Double;
|
FBounds: array [1..2] of Double;
|
||||||
FUseBounds: array [1..2] of Boolean;
|
FUseBounds: array [1..2] of Boolean;
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ type
|
|||||||
{ TChartExtent }
|
{ TChartExtent }
|
||||||
|
|
||||||
TChartExtent = class(TChartElement)
|
TChartExtent = class(TChartElement)
|
||||||
private
|
strict private
|
||||||
FExtent: TDoubleRect;
|
FExtent: TDoubleRect;
|
||||||
FUseBounds: array [1..4] of Boolean;
|
FUseBounds: array [1..4] of Boolean;
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ type
|
|||||||
{ TChartMargins }
|
{ TChartMargins }
|
||||||
|
|
||||||
TChartMargins = class(TChartElement)
|
TChartMargins = class(TChartElement)
|
||||||
private
|
strict private
|
||||||
FData: record
|
FData: record
|
||||||
case Integer of
|
case Integer of
|
||||||
0: (FRect: TRect;);
|
0: (FRect: TRect;);
|
||||||
@ -379,7 +379,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TChartArrow = class(TChartElement)
|
TChartArrow = class(TChartElement)
|
||||||
private
|
strict private
|
||||||
FLength: TChartDistance;
|
FLength: TChartDistance;
|
||||||
FWidth: TChartDistance;
|
FWidth: TChartDistance;
|
||||||
procedure SetLength(AValue: TChartDistance);
|
procedure SetLength(AValue: TChartDistance);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user