简体   繁体   English

Java Graphics2D透明渲染

[英]Java Graphics2D Transparent Rendering

I am making a simple 2D game in java... I am using java's Graphics2D to output to my screen. 我在java中制作一个简单的2D游戏......我正在使用java的Graphics2D输出到我的屏幕。 I want to be able to draw things that are partially transparent, can I do this? 我希望能够绘制部分透明的东西,我可以这样做吗? Or will I have to change my entire project to rendering using some other method 或者我是否必须将整个项目更改为使用其他方法进行渲染

在绘制Image之前设置Graphics2D.setComposite(AlphaComposite)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM