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

Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.