动态变化宽度的贝塞尔曲线 [英] Bezier Path with dynamic change of width

查看:152
本文介绍了动态变化宽度的贝塞尔曲线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想创建动态改变线宽的贝塞尔曲线路径。我需要在线的每个部分上花费相同数量的颜色。因此,更长的线应该更细。较短的行应为粗体。或者,至少行应该从头到尾改变它的宽度。

有什么想法可以实现它吗?

谢谢。


I want to create bezier path with dynamically changing line's width. I need spending the same amount of color on each part of line. So, longer line should be thinner. And shorter line should be bold. Or, at least, line should change it's width from beginning to the end.
Any ideas how to achieve it?
Thank you.

推荐答案

实现此目标的唯一方法是使用多个 UIBezierPath 不同的厚度和颜色。

the only way to achieve this is with multiple UIBezierPaths of different thickness and colour.

这篇关于动态变化宽度的贝塞尔曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆