How can one add drop shadows to Raphael.js objects?

Adding a link to Raphael. Blur in a separate answer, per the OP's request.

Adding a link to Raphael. Blur in a separate answer, per the OP's request. github.com/DmitryBaranovskiy/raphael/blo... Updated code sample: var shadow = canvas.

Path(p); shadow. Attr({stroke: "none", fill: "#555", translation: "4,4"}); shadow. Blur(4); var shape = canvas.

Path(p); Note that in Dmitry's comments he mentions that there is no WebKit support. He uses the element and the feGaussianBlur filter effect. WebKit has implemented the feGaussianBlur effect, but filters are unstable and are disabled in Safari (it may work in Chrome 5 - should definitely work in Chrome 6).

Is the . Blur function undocumented? Can't find it anywhere on the Raphael docs.

Or is it native? – Sudhir Jonathan Mar 24 '11 at 9:04 It is a Raphael plugin. You can get it at the link above and include it in your page after raphael.js.

– C-Mo Mar 24 '11 at 20:00.

The easiest way to do it is simply to draw the object with a shadow-colored fill, offset by a few pixels, and then draw the actual object on top. Var shadow = canvas. Path(p); shadow.

Attr({stroke: "none", fill: "#555", translation: "4,4"}); var shape = canvas. Path(p); You can also adjust the opacity attribute if needed.

But a shadow colored fill will have a solid edge. I am looking for an edge that blurry, from light gray to 0% alpha. You know?

– pylonicon Oct 7 '10 at 3:38 1 Raphael does have a blur plugin. I've never used it, so I can't vouch for it, but it's by Dmitry so we can assume he knows what he's doing ;-) github.com/DmitryBaranovskiy/raphael/blo...… – C-Mo Oct 7 '10 at 4:03 Oh that is interesting. You should submit it as an answer and I will accept it.

If you don't then I will answer it myself with in 3 days. Thanks. Still drop shadow should be coded into Raphael to make it simpler.

– pylonicon Oct 7 '10 at 18:39.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions