制作绘图/绘画应用程序

发布于 2024-08-18 06:02:07 字数 147 浏览 2 评论 0原文

我想在我的应用程序中包含一个简单的绘图功能。一位朋友告诉我,我不能使用画布,因为我需要控制帧缓冲区,而不是为每一帧重新绘制整个屏幕。他建议我找一个 openGL 2d 引擎。我四处搜索,只发现 Rokon 没有任何文档,而且示例也不太符合我的需要。

有什么建议吗?

I'd like to include a simple draw feature on my app. A friend told me I can't use canvas because I need to control the frame buffer and not redraw the entire screen every for every frame. He suggested I find a openGL 2d engine. I've searched around and I've only found Rokon which doesn't have any documentation and the examples aren't quite what I need.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

不…忘初心 2024-08-25 06:02:07

我实在不明白问题是什么?
如果您只想重绘画布的某些部分,可以使用 invalidate(rect)。

http://developer.android.com/reference/android/ view/View.html#invalidate()

I don't really understand what the problem is?
If you simply wish to redraw some portion of the canvas you can use invalidate(rect).

http://developer.android.com/reference/android/view/View.html#invalidate()

递刀给你 2024-08-25 06:02:07

只需通过扩展视图类来创建自定义视图即可。在此客户视图中重写 onDraw 方法。 Android 本身会处理已更改的像素,并且调用 invalidate 仅刷新已标记为脏的像素

Just create a custom veiw by extending the view class. in this custome view override the onDraw method. Android itself takes care of the pixels that have been changed and calling invalidate only refreshes the pixels that have been marked dirty

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