路径上的图章位图 - Android
在 Android 中是否有任何简单的方法可以沿线标记位图?我找到了 PathDashPathEffect 类,但它只允许标记路径,而不是位图。看起来应该是可能的,但我不知道从哪里开始。
显然,我可以沿着线绘制位图,但在我看来,这会消耗更多资源,特别是因为我不会在本机代码中执行此操作。
有什么帮助或建议吗?
Is there any easy way to stamp bitmaps along a line in Android? I've found the PathDashPathEffect class but that only allows Paths to be stamped, rather than bitmaps. It seems like it should be possible, but I'm not sure where to start.
I could obviously just draw bitmaps along the line, but it seems to me like that would be a bit more resource intensive, especially because I would not be doing it in native code.
Any help or suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,没有用于此目的的 API。您可以使用 BitmapShader 用位图填充路径,但我认为这不是您想要的。
There is unfortunately no API for this. You could use a BitmapShader to fill the path with a Bitmap but I don't think that's what you want.