SmoothLine constructor

SmoothLine({
  1. double brushPrecision = 0.8,
  2. double minPointDistance = 2.0,
  3. bool useBezierCurve = true,
  4. int smoothLevel = 1,
})

Implementation

SmoothLine({
  /// 绘制影响因子,值越小线条越平滑,粗细变化越慢
  this.brushPrecision = 0.8,

  /// 最小点距离,用于过滤过近的点,减少数据量
  /// 值越大,点越少,性能越好,但可能丢失细节
  this.minPointDistance = 2.0,

  /// 是否使用贝塞尔曲线平滑,默认 true
  this.useBezierCurve = true,

  /// 平滑级别,值越大越平滑,但计算成本越高
  /// 0: 无额外平滑 (快速)
  /// 1: 基础平滑 (推荐,默认)
  /// 2: 高级平滑 (解决快速绘制折线感)
  this.smoothLevel = 1,
});