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

Creating New Filters

Making your own filter is as easy as experimenting with a combination of primitives. Nonetheless, filter primitives are often based on complex mathematics, and may seem prohibitive to beginners. Don't get overwhelmed; rather, play around with the values and possibilities with each primitive (and combinations thereof). The worst that could happen is that your display isn't as you'd hoped!

Important tips to remember, though, while assembling custom filters are:

  1. Make sure your in values correspond to the correct result values.

  2. Are you using the correct filterUnits value? Switch between userSpaceOnUse and objectBoundingBox to see which viewport is most appropriate for your effect.

  3. In some cases, your primitive's in value should ...

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