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

Chapter 6. Filter Effects > The <filter> Element

The <filter> Element

Filters in SVG are complex, but with a little effort, amazing results can be achieved. A filter effect is actually a series of graphics operations applied to a given source graphic that produces a modified graphical result. The result of the filter effect is applied to the target graphic instead of to the original source graphic.

The <filter> element is used to define a filter, then that element is assigned an id attribute name. Utilizing the name of the id attribute in a coded statement references that particular <filter> element. Throughout this book, we will always place the <filter> element within a <defs> element. However, unlike gradients and patterns, which must be placed within a <defs> element, a filter does not have to be placed within a <defs> element. It is, however, a good idea to use <defs> elements for all your reusable code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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