mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 09:10:20 +02:00
TAChart: Fix drawing of bracket pointer symbols.
git-svn-id: trunk@54034 -
This commit is contained in:
parent
7cc7749739
commit
f51dd9a202
@ -407,11 +407,13 @@ procedure TSeriesPointer.DrawSize(ADrawer: IChartDrawer;
|
|||||||
pts: array of TPoint;
|
pts: array of TPoint;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
j: Integer = 0;
|
j: Integer = 0;
|
||||||
|
notClosed: Boolean;
|
||||||
begin
|
begin
|
||||||
|
notClosed := (AStr[1] <> AStr[Length(AStr) - 1]);
|
||||||
SetLength(pts, Length(AStr));
|
SetLength(pts, Length(AStr));
|
||||||
for i := 1 to Length(AStr) do begin
|
for i := 1 to Length(AStr) do begin
|
||||||
if AStr[i] = ' ' then begin
|
if AStr[i] = ' ' then begin
|
||||||
if Brush.Style = bsClear then
|
if (Brush.Style = bsClear) or notClosed then
|
||||||
ADrawer.Polyline(pts, 0, j)
|
ADrawer.Polyline(pts, 0, j)
|
||||||
else
|
else
|
||||||
ADrawer.Polygon(pts, 0, j); // Winding?
|
ADrawer.Polygon(pts, 0, j); // Winding?
|
||||||
@ -431,7 +433,7 @@ const
|
|||||||
// psTriangle, psLeftTriangle, psRightTriangle, psVertBar, psHorBar, psPoint
|
// psTriangle, psLeftTriangle, psRightTriangle, psVertBar, psHorBar, psPoint
|
||||||
'', '17931', '', '28 46', '19 73', '28 46 19 73',
|
'', '17931', '', '28 46', '19 73', '28 46 19 73',
|
||||||
'41236', '47896', '87412', '89632', '84268',
|
'41236', '47896', '87412', '89632', '84268',
|
||||||
'183', '842', '862', '82', '46', '');
|
'1831', '8428', '8628', '82', '46', '');
|
||||||
begin
|
begin
|
||||||
ADrawer.Brush := Brush;
|
ADrawer.Brush := Brush;
|
||||||
if (ocBrush in OverrideColor) and (AColor <> clTAColor) then
|
if (ocBrush in OverrideColor) and (AColor <> clTAColor) then
|
||||||
@ -440,15 +442,14 @@ begin
|
|||||||
if (ocPen in OverrideColor) and (AColor <> clTAColor) then
|
if (ocPen in OverrideColor) and (AColor <> clTAColor) then
|
||||||
ADrawer.SetPenParams(Pen.Style, AColor);
|
ADrawer.SetPenParams(Pen.Style, AColor);
|
||||||
|
|
||||||
if Style = psPoint then
|
case Style of
|
||||||
ADrawer.PutPixel(ACenter.X, ACenter.Y, Pen.Color)
|
psNone : ;
|
||||||
else
|
psPoint : ADrawer.PutPixel(ACenter.X, ACenter.Y, Pen.Color);
|
||||||
if Style = psCircle then
|
psCircle: ADrawer.Ellipse(
|
||||||
ADrawer.Ellipse(
|
ACenter.X - ASize.X, ACenter.Y - ASize.Y,
|
||||||
ACenter.X - ASize.X, ACenter.Y - ASize.Y,
|
ACenter.X + ASize.X + 1, ACenter.Y + ASize.Y + 1)
|
||||||
ACenter.X + ASize.X + 1, ACenter.Y + ASize.Y + 1)
|
else DrawByString(DRAW_STRINGS[Style] + ' ');
|
||||||
else
|
end;
|
||||||
DrawByString(DRAW_STRINGS[Style] + ' ');
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSeriesPointer.SetBrush(AValue: TBrush);
|
procedure TSeriesPointer.SetBrush(AValue: TBrush);
|
||||||
|
Loading…
Reference in New Issue
Block a user