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

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.