SVG: Clipping, Masking, and Filters

SVG: Clipping, Masking, and Filters

2h 20mAdvanced2018-08-30

Authors

Morten Rand-Hendriksen

Morten Rand-Hendriksen

Senior Staff Instructor, Speaker, Web Designer, and Software Developer

Course details

Do more with SVG. Many web designers and developers leverage the power of SVG for just that: Scalable Vector Graphics. But few realize that SVG also enables you to create code-based visual effects—the kind of graphics that used to be possible only in programs like Photoshop. Take a deep dive into the advanced visual features available in the Scalable Vector Graphics format, including clipping, masking, and filters, in this course with Morten Rand-Hendriksen. Learn how to use the clipPath, mask, and various filter elements to create clipping masks, alpha layers, and effects such as blurring and sharpening, color correction, extrusion, and advanced compositing. Morten includes a detailed breakdown of all the available filters in SVG, along with examples that show the advantages of code-based visual effects.

Learning objectives
How clipping and masking work in SVG
The mask coordinate system
The filter elements
Combining filters
Filter primitives
Using SVG filters

Skills covered

Web GraphicsWeb DesignProgramming LanguagesSoftware DevelopmentDeep Dive (X:Y)

Concepts

Introduction

  • Clipping, masking, and filtering SVG
  • Prerequisites

Clipping and Masking

  • How clipping and masking works
  • The clipPath element
  • A basic clipping example
  • The clipPath coordinate system
  • The mask element
  • A basic mask example
  • The mask coordinate system

SVG Filters

  • How SVG filters work
  • The filter element
  • A basic filter example
  • Combining multiple filters
  • Filter regions and sub-regions

SVG Filters and What They Do

  • A walkthrough of SVG filter primitives
  • feImage
  • feTile
  • feFlood
  • feBlend
  • feGaussianBlur
  • feMerge
  • feOffset
  • feMorphology
  • feComposite
  • feComponentTransfer
  • feColorMatrix, part 1
  • feColorMatrix, part 2
  • feDiffuseLighting
  • feSpecularLighting
  • feTurbulence
  • feDisplacementMap
  • feConvolveMatrix

Using SVG Filters

  • Duotone images
  • Extruded text
  • Mixing multiple filters

Going Further

  • SVG filters in the real world
80,000 Toman