How to draw a translucent filled rectangle?

Hi,

Let’s say I have some picture. I want to draw over it a rectangle filled with blue color, and I want it to have, let’s say 30% opacity. How can I do this in the most memory-effective way?

2 solutions:

1.) Color e.g. Color(100, 100, 100, 100)
2.) AlphaComposite

but I would suggest to use method 1.) for what you plan to do…

lg Clemens