5 messages in net.java.dev.jna.usersRe: [jna-users] Translucent Windows
FromSent OnAttachments
Marc RavensbergenOct 1, 2007 5:25 pm 
Timothy WallOct 1, 2007 8:20 pm 
Marc RavensbergenOct 2, 2007 5:04 am 
Timothy WallOct 2, 2007 6:25 am 
Marc RavensbergenOct 2, 2007 7:46 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Translucent WindowsActions...
From:Timothy Wall (twal@dev.java.net)
Date:Oct 1, 2007 8:20:09 pm
List:net.java.dev.jna.users

On Oct 1, 2007, at 8:25 PM, Marc Ravensbergen wrote:

Hi, I am wondering how to make certain parts of a window translucent, and other parts of the same window to be opaque. I have tried playing around with

WindowUtils.setWindowMask(this, mask); WindowUtils.setWindowAlpha(this, 0.5f);

... etc., but I've only ever been able to make one part (the mask) translucent, and everything in that mask shares the same translucency. I would like to have several clippings, some that are somewhat translucent, and others that I draw in which should then be fully opaque. Is this a possibility?

WindowUtils.setWindowTransparent(w, true);

On w32, you'll need to ensure sun.java2d.noddraw=false

Anything not painted will be transparent. The alpha of any painted pixels will be applied to the window. This should be combined with a window mask to ensure window events are not processed in fully transparent areas.