简体   繁体   English

用 RGBA 绘制 Java Swing

[英]Drawing in Java Swing with RGBA

How can I draw in swing using RGBA (colors with transparency)?如何使用 RGBA(具有透明度的颜色)在 swing 中绘制? The only class I found is Color which is sRGB.我发现的唯一 class 是 sRGB 颜色。

Color will understand alpha and even has constructors that accept it: Color API Color 会理解 alpha,甚至有接受它的构造函数: Color API

Are you drawing in a BufferedImage?你画的是 BufferedImage 吗?

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

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