1
我使用通過回調提供矩形glsurfaceview的SDK。面具和剪輯GLSurfaceView
我希望能夠以圓形佈局呈現此視圖。 (IE),我想在一個圓形視圖顯示視圖
我一直在使用屏蔽佈局嘗試,如使用可屏蔽佈局https://github.com/christophesmet/android_maskable_layout(偉大工程的圖像,沒有那麼多視頻)
我如何去裁剪並將其渲染爲一個圓圈?
(背景是不斷變化的,所以我不能疊加在該視頻視圖的頂部上的透明視圖,其目的是爲具有在頂部的矩形glsurface視圖其中有一個圓形glsurface視圖)
* * UI目標:**
我不是很確定你想要的佈局的樣子,或者你的應用程序是如何構成的。您可以使用第二個SurfaceView創建遮罩層;您只需要爲遮罩層設置更近的Z深度。如果您有權訪問視頻源,則可以將其指向SurfaceTexture,然後使用自定義着色器來修改渲染(例如,對於每個片段,計算與中心的距離,並且如果它位於圓圈外部,則呈現爲透明黑色)。有關各種示例,請參閱Grafika(https://github.com/google/grafika)。 – fadden 2015-03-03 17:02:06
@fadden編輯帖子以添加UI的外觀圖像。不會有這可能表面是一個問題?我無法訪問視頻源 - 這是一個連續的實時視頻流。謝謝你的領導,我會檢查grafika。 – lavi 2015-03-05 04:01:01