我如何使用 CGContext 绘制它
I want to draw this in my view to draw this line, I have everything I need to make a basic line, but am just not good at drawing, I did in fact try to do this, but just cannot get it to work correctly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
下面的代码应该绘制一条像您所描述的那样的正弦曲线,假设 currentBounds 是您要在其中绘制的区域的边界矩形:
The following code should draw a sine curve like the one you describe, assuming currentBounds is the bounding rectangle for your area to draw within:
这是贝塞尔曲线吗?如果您知道两个控制点的位置,请使用
或
插入曲线,然后使用
描边曲线。
Is this a Bézier curve? If you know where the two control points are located, use
or
to insert the curve, then use
to stroke the curve.