JWindow region opacity

余生颓废 提交于 2019-12-11 08:32:53

问题


I want to implement a screenshot functionality like in snipping tool. I can already select a rectangle and make a screenshot, but I this rectangle to be full opacity.

I wonder if there is a function in Swing or AWT which I can use like this:

window.setOpacityAt(Rectangle r, 0.5f);

I hope you got my problem!


回答1:


See How to Create Translucent and Shaped Windows: How to Implement Per-Pixel Translucency.



来源:https://stackoverflow.com/questions/16373327/jwindow-region-opacity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!