O'Reilly logo

Sams Teach Yourself SVG in 24 Hours by Micah Laaker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Merging Filter Primitives with feMerge

Now that you're able to blur and move an object, you're almost able to create a drop shadow filter. All that is left is to find a method of combining these primitives into one filter and performing the first step in the drop shadow operation (mentioned at the beginning of the last section). As said repeatedly in this book, any way to reduce the amount of code needed should be taken. In the case of the drop shadow filter, you'll need to have a shadow of the same shape as the main object offset blurred behind the main object.

Though you can certainly apply these effects on another instance of the desired object, you will end up with unnecessarily duplicated code. Instead, use feMerge. feMerge allows an object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required