mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-10 07:58:13 +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;
|
if not Visible then exit;
|
||||||
v := IsVertical;
|
v := IsVertical;
|
||||||
d := FHelper.FDrawer;
|
d := FHelper.FDrawer;
|
||||||
GetMarkValues(
|
FHelper.FValueMin := TDoublePointBoolArr(AExtent.a)[v];
|
||||||
TDoublePointBoolArr(AExtent.a)[v], TDoublePointBoolArr(AExtent.b)[v]);
|
FHelper.FValueMax := TDoublePointBoolArr(AExtent.b)[v];
|
||||||
|
GetMarkValues(FHelper.FValueMin, FHelper.FValueMax);
|
||||||
sz := Marks.Measure(d, not v, TickLength, FMarkValues);
|
sz := Marks.Measure(d, not v, TickLength, FMarkValues);
|
||||||
FHelper.GetClipRange(rmin, rmax);
|
FHelper.GetClipRange(rmin, rmax);
|
||||||
minc := MaxInt;
|
minc := MaxInt;
|
||||||
|
@ -215,6 +215,8 @@ type
|
|||||||
FScaledTickLength: Integer;
|
FScaledTickLength: Integer;
|
||||||
FStripeIndex: Cardinal;
|
FStripeIndex: Cardinal;
|
||||||
FTransf: ICoordTransformer;
|
FTransf: ICoordTransformer;
|
||||||
|
FValueMax: Double;
|
||||||
|
FValueMin: Double;
|
||||||
FZOffset: TPoint;
|
FZOffset: TPoint;
|
||||||
|
|
||||||
procedure BeginDrawing; virtual;
|
procedure BeginDrawing; virtual;
|
||||||
@ -297,6 +299,8 @@ begin
|
|||||||
Result.FClipRect := FClipRect;
|
Result.FClipRect := FClipRect;
|
||||||
Result.FDrawer := FDrawer;
|
Result.FDrawer := FDrawer;
|
||||||
Result.FTransf := FTransf;
|
Result.FTransf := FTransf;
|
||||||
|
Result.FValueMax := FValueMax;
|
||||||
|
Result.FValueMin := FValueMin;
|
||||||
Result.FZOffset := FZOffset;
|
Result.FZOffset := FZOffset;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -318,7 +322,9 @@ var
|
|||||||
coord: Integer;
|
coord: Integer;
|
||||||
begin
|
begin
|
||||||
coord := GraphToImage(AMark);
|
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
|
if FAxis.Grid.Visible then begin
|
||||||
FDrawer.Pen := FAxis.Grid;
|
FDrawer.Pen := FAxis.Grid;
|
||||||
|
Loading…
Reference in New Issue
Block a user