renderLimitLineLine method

void renderLimitLineLine(
  1. Canvas c,
  2. LimitLine limitLine,
  3. List<double?> position
)

Implementation

void renderLimitLineLine(
    Canvas c, LimitLine limitLine, List<double?> position) {
  _limitLineSegmentsBuffer[0] = position[0];
  _limitLineSegmentsBuffer[1] = viewPortHandler!.contentTop();
  _limitLineSegmentsBuffer[2] = position[0];
  _limitLineSegmentsBuffer[3] = viewPortHandler!.contentBottom();

  _limitLinePath.reset();
  _limitLinePath.moveTo(
      _limitLineSegmentsBuffer[0]!, _limitLineSegmentsBuffer[1]!);
  _limitLinePath.lineTo(
      _limitLineSegmentsBuffer[2]!, _limitLineSegmentsBuffer[3]!);

  limitLinePaint
    ?..style = PaintingStyle.stroke
    ..color = limitLine.lineColor
    ..strokeWidth = limitLine.lineWidth!;

  if (limitLine.dashPathEffect != null) {
    _limitLinePath =
        limitLine.dashPathEffect!.convert2DashPath(_limitLinePath);
  }
  c.drawPath(_limitLinePath, limitLinePaint!);
}