Skip to Main Content
SVG for Web Developers
book

SVG for Web Developers

by Ellen Pearlman, Lorien House
December 2002
Beginner to intermediate content levelBeginner to intermediate
464 pages
8h 34m
English
Pearson
Content preview from SVG for Web Developers

Masking

Whereas clipping paths create hard-edged, cut-out shapes, a mask applied to an object creates the effect of fading the object's edges into the background or seeing the object through a gauzy curtain. Whereas a clipping path uses only the boundaries of a shape to create a cut-out, a mask uses alpha and color values to composite an object into the background. Masks, like <clipPaths>, are container elements that can contain either graphic elements or other container elements. Each masked pixel value can range from fully transparent to fully opaque.

A mask is created by defining a <mask> element in much the same way that a <clipPath> element is defined. The <mask> element is then named with an id attribute so that it can be referenced by ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Applications with SVG

Building Web Applications with SVG

Jon Frost David Dailey and Domenico Strazzullo
SVG Text Layout

SVG Text Layout

Amelia Bellamy-Royds, Kurt Cagle
Using SVG with CSS3 and HTML5

Using SVG with CSS3 and HTML5

Amelia Bellamy-Royds, Kurt Cagle, Dudley Storey

Publisher Resources

ISBN: 0131004999Purchase book