mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 13:49:32 +02:00
TAChart: Additional checks to prevent drawing of axis marks outside the axis range
git-svn-id: trunk@31856 -
This commit is contained in:
parent
89c458bc8d
commit
b6c83f2721
@ -640,8 +640,9 @@ begin
|
||||
if not Visible then exit;
|
||||
v := IsVertical;
|
||||
d := FHelper.FDrawer;
|
||||
GetMarkValues(
|
||||
TDoublePointBoolArr(AExtent.a)[v], TDoublePointBoolArr(AExtent.b)[v]);
|
||||
FHelper.FValueMin := TDoublePointBoolArr(AExtent.a)[v];
|
||||
FHelper.FValueMax := TDoublePointBoolArr(AExtent.b)[v];
|
||||
GetMarkValues(FHelper.FValueMin, FHelper.FValueMax);
|
||||
sz := Marks.Measure(d, not v, TickLength, FMarkValues);
|
||||
FHelper.GetClipRange(rmin, rmax);
|
||||
minc := MaxInt;
|
||||
|
@ -215,6 +215,8 @@ type
|
||||
FScaledTickLength: Integer;
|
||||
FStripeIndex: Cardinal;
|
||||
FTransf: ICoordTransformer;
|
||||
FValueMax: Double;
|
||||
FValueMin: Double;
|
||||
FZOffset: TPoint;
|
||||
|
||||
procedure BeginDrawing; virtual;
|
||||
@ -297,6 +299,8 @@ begin
|
||||
Result.FClipRect := FClipRect;
|
||||
Result.FDrawer := FDrawer;
|
||||
Result.FTransf := FTransf;
|
||||
Result.FValueMax := FValueMax;
|
||||
Result.FValueMin := FValueMin;
|
||||
Result.FZOffset := FZOffset;
|
||||
end;
|
||||
|
||||
@ -318,7 +322,9 @@ var
|
||||
coord: Integer;
|
||||
begin
|
||||
coord := GraphToImage(AMark);
|
||||
if not IsInClipRange(coord) then exit;
|
||||
if
|
||||
not IsInClipRange(coord) or not InRange(AMark, FValueMin, FValueMax)
|
||||
then exit;
|
||||
|
||||
if FAxis.Grid.Visible then begin
|
||||
FDrawer.Pen := FAxis.Grid;
|
||||
|
Loading…
Reference in New Issue
Block a user