在 UIView 上自由手绘而不是 UIImageView
如何使用触摸移动方法在 UIView
而不是 UIImageView
上绘制手绘图。我在此视图上有许多其他子视图,因此我无法将图像视图添加为整个视图。我看过很多示例,但它们是在 UIImageView
中绘制的。
How to draw a freehand drawing on UIView
rather than UIImageView
using touches moved method. I have many other subviews on this view so i cannot add image view as whole view.I have seen many examples but they are drawing in UIImageView
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看这个样本......
GLPaint 示例
see this sample .....
GLPaint Sample
您必须使用它们的功能。对于线来说,你只需要保存它上面的两个点就可以了,最好保存它的头部和尾部。对于圆,只需保存其圆心和半径。对于每个点只需保存一个像素作为中心。最后,如果你的物体有一些特征,如颜色、厚度或……只需将这些特征添加到我所说的其他特征中。
我希望它对你有用!
You must use from their features. For lines, you just save two points on it, it is better to save its head and tail. For circle just save its center and radius. And For each points just save a pixel as a center. At the end of it, if your objects have some features as a color, thickness or ... just add these features inside of other features that I said.
I hope it be useful for you!