我想让我的图像在Bézier曲线路径上从顶部移动到底部,但我不知道如何计算出该路径的x/y点和斜率。该路径看起来像以下图片所示:
我有起始点、终止点和两个控制点。
![A line that curves slightly to the right as it goes down the page.](https://istack.dev59.com/UtiHe.webp)
Path path = new Path();
Point s = new Point(150, 5);
Point cp1 = new Point(140, 125);
Point cp2 = new Point(145, 150);
Point e = new Point(200, 250);
path.moveTo(s.x, s.y);
path.cubicTo(cp1.x, cp1.y, cp2.x, cp2.y, e.x, e.y);