开发者

Is there a .NET GDI+ equivalent of Java Swing's SetComposite (for Graphics transparency)?

开发者 https://www.devze.com 2023-04-04 11:17 出处:网络
I was wondering if there is a开发者_StackOverflown equivalent to Swing\'s SetComposite on the .NET GDI+ Graphics object?

I was wondering if there is a开发者_StackOverflown equivalent to Swing's SetComposite on the .NET GDI+ Graphics object?

In java I can do something like this:

Composite c = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .5f);
g2.setComposite(c);
// everything now gets painted with 50% transparency

I know there is ColorMatrix but that's only explicitly for transforms on images whereas I'd be looking for something on the entire graphics object.

Thanks, John


You can use Form transparency, Control transparency which supports transparency

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号