calculateSegmentPoints method

  1. @override
void calculateSegmentPoints()
override

Calculates the rendering bounds of a segment.

Implementation

@override
void calculateSegmentPoints() {
  _xAxisRenderer = _seriesRenderer._xAxisRenderer!;
  _yAxisRenderer = _seriesRenderer._yAxisRenderer!;
  _axisClipRect = _calculatePlotOffset(
      _chartState._chartAxis._axisClipRect,
      Offset(_seriesRenderer._xAxisRenderer!._axis.plotOffset,
          _seriesRenderer._yAxisRenderer!._axis.plotOffset));
  _currentPointLocation = _calculatePoint(
      _currentPoint!.xValue,
      _currentPoint!.yValue,
      _xAxisRenderer,
      _yAxisRenderer,
      _chartState._requireInvertedAxis,
      _series,
      _axisClipRect);
  _x1 = _currentPointLocation.x;
  _y1 = _currentPointLocation.y;
  _nextPointLocation = _calculatePoint(
      _nextPoint!.xValue,
      _nextPoint!.yValue,
      _xAxisRenderer,
      _yAxisRenderer,
      _chartState._requireInvertedAxis,
      _series,
      _axisClipRect);
  _x2 = _nextPointLocation.x;
  _y2 = _nextPointLocation.y;

  startControlX = _currentPoint!.startControl!.x;
  startControlY = _currentPoint!.startControl!.y;
  endControlX = _currentPoint!.endControl!.x;
  endControlY = _currentPoint!.endControl!.y;
}