From 4f298175050211da02be3f3e68abdd6be40b2311 Mon Sep 17 00:00:00 2001 From: ask Date: Sun, 26 Apr 2009 06:27:11 +0000 Subject: [PATCH] TAChart: Do not store zero extent bounds. git-svn-id: trunk@19627 - --- components/tachart/tatypes.pas | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/components/tachart/tatypes.pas b/components/tachart/tatypes.pas index 5f30f1d958..0b6031bae1 100644 --- a/components/tachart/tatypes.pas +++ b/components/tachart/tatypes.pas @@ -252,16 +252,17 @@ type function GetBounds(AIndex: Integer): Double; function GetUseBounds(AIndex: integer): Boolean; + function IsBoundsStored(AIndex: Integer): boolean; procedure SetBounds(AIndex: Integer; const AValue: Double); procedure SetUseBounds(AIndex: Integer; AValue: Boolean); public procedure CheckBoundsOrder; property Extent: TDoubleRect read FExtent; published - property XMin: Double index 1 read GetBounds write SetBounds; - property YMin: Double index 2 read GetBounds write SetBounds; - property XMax: Double index 3 read GetBounds write SetBounds; - property YMax: Double index 4 read GetBounds write SetBounds; + property XMin: Double index 1 read GetBounds write SetBounds stored IsBoundsStored; + property YMin: Double index 2 read GetBounds write SetBounds stored IsBoundsStored; + property XMax: Double index 3 read GetBounds write SetBounds stored IsBoundsStored; + property YMax: Double index 4 read GetBounds write SetBounds stored IsBoundsStored; property UseXMin: Boolean index 1 read GetUseBounds write SetUseBounds default false; property UseYMin: Boolean index 2 read GetUseBounds write SetUseBounds default false; property UseXMax: Boolean index 3 read GetUseBounds write SetUseBounds default false; @@ -783,6 +784,11 @@ begin Result := FUseBounds[AIndex]; end; +function TChartExtent.IsBoundsStored(AIndex: Integer): boolean; +begin + Result := FExtent.coords[AIndex] <> 0; +end; + procedure TChartExtent.CheckBoundsOrder; begin if UseXMin and UseXMax and (XMin >= XMax) then begin