Clipping Paths

Finally, I want to show you a technique using SVG clipping paths, which you can use to great creative effect. What a clipping path does is similar to taking a pair of scissors and cutting out a shape. SVG allows you to “cut out” noncontinuous shapes, such as text.

The final clipping path looks like the one shown in Figure 16.04.

Figure 16.04. An SVG clipping path used with two bitmap images to create interesting text.

If you look closely at the fill of the lettering, you might recognize that the left part of the text is filled with an image of a sunset, of which you see the full version in Figure 16.05.

Figure 16.05. The sunset ...

Get Designing SVG Web Graphics 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.