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

Patterns

Note

You must have the SVG viewer 3.0 and higher to view patterns.

Objects can be filled with interesting patterns in SVG. To create a pattern, use the <pattern> element, then define the pattern as a drawing within that element. Like gradients, patterns are defined within the <defs> element. The <pattern> element is then given an id value and is referenced by either the fill or stroke value of an object. Figure 5-14 shows a pattern applied to an ellipse.

Figure 5-14. Pattern applied to an ellipse.

Take a careful look at this image. One slanted triangle has been defined as a path, and that path has been placed inside a <pattern> element. ...

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