Anyone know how I could add a watermark to a drawing area?

Currently, I use

    <draw a bunch of stuff to graphics2d>
    graphics2d.setComposite( AlphaComposite.getInstance(
                AlphaComposite.SRC_OVER, 0.5f ) );
    graphics2d.drawImage( image, transform, component );

This works okay since my drawing area's background color is black and so is
the watermark image.  But, when something is drawn over the watermark it is
slightly obscured even between the colored pixels.

What I'd like to see is that the black pixels of the watermark image are
treated as "clear" so that shapes drawn there are not obscured at all.

One way I thought to do this was to draw the watermark explicitly as a bunch
of GeneralPath objects.

Any suggestions?

---
Thomas McKay

Project Leader
Microcosm Technologies, Inc.
mailto:[EMAIL PROTECTED]

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