HTML5 Zone is brought to you in partnership with:

Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2573 posts at DZone. You can read more from them at their website. View Full User Profile

SVG Filter Effects Tutorial and Demo on IE10

10.17.2011
| 3986 views |
  • submit to reddit
Jennifer Yu has provided a new SVG tutorial over at the IE blog.  The tutorial can help get you acquainted with this feature of SVG, which is coming soon to IE10 and available on several other browsers as well.

An SVG Filter defines an operation on a graphical input. Just like other HTML elements, filters are declarative in nature and have a supporting DOM for dynamic manipulation. A filter is applied to an SVG element via the filter attribute, in the form of filter="url(#filterId)", or it can be applied as a CSS property filter:url(#filterId). Each filter is composed of one or more filter primitives, which are the basic building blocks for creating nifty effects. Each applies a fundamental effect to a graphic. To form more complex effects, filter primitives can be chained together, feeding the output of one to the input of another. When a filter is applied to an SVG element, that SVG element is used as the source graphic for the filter or the first filter in a chain.



Here's an SVG pig after applying a filter that multiplies the image with a photo of the sky

You'll need to download the Windows 8 developer preview to run the supported IE10 preview, or you can wait for the update to the IE10 preview for Windows 7.
References
Reference: http://blogs.msdn.com/b/ie/archive/2011/10/14/svg-filter-effects-in-ie10.aspx