Hi there,

I have created a load of custom JComponents, many of which are not
rectangular.
I do my painting using Java2D.

The components can be dragged around the screen (the components are part of
a RAD kit)

I'd like to add a "eye-candy" shadow effect to the components while they are
being dragged, so that it adds a feel of depth to the application.  When the
component is released the shadow is supposed to disappear.

So far I've created my shadows by displacing the component by (10, 10) and
painted it using a light grey, and then painting the component on top.
There is no alpha blending.

One problem is that it only really works for rectangular components, because
they fill their entire "canvas". Non-rectangular components don't so, I fill
the canvas with a subimage of the background image before painting the
button.

I'm wondering if there is a more efficient way of doing this?  (and I don't
really know where to start).
For instance, if I use alpha blending for the shadow, do I need to fill the
canvas with a subimage of the background image before painting the button,
or can I simply adjust the alpha of the shadow?

Any ideas? Do you have any references I could look up?

Thanks

Jon


Visit our website at http://www.rm.com

Standard Disclaimer:This message is confidential.  You should not copy it or
disclose its contents to anyone.  You may use and apply the information only
for the intended purpose.  Internet communications are not secure and
therefore RM does not accept legal responsibility for the contents of this
message.  Any views or opinions presented are only those of the author and
not those of RM.  If this email has come to you in error please delete it
and any attachments.  Please note that RM may intercept incoming and
outgoing e-mail communications.

===========================================================================
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