mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 15:19:35 +02:00
TAChart: Change GetBounds and GetGraphBounds parameters from out to var
* They may be set only partially. * Add comment explaining that git-svn-id: trunk@24506 -
This commit is contained in:
parent
c0a2d3d22d
commit
653230ad6b
@ -40,7 +40,7 @@ type
|
||||
procedure SetAxisIndexY(AValue: Integer);
|
||||
|
||||
protected
|
||||
procedure GetGraphBounds(out ABounds: TDoubleRect); override;
|
||||
procedure GetGraphBounds(var ABounds: TDoubleRect); override;
|
||||
procedure SetActive(AValue: Boolean); override;
|
||||
procedure SetDepth(AValue: TChartDistance); override;
|
||||
procedure SetShowInLegend(AValue: Boolean); override;
|
||||
@ -96,7 +96,7 @@ type
|
||||
procedure AfterDraw; override;
|
||||
procedure BeforeDraw; override;
|
||||
function ColorOrDefault(AColor: TColor; ADefault: TColor = clTAColor): TColor;
|
||||
procedure GetBounds(out ABounds: TDoubleRect); override;
|
||||
procedure GetBounds(var ABounds: TDoubleRect); override;
|
||||
function GetGraphPoint(AIndex: Integer): TDoublePoint;
|
||||
function GetGraphPointX(AIndex: Integer): Double; inline;
|
||||
function GetGraphPointY(AIndex: Integer): Double; inline;
|
||||
@ -170,7 +170,7 @@ begin
|
||||
FAxisIndexY := DEF_AXIS_INDEX;
|
||||
end;
|
||||
|
||||
procedure TCustomChartSeries.GetGraphBounds(out ABounds: TDoubleRect);
|
||||
procedure TCustomChartSeries.GetGraphBounds(var ABounds: TDoubleRect);
|
||||
begin
|
||||
GetBounds(ABounds);
|
||||
with ABounds do begin
|
||||
@ -379,7 +379,7 @@ begin
|
||||
Result := Source.FormatItem(Marks.Format, AIndex);
|
||||
end;
|
||||
|
||||
procedure TChartSeries.GetBounds(out ABounds: TDoubleRect);
|
||||
procedure TChartSeries.GetBounds(var ABounds: TDoubleRect);
|
||||
begin
|
||||
if not Active or (Count = 0) then exit;
|
||||
ABounds := Extent;
|
||||
|
@ -55,8 +55,10 @@ type
|
||||
procedure AfterAdd; virtual;
|
||||
procedure AfterDraw; virtual;
|
||||
procedure BeforeDraw; virtual;
|
||||
procedure GetBounds(out ABounds: TDoubleRect); virtual; abstract;
|
||||
procedure GetGraphBounds(out ABounds: TDoubleRect); virtual; abstract;
|
||||
// Set series bounds in axis coordinates.
|
||||
// Some or all bounds may be left unset, in which case they will be ignored.
|
||||
procedure GetBounds(var ABounds: TDoubleRect); virtual; abstract;
|
||||
procedure GetGraphBounds(var ABounds: TDoubleRect); virtual; abstract;
|
||||
procedure GetLegendItems(AItems: TChartLegendItems); virtual; abstract;
|
||||
procedure SetActive(AValue: Boolean); virtual; abstract;
|
||||
procedure SetDepth(AValue: TChartDistance); virtual; abstract;
|
||||
|
@ -232,7 +232,7 @@ type
|
||||
procedure SetSeriesColor(AValue: TColor);
|
||||
procedure SetUseBounds(AValue: Boolean);
|
||||
protected
|
||||
procedure GetBounds(out ABounds: TDoubleRect); override;
|
||||
procedure GetBounds(var ABounds: TDoubleRect); override;
|
||||
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -273,7 +273,7 @@ type
|
||||
procedure SetPen(const AValue: TChartPen);
|
||||
procedure SetStep(AValue: TFuncSeriesStep);
|
||||
protected
|
||||
procedure GetBounds(out ABounds: TDoubleRect); override;
|
||||
procedure GetBounds(var ABounds: TDoubleRect); override;
|
||||
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
||||
|
||||
public
|
||||
@ -296,7 +296,7 @@ type
|
||||
end;
|
||||
|
||||
TSeriesDrawEvent = procedure (ACanvas: TCanvas; const ARect: TRect) of object;
|
||||
TSeriesGetBoundsEvent = procedure (out ABounds: TDoubleRect) of object;
|
||||
TSeriesGetBoundsEvent = procedure (var ABounds: TDoubleRect) of object;
|
||||
|
||||
{ TUserDrawnSeries }
|
||||
|
||||
@ -307,7 +307,7 @@ type
|
||||
procedure SetOnDraw(AValue: TSeriesDrawEvent);
|
||||
procedure SetOnGetBounds(AValue: TSeriesGetBoundsEvent);
|
||||
protected
|
||||
procedure GetBounds(out ABounds: TDoubleRect); override;
|
||||
procedure GetBounds(var ABounds: TDoubleRect); override;
|
||||
procedure GetLegendItems(AItems: TChartLegendItems); override;
|
||||
public
|
||||
procedure Draw(ACanvas: TCanvas); override;
|
||||
@ -497,7 +497,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TLine.GetBounds(out ABounds: TDoubleRect);
|
||||
procedure TLine.GetBounds(var ABounds: TDoubleRect);
|
||||
begin
|
||||
if not UseBounds then exit;
|
||||
case LineStyle of
|
||||
@ -1138,7 +1138,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFuncSeries.GetBounds(out ABounds: TDoubleRect);
|
||||
procedure TFuncSeries.GetBounds(var ABounds: TDoubleRect);
|
||||
begin
|
||||
with Extent do begin
|
||||
if UseXMin then ABounds.a.X := XMin;
|
||||
@ -1194,7 +1194,7 @@ begin
|
||||
FOnDraw(ACanvas, FChart.ClipRect);
|
||||
end;
|
||||
|
||||
procedure TUserDrawnSeries.GetBounds(out ABounds: TDoubleRect);
|
||||
procedure TUserDrawnSeries.GetBounds(var ABounds: TDoubleRect);
|
||||
begin
|
||||
if Assigned(FOnGetBounds) then
|
||||
FOnGetBounds(ABounds);
|
||||
|
Loading…
Reference in New Issue
Block a user