setLineWidth method

void setLineWidth(
  1. double width
)

Sets the width for lines drawn by drawLine and drawLines.

The width is clamped to the range supported by the renderer.

  • width: The desired line width in pixels.

Implementation

void setLineWidth(double width) {
  if (_renderState.lineWidth != width) {
    _renderState.lineWidth = width;
    flush();
    _renderer.setLineWidth(_renderState.lineWidth);
  }
}