TAChart: Publish TChartArrow.Inverted. Respect Arrow.Inverted when painting a TConstantLine series.

git-svn-id: trunk@46151 -
This commit is contained in:
wp 2014-09-07 15:00:57 +00:00
parent 5bd58e3e95
commit 1d654ba391
2 changed files with 10 additions and 3 deletions

View File

@ -768,12 +768,18 @@ begin
lsHorizontal: begin
p := YGraphToImage(AxisToGraphX(Position));
DrawLineHoriz(ADrawer, p);
Arrow.Draw(ADrawer, Point(ClipRect.Right - 1, p), 0, Pen);
if Arrow.Inverted then
Arrow.Draw(ADrawer, Point(ClipRect.Left, p), 0, Pen)
else
Arrow.Draw(ADrawer, Point(ClipRect.Right - 1, p), 0, Pen);
end;
lsVertical: begin
p := XGraphToImage(AxisToGraphX(Position));
DrawLineVert(ADrawer, p);
Arrow.Draw(ADrawer, Point(p, ClipRect.Top), -Pi / 2, Pen);
if Arrow.Inverted then
Arrow.Draw(ADrawer, Point(p, ClipRect.Bottom - 1), -Pi / 2, Pen)
else
Arrow.Draw(ADrawer, Point(p, ClipRect.Top), -Pi / 2, Pen);
end;
end;
end;

View File

@ -224,10 +224,11 @@ type
procedure Draw(
ADrawer: IChartDrawer; const AEndPos: TPoint; AAngle: Double;
APen: TFPCustomPen);
property Inverted: Boolean read FInverted write SetInverted;
published
property BaseLength: TChartDistance
read FBaseLength write SetBaseLength default 0;
property Inverted: Boolean
read FInverted write SetInverted default false;
property Length: TChartDistance
read FLength write SetLength default DEF_ARROW_LENGTH;
property Visible default false;