How can I draw nice 3D arrows like in the attached picture?
By using the code below I only get "flat" arrows
and can't draw an arrow in Z direction:
Code: Select all
var
tmpX,tmpY,tmpZ: Integer;
FromPoint,ToPoint: TPoint;
begin
tmpY := Chart.ChartYCenter + Round(Chart.Canvas.RotationCenter.Y);
tmpX := Chart.ChartXCenter + Round(Chart.Canvas.RotationCenter.X);
tmpZ := (Chart.Width3D div 2) + Round(Chart.Canvas.RotationCenter.Z);
StrainChart.Canvas.Pen.Color := clRed;
StrainChart.Canvas.Pen.Width := 4;
StrainChart.Canvas.Pen.Style := psSolid;
FromPoint.X := Chart.ChartRect.Left;
FromPoint.Y := tmpY;
ToPoint.X := Chart.ChartRect.Right;
ToPoint.Y := tmpY;
Chart.Canvas.Arrow(True, FromPoint, ToPoint, 50, 50, tmpZ);
FromPoint.X := tmpX;
FromPoint.Y := Chart.ChartRect.Bottom;
ToPoint.X := tmpX;
ToPoint.Y := StrainChart.ChartRect.Top;
Chart.Canvas.Arrow(True, FromPoint, ToPoint, 50, 50, tmpZ);