• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 10. Using Filters > Merging Filter Primitives with feMerge

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 to be loaded several times with different effects, all within one filter element. If you wanted to apply a drop shadow to the sun in the news center graphic, you could use feMerge to load a copy of the sun (with the blur and offset primitives applied) underneath another copy of the sun (with no primitives applied).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint