在 UIView 上自由手绘而不是 UIImageView

发布于 2024-12-18 02:34:36 字数 152 浏览 3 评论 0原文

如何使用触摸移动方法在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无远思近则忧 2024-12-25 02:34:36

看这个样本......
GLPaint 示例

see this sample .....
GLPaint Sample

鹿! 2024-12-25 02:34:36

您必须使用它们的功能。对于线来说,你只需要保存它上面的两个点就可以了,最好保存它的头部和尾部。对于圆,只需保存其圆心和半径。对于每个点只需保存一个像素作为中心。最后,如果你的物体有一些特征,如颜色、厚度或……只需将这些特征添加到我所说的其他特征中。

我希望它对你有用!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文