1

我正在尝试使用 drawPoints 方法绘制弧线,如何计算绘制弧线所需的点?(任何半径)

  @override
  void paint(Canvas canvas, Size size) {
    final pointMode = ui.PointMode.points;
    final points = [
      Offset(50, 100),
      Offset(150, 75),
      Offset(250, 250),
      Offset(130, 200),
      Offset(270, 100),
    ];

    final paint = Paint()
      ..color = Colors.black
      ..strokeWidth = 1
      ..strokeCap = StrokeCap.round;
    canvas.drawPoints(pointMode, points, paint);

弧

4

1 回答 1

0

我偶然发现了这篇文章,它帮助我画了很多弧线(虽然没有用点来做),但也许它还是有帮助的。

于 2020-09-03T22:57:55.587 回答