我尝试用画布和贝塞尔曲线绘制它,但我无法正确绘制平滑的天使。有人可以帮忙在 compose 中画这个吗?
我试过像这样用立方贝塞尔曲线画一条路径:
path = Path().apply {
moveTo(firstHandleCenter.x, firstHandleCenter.y)
cubicTo(
firstCurveCenter.x,
firstCurveCenter.y,
secondCurveCenter.x,
secondCurveCenter.y,
secondHandleCenter.x,
secondHandleCenter.y
)
}
这个在线工具帮助我解决了这个问题:http://blogs.sitepointstatic.com/examples/tech/canvas-curves/bezier-curve.html.
思路是画两条立方贝塞尔曲线。第一个将覆盖一半的波浪,第二个将被反转。