TAChart: Display major axis marks at the edges of the clip range

git-svn-id: trunk@37565 -
This commit is contained in:
ask 2012-06-07 13:40:04 +00:00
parent 59834c98ec
commit 1f29550b44
2 changed files with 3 additions and 1 deletions

View File

@ -466,6 +466,7 @@ procedure TChartAxis.Draw;
FValueMax := Min(FAxisTransf(AMax), FValueMax); FValueMax := Min(FAxisTransf(AMax), FValueMax);
if FValueMax <= FValueMin then continue; if FValueMax <= FValueMin then continue;
ExpandRange(FValueMin, FValueMax, -EPS); ExpandRange(FValueMin, FValueMax, -EPS);
FClipRangeDelta := 1;
try try
BeginDrawing; BeginDrawing;
for m in minorMarks do for m in minorMarks do

View File

@ -211,6 +211,7 @@ type
public public
FAxis: TChartBasicAxis; FAxis: TChartBasicAxis;
FAxisTransf: TTransformFunc; FAxisTransf: TTransformFunc;
FClipRangeDelta: Integer;
FClipRect: ^TRect; FClipRect: ^TRect;
FDrawer: IChartDrawer; FDrawer: IChartDrawer;
FPrevCoord: Integer; FPrevCoord: Integer;
@ -357,7 +358,7 @@ var
rmin, rmax: Integer; rmin, rmax: Integer;
begin begin
GetClipRange(rmin, rmax); GetClipRange(rmin, rmax);
Result := InRange(ACoord, rmin + 1, rmax - 1); Result := InRange(ACoord, rmin + FClipRangeDelta, rmax - FClipRangeDelta);
end; end;
procedure TAxisDrawHelper.LineZ(AP1, AP2: TPoint); procedure TAxisDrawHelper.LineZ(AP1, AP2: TPoint);