Hi,

Do you use only fully opaque painting when drawing in your ComponentUIs ?
As I'm not fully aware with performance in terms of opacity, I can't say it 
will always be a better idea to go for opacity tricks.
However, here is my thought about a way to do such an effect (linear aqua 
gloss) :

Just create a gradient, going for the brightest color you want to see on 
your..glare to the same color, but with transparent opacity :
>From RGB(255,255,255,255) to RGB(255,255,255,0) for example.

The coordinates of this gradient are (if vertical) :
(0,0) to (0, component height)

Then fill a gradient rectangle using these coordinates (still an example) :
(0,0) to (0, component height / 2 )

It usually works quite well on simple glass effects.
You could also fill any other shape, for example something a bit rounded to add 
shape to your pane or button.


Whether you want to do aqua painting or linear gradient painting, some parts or 
others of this technique should work better for you.

Let me know about it,
Cheers,
Steve
[Message sent by forum member 'artscoop' (artscoop)]

http://forums.java.net/jive/thread.jspa?messageID=299842

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to