Android Camera2-绘制圆形焦点区域 [英] Android Camera2 - Draw circle focus area
本文介绍了Android Camera2-绘制圆形焦点区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试开发一个使用Camera 2 API的自定义应用程序,我想添加轻按以聚焦"功能.换句话说,当我点击屏幕进行聚焦时,它会显示一个聚焦区域的圆圈.
I'm trying to develop a custom application that uses Camera 2 API and I would like to add the feature "tap to focus". In other words, when I tap on the screen to focus, it shows a circle of the focus area.
如何绘制圆形焦点区域?
How can I draw the circle focus area?
我遵循了Google Camera2Basic 的示例.
I followed the Google Camera2Basic example.
谢谢.
推荐答案
画出抽头区域而不是焦点区域是否足够?在这种情况下,您可以保存点击的X和Y位置并将其用作圆心.而且,您可以使用任何教程绘制摄像机预览,例如
May be enough is draw circle of tap area, not focus area? In this case You can save X and Y pos of tap and use it as center of circle. And You can use any tutorial for drawing over camera preview, like that.
这篇关于Android Camera2-绘制圆形焦点区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文