I'm creating an "amazing" effect to show a product (that brilliant 'absolutedy need it' from the customer!).
I've already realized the effect http://jsfiddle.net/EMpQd/9/ (it's easier to see than to explain).
My problem is: setting a rectangle in the background, and then a circle on top of it, I need to get transparency not only in the circle, but also in the rectangle, in the section covered by the circle (aka the intersection).
How I can achieve this? Is this possible with Raphael?
code for the effect (without transparency):
var w = 800;
var h = 600;
var paper = Raphael(0, 0, w, h);
// I want to show this image through the effect (it's just an example)
paper.image("http://static.pourfemme.it/pfmoda/fotogallery/625X0/63617/borsa-alviero-martini-rodeo-drive.jpg", 0, 0, w, h);
// colored background
paper.rect(0, 0, w, h).attr("fill", "#999").attr("stroke-width", 0).attr("opacity", 1);
// the circle in which I'll show the product
var circle = paper.circle(400, 300, 1);
circle.attr({fill: "#FFF", stroke: "#FFF", "stroke-width": 0});
//expand the circle
circle.animate({r: w*2}, 10000);