<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://commons.oreilly.com/wiki/skins/common/feed.css?97"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;action=history&amp;feed=atom</id>
		<title>SVG Essentials/Patterns and Gradients - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;action=history&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;action=history"/>
		<updated>2013-05-26T09:10:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.11.0</generator>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=7373&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=7373&amp;oldid=prev"/>
				<updated>2008-03-07T13:40:50Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:40, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=6038&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=6038&amp;oldid=prev"/>
				<updated>2008-03-07T12:51:41Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:51, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3706&amp;oldid=prev</id>
		<title>Evanlenz: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3706&amp;oldid=prev"/>
				<updated>2008-03-06T23:40:35Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:40, 6 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Evanlenz</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3705&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3705&amp;oldid=prev"/>
				<updated>2008-03-06T23:33:32Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:33, 6 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3247&amp;oldid=prev</id>
		<title>Evanlenz: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3247&amp;oldid=prev"/>
				<updated>2008-03-06T22:52:43Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:52, 6 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Evanlenz</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3246&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=3246&amp;oldid=prev"/>
				<updated>2008-03-06T22:38:57Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:38, 6 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=2661&amp;oldid=prev</id>
		<title>Evanlenz: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=2661&amp;oldid=prev"/>
				<updated>2008-03-06T22:22:04Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:22, 6 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Evanlenz</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=2660&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=2660&amp;oldid=prev"/>
				<updated>2008-03-06T22:21:01Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:21, 6 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-1. Zoomed-in view of pattern tile'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-1. Zoomed-in view of pattern tile'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt145&lt;/del&gt;.png|Zoomed-in view of pattern tile]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt145&lt;/ins&gt;.png|Zoomed-in view of pattern tile]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-2. Tiles spaced by objectBoundingBox'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-2. Tiles spaced by objectBoundingBox'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt146&lt;/del&gt;.png|Tiles spaced by objectBoundingBox]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt146&lt;/ins&gt;.png|Tiles spaced by objectBoundingBox]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 86:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 86:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-3. Tiles spaced by userSpaceOnUse'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-3. Tiles spaced by userSpaceOnUse'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt147&lt;/del&gt;.png|Tiles spaced by userSpaceOnUse]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt147&lt;/ins&gt;.png|Tiles spaced by userSpaceOnUse]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 140:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 140:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-4. patternContentUnits set to objectBoundingBox'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-4. patternContentUnits set to objectBoundingBox'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt148&lt;/del&gt;.png|patternContentUnits&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt148&lt;/ins&gt;.png|patternContentUnits&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set to objectBoundingBox]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;set to objectBoundingBox]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 166:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 166:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-5. Pattern scaled with viewBox'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-5. Pattern scaled with viewBox'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt149&lt;/del&gt;.png|Pattern scaled with&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt149&lt;/ins&gt;.png|Pattern scaled with&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   viewBox]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   viewBox]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-6. Patterns within patterns'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-6. Patterns within patterns'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt150&lt;/del&gt;.png|Patterns within patterns]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt150&lt;/ins&gt;.png|Patterns within patterns]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 228:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 228:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-7. Simple two-color gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-7. Simple two-color gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt151&lt;/del&gt;.png|Simple two-color gradient]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt151&lt;/ins&gt;.png|Simple two-color gradient]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 253:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 253:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-8. Three-stop gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-8. Three-stop gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt152&lt;/del&gt;.png|Three-stop gradient]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt152&lt;/ins&gt;.png|Three-stop gradient]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 306:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 306:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-9. Defining vectors for a linear gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-9. Defining vectors for a linear gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt153&lt;/del&gt;.png|Defining vectors for a linear gradient]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt153&lt;/ins&gt;.png|Defining vectors for a linear gradient]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 371:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 371:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-10. spreadMethod values pad, repeat, and reflect for a linear gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-10. spreadMethod values pad, repeat, and reflect for a linear gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt154&lt;/del&gt;.png|spreadMethod values&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt154&lt;/ins&gt;.png|spreadMethod values&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   pad,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   pad,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   repeat, and&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   repeat, and&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 399:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 399:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-11. Radial gradient with three stops'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-11. Radial gradient with three stops'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt155&lt;/del&gt;.png|Radial gradient with three stops]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt155&lt;/ins&gt;.png|Radial gradient with three stops]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 425:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 425:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-12. Setting limits for a radial gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-12. Setting limits for a radial gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt156&lt;/del&gt;.png|Setting limits for a radial gradient]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt156&lt;/ins&gt;.png|Setting limits for a radial gradient]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 451:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 451:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-13. Setting focal point for a radial gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-13. Setting focal point for a radial gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt157&lt;/del&gt;.png|Setting focal point for a radial gradient]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt157&lt;/ins&gt;.png|Setting focal point for a radial gradient]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 512:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 512:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-14. spreadMethod values pad, repeat, and reflect for a radial gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-14. spreadMethod values pad, repeat, and reflect for a radial gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt158&lt;/del&gt;.png|spreadMethod values&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt158&lt;/ins&gt;.png|spreadMethod values&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   pad,&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   pad,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   repeat, and&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;   repeat, and&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 575:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 575:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-15. Transformation of a pattern and gradient'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Figure 7-15. Transformation of a pattern and gradient'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials/I_7_tt159&lt;/del&gt;.png|Transformation of a pattern and gradient]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:SVG &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Essentials_I_7_tt159&lt;/ins&gt;.png|Transformation of a pattern and gradient]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:2421:newid:2660 --&gt;
&lt;/table&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=2421&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=SVG_Essentials/Patterns_and_Gradients&amp;diff=2421&amp;oldid=prev"/>
				<updated>2008-03-04T22:37:00Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{SVG Essentials/TOC}}&lt;br /&gt;
To this point, we have used only solid colors to fill and outline graphic objects. You are not restricted to using solid colors; you may also use a pattern or a gradient to fill or outline a graphic. That's what we'll examine in this chapter.&lt;br /&gt;
&lt;br /&gt;
== Patterns ==&lt;br /&gt;
&lt;br /&gt;
To use a pattern, you define a graphic object that is replicated horizontally and vertically to fill another object (or stroke). This graphic object is called a tile, because the act of filling an object with a pattern is very much like covering an area of a floor with tiles. In this section, we will use the quadratic curve drawn by the SVG in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-1|Example 7-1]] as our tile. It's outlined in gray to show its area (20 by 20 user units) clearly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-1&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-1. Path for a pattern tile'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 Q 5 20 10 10 T 20 20&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: black; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 h20 v20 h-20 z&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: gray; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-1|Figure 7-1]] is zoomed in so you can see it in detail.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-1&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-1. Zoomed-in view of pattern tile'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt145.png|Zoomed-in view of pattern tile]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== patternUnits ===&lt;br /&gt;
&lt;br /&gt;
To create a pattern tile, you must enclose the &amp;lt;tt&amp;gt;&amp;lt;path&amp;gt;&amp;lt;/tt&amp;gt; elements that describe your tile in a &amp;lt;tt&amp;gt;&amp;lt;pattern&amp;gt;&amp;lt;/tt&amp;gt; element, and then make several decisions. The first decision is how you wish to space the tiles, and this is reflected in the &amp;lt;tt&amp;gt;patternUnits&amp;lt;/tt&amp;gt; attribute. Do you want the tiles spaced to fill a certain percentage of each object they're applied to, or you do want them spaced at equal intervals, no matter what the size of the object they're filling?&lt;br /&gt;
&lt;br /&gt;
If you want the tile dimensions on an object-by-object basis, you specify the pattern's upper left &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; coordinates, and its &amp;lt;tt&amp;gt;width&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;height&amp;lt;/tt&amp;gt; as percentages or decimals in the range zero to one, and set the &amp;lt;tt&amp;gt;patternUnits&amp;lt;/tt&amp;gt; attribute to &amp;lt;tt&amp;gt;objectBoundingBox&amp;lt;/tt&amp;gt;. An object's bounding box is the smallest rectangle that completely encloses a particular graphic object. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-2|Example 7-2]] shows the sample tile replicated five times horizontally and five times vertically in any object that it fills.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-2&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-2. Tiles spaced with patternUnits set to objectBoundingBox'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;tile&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;20%&amp;quot; height=&amp;quot;20%&amp;quot;&lt;br /&gt;
     patternUnits=&amp;quot;objectBoundingBox&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 Q 5 20 10 10 T 20 20&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: black; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 h 20 v 20 h -20 z&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: gray; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/pattern&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;135&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;70&amp;quot; height=&amp;quot;80&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;220&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;150&amp;quot; height=&amp;quot;130&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-2|Figure 7-2]], the leftmost rectangle, which is 100 user units wide and tall, provides an exact fit for five tiles that are each 20 user units wide and tall. In the middle rectangle, the width and height aren't great enough to show any one pattern tile completely, so they are truncated. In the rightmost rectangle, extra space is added since the rectangle's width and height exceeds five times the space required for a single tile. In all cases, since we set &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt;, the upper left corner of the tile coincides with the upper left corner of the rectangle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-2&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-2. Tiles spaced by objectBoundingBox'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt146.png|Tiles spaced by objectBoundingBox]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're used to most graphics programs, this behavior comes as somewhat of a shock. Typical graphic editing programs put tiles directly next to one another to fill the area, no matter what its size. There is never extra padding between tiles, and tiles are cut off only by the edge of the object they're filling. If this is the behavior that you want, you must set the &amp;lt;tt&amp;gt;patternUnits&amp;lt;/tt&amp;gt; attribute to &amp;lt;tt&amp;gt;userSpaceOnUse&amp;lt;/tt&amp;gt;, and specify the &amp;lt;tt&amp;gt;x&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y&amp;lt;/tt&amp;gt; coordinates, and the &amp;lt;tt&amp;gt;width&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;height&amp;lt;/tt&amp;gt; of the tile in user units. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-3|Example 7-3]] uses the sample tile, set to its exact width and height of twenty user units.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-3&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-3. Tiles spaced with patternUnits set to userSpaceOnUse'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;tile&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;20&amp;quot; height=&amp;quot;20&amp;quot;&lt;br /&gt;
     patternUnits=&amp;quot;userSpaceOnUse&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 Q 5 20 10 10 T 20 20&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: black; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 h 20 v 20 h -20 z&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: gray; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/pattern&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;135&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;70&amp;quot; height=&amp;quot;80&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;220&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;150&amp;quot; height=&amp;quot;130&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-3|Figure 7-3]], the tiles have constant size in all three rectangles. Their alignment is, however, dependent upon the underlying coordinate system. The middle rectangle, for example, has an ''x''-coordinate that is not a multiple of twenty, so the rectangle's upper left corner doesn't coincide with a tile's upper left corner. (The top edges do align, since the upper ''y''-coordinate of all three rectangles was carefully chosen to be a multiple of twenty.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-3&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-3. Tiles spaced by userSpaceOnUse'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt147.png|Tiles spaced by userSpaceOnUse]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
'''Warning'''&lt;br /&gt;
&lt;br /&gt;
If you do not specify a value for &amp;lt;tt&amp;gt;patternUnits&amp;lt;/tt&amp;gt;, the default is &amp;lt;tt&amp;gt;objectBoundingBox&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== patternContentUnits ===&lt;br /&gt;
&lt;br /&gt;
You must next decide what units are to be used to express the pattern data itself. By default, the &amp;lt;tt&amp;gt;patternContentUnits&amp;lt;/tt&amp;gt; attribute is set to &amp;lt;tt&amp;gt;userSpaceOnUse&amp;lt;/tt&amp;gt;. If you set the attributes to &amp;lt;tt&amp;gt;objectBoundingBox&amp;lt;/tt&amp;gt;, the path data points are expressed in terms of the object being filled. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-4|Example 7-4]] shows the SVG that produces [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-4|Figure 7-4]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
If you use the &amp;lt;tt&amp;gt;objectBoundingBox&amp;lt;/tt&amp;gt; for your &amp;lt;tt&amp;gt;patternContentUnits&amp;lt;/tt&amp;gt;, you should draw any objects to be filled with the upper left corner of their bounding boxes at the origin (0, 0). Also, you will have to reduce the &amp;lt;tt&amp;gt;stroke-width&amp;lt;/tt&amp;gt; of the pattern data to 0.01, since these units are percentages, not user units.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-4&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-4. patternContentUnits set to objectBoundingBox'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;tile&amp;quot;&lt;br /&gt;
     patternUnits=&amp;quot;objectBoundingBox&amp;quot;&lt;br /&gt;
     patternContentUnits=&amp;quot;objectBoundingBox&amp;quot;&lt;br /&gt;
      x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;.2&amp;quot; height=&amp;quot;.2&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;path d=&amp;quot;M 0 0 Q .05 .20 .10 .10 T .20 .20&amp;quot;&lt;br /&gt;
         style=&amp;quot;stroke: black; fill: none; stroke-width: 0.01;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;path d=&amp;quot;M 0 0 h 0.2 v 0.2 h-0.2z&amp;quot;&lt;br /&gt;
         style=&amp;quot;stroke: black; fill: none; stroke-width: 0.01;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/pattern&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;g transform=&amp;quot;translate(20,20)&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/g&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;g transform=&amp;quot;translate(135,20)&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;70&amp;quot; height=&amp;quot;80&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/g&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;g transform=&amp;quot;translate(220,20)&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;150&amp;quot; height=&amp;quot;130&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/g&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-4&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-4. patternContentUnits set to objectBoundingBox'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt148.png|patternContentUnits&lt;br /&gt;
set to objectBoundingBox]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to reduce an existing graphic object for use as a tile, it's easier to use the &amp;lt;tt&amp;gt;viewBox&amp;lt;/tt&amp;gt; attribute to scale it. Specifying &amp;lt;tt&amp;gt;viewBox&amp;lt;/tt&amp;gt; will override any &amp;lt;tt&amp;gt;patternContentUnits&amp;lt;/tt&amp;gt; information. Another possible option is to use the &amp;lt;tt&amp;gt;preserveAspectRatio&amp;lt;/tt&amp;gt; attribute, as described in [[SVG Essentials/Coordinates|Chapter 2]], in [[SVG Essentials/Coordinates#Preserving Aspect Ratio|Section 2.4]]. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-5|Example 7-5]] uses a scaled-down version of the cubic polybézier curve from [[SVG Essentials/Paths#svgess-CHP-6-FIG-12|Figure 6-12]] as a tile. The &amp;lt;tt&amp;gt;stroke-width&amp;lt;/tt&amp;gt; is set to 5; otherwise, when scaled down, the pattern you see in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-5|Figure 7-5]] would not be visible.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-5&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-5. Using viewBox to scale a pattern'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;tile&amp;quot;&lt;br /&gt;
     patternUnits=&amp;quot;userSpaceOnUse&amp;quot;&lt;br /&gt;
     x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;20&amp;quot; height=&amp;quot;20&amp;quot;&lt;br /&gt;
     viewBox=&amp;quot;0 0 150 150&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;path d=&amp;quot;M30 100 C 50 50, 70 20, 100 100, 110, 130, 45, 150, 65, 100&amp;quot;&lt;br /&gt;
         style=&amp;quot;stroke: black; stroke-width: 5; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/pattern&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-5&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-5. Pattern scaled with viewBox'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt149.png|Pattern scaled with&lt;br /&gt;
   viewBox]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Nested Patterns ===&lt;br /&gt;
&lt;br /&gt;
Again, this may have occurred to you: &amp;quot;If an object can be filled with a pattern, can ''that'' pattern be filled with a pattern as well?&amp;quot; The answer is yes. As opposed to nested markers, which are rarely necessary, there are some effects you can't easily achieve without nested patterns. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-6|Example 7-6]] creates a rectangle filled with circles, all filled with horizontal stripes. This produces the unusual, but valid, polka-dot effect shown in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-6|Figure 7-6]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-6&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-6. Nested patterns'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;stripe&amp;quot;&lt;br /&gt;
     patternUnits=&amp;quot;userSpaceOnUse&amp;quot;&lt;br /&gt;
      x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;6&amp;quot; height=&amp;quot;6&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;path d=&amp;quot;M 0 0 6 0&amp;quot;&lt;br /&gt;
         style=&amp;quot;stroke: black; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/pattern&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;polkadot&amp;quot;&lt;br /&gt;
     patternUnits=&amp;quot;userSpaceOnUse&amp;quot;&lt;br /&gt;
     x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;36&amp;quot; height=&amp;quot;36&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;circle cx=&amp;quot;12&amp;quot; cy=&amp;quot;12&amp;quot; r=&amp;quot;12&amp;quot;&lt;br /&gt;
         style=&amp;quot;'''fill: url(#stripe);'''  stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/pattern&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;36&amp;quot; y=&amp;quot;36&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#polkadot); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-6&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-6. Patterns within patterns'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt150.png|Patterns within patterns]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Gradients ==&lt;br /&gt;
&lt;br /&gt;
Rather than filling an object with a solid color, you can fill it with a gradient, a smooth color transition from one shade to another. Gradients can be linear, where the color transition occurs along a straight line, or radial, where the transition occurs along a circular path.&lt;br /&gt;
&lt;br /&gt;
=== linearGradient ===&lt;br /&gt;
&lt;br /&gt;
A linear gradient is a transition through a series of colors along a straight line. You specify the colors you want at specific locations, called gradient stops. The stops are part of the structure of the gradient; the colors are part of the presentation. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-7|Example 7-7]] shows the SVG for a gradient that fills a rectangle with a smooth transition from gold to cyan, which you can see in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-7|Figure 7-7]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-7&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-7. Simple two-color gradient'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;two_hues&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #ffcc00;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #0099cc;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/linearGradient&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;200&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#two_hues);  stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-7&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-7. Simple two-color gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt151.png|Simple two-color gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The stop element ====&lt;br /&gt;
&lt;br /&gt;
Let's examine the &amp;lt;tt&amp;gt;&amp;lt;stop&amp;gt;&amp;lt;/tt&amp;gt; element more closely. It has two required attributes; the &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; tells the point along the line at which the color should be equal to the &amp;lt;tt&amp;gt;stop-color&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt; is expressed as a percentage from 0 to 100% or as a decimal value from 0 to 1.0. While you don't need to place stops at 0% and 100%, you usually will. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-8|Example 7-8]] is a slightly more complex linear gradient, with stops for gold at 0%, reddish-purple at 33.3%, and light green at 100%; it is shown in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-8|Figure 7-8]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-8&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-8. Three-color gradient'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;three_stops&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #ffcc00;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;33.3%&amp;quot; style=&amp;quot;stop-color: #cc6699&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #66cc99;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/linearGradient&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;200&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#three_stops); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-8&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-8. Three-stop gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt152.png|Three-stop gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Establishing a transition line for a linear gradient ====&lt;br /&gt;
&lt;br /&gt;
The default behavior of a linear gradient is to transition along a horizontal line from the left side of an object to its right side. If you want the transition of colors to occur across a vertical line or a line at an angle, you must specify the line's starting point with the &amp;lt;tt&amp;gt;x1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y1&amp;lt;/tt&amp;gt; attributes and its ending points with the &amp;lt;tt&amp;gt;x2&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y2&amp;lt;/tt&amp;gt; attributes. By default, these are also expressed as percentages from 0% to 100% or decimals from 0 to 1. In [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-9|Example 7-9]], we'll use the same color stops in a horizontal, vertical, and diagonal gradient. Rather than duplicate the stops into each &amp;lt;tt&amp;gt;&amp;lt;linearGradient&amp;gt;&amp;lt;/tt&amp;gt; element, we'll use the &amp;lt;tt&amp;gt;xlink:href&amp;lt;/tt&amp;gt; attribute to refer to the original left-to-right gradient. The stops will be inherited, but the ''x''- and ''y''-coordinates will be overriden by each individual gradient. The arrows in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-9|Figure 7-9]] do not appear in the SVG of [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-9|Example 7-9]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-9&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-9. Defining vectors for a linear gradient'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;three_stops&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #ffcc00;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;33.3%&amp;quot; style=&amp;quot;stop-color: #cc6699&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #66cc99;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/linearGradient&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;right_to_left&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#three_stops&amp;quot;&lt;br /&gt;
     x1=&amp;quot;100%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;0%&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;down&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#three_stops&amp;quot;&lt;br /&gt;
     x1=&amp;quot;0%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;100%&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;up&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#three_stops&amp;quot;&lt;br /&gt;
     x1=&amp;quot;0%&amp;quot; y1=&amp;quot;100%&amp;quot; x2=&amp;quot;0%&amp;quot; y2=&amp;quot;0%&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;diagonal&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#three_stops&amp;quot;&lt;br /&gt;
     x1=&amp;quot;0%&amp;quot; y1=&amp;quot;0%&amp;quot; x2=&amp;quot;100%&amp;quot; y2=&amp;quot;100%&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;40&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;200&amp;quot; height=&amp;quot;40&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#three_stops); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;40&amp;quot; y=&amp;quot;70&amp;quot; width=&amp;quot;200&amp;quot; height=&amp;quot;40&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#right_to_left); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;250&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;40&amp;quot; height=&amp;quot;200&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#down); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;300&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;40&amp;quot; height=&amp;quot;200&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#up); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;40&amp;quot; y=&amp;quot;120&amp;quot; width=&amp;quot;200&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#diagonal); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-9&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-9. Defining vectors for a linear gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt153.png|Defining vectors for a linear gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
If you wish to establish the transition line using user space coordinates instead of percentages, set the &amp;lt;tt&amp;gt;gradientUnits&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;userSpaceOnUse&amp;lt;/tt&amp;gt; instead of the default value, which is &amp;lt;tt&amp;gt;objectBoundingBox&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The spreadMethod attribute ====&lt;br /&gt;
&lt;br /&gt;
The transition line does not have to go from one corner of an object to another. What happens if you say that the transition line goes from (20%, 30%) to (40%, 80%)? What happens to the part of the object outside that line? You can set the &amp;lt;tt&amp;gt;spreadMethod&amp;lt;/tt&amp;gt; attribute to one of these values:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;pad&amp;lt;/tt&amp;gt;&lt;br /&gt;
: The beginning and ending stop colors will be extended to the edges of the object.&lt;br /&gt;
;&amp;lt;tt&amp;gt;repeat&amp;lt;/tt&amp;gt;&lt;br /&gt;
: The gradient will be repeated start-to-end until it reaches the edges of the object being filled.&lt;br /&gt;
;&amp;lt;tt&amp;gt;reflect&amp;lt;/tt&amp;gt;&lt;br /&gt;
: The gradient will be reflected end-to-start, start-to-end until it reaches the edges of the object being filled.&lt;br /&gt;
&lt;br /&gt;
[[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-10|Figure 7-10]] shows the leftmost square's gradient padded, the middle square's gradient repeated, and the right square's gradient reflected. The original transition line has been added to the SVG for each square in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-10|Example 7-10]] to make the effect easier to detect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-10&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-10. Effects of spreadMethod values on a linear gradient'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;partial&amp;quot;&lt;br /&gt;
     '''x1=&amp;quot;20%&amp;quot; y1=&amp;quot;30%&amp;quot; x2=&amp;quot;40%&amp;quot; y2=&amp;quot;80%&amp;quot;'''&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #ffcc00;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;33.3%&amp;quot; style=&amp;quot;stop-color: #cc6699&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #66cc99;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/linearGradient&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;padded&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#partial&amp;quot;&lt;br /&gt;
     spreadMethod=&amp;quot;pad&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;repeated&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#partial&amp;quot;&lt;br /&gt;
     spreadMethod=&amp;quot;repeat&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;reflected&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#partial&amp;quot;&lt;br /&gt;
     spreadMethod=&amp;quot;reflect&amp;quot;/&amp;gt;&lt;br /&gt;
     &lt;br /&gt;
 &amp;lt;line id=&amp;quot;show-line&amp;quot; x1=&amp;quot;20&amp;quot; y1=&amp;quot;30&amp;quot; x2=&amp;quot;40&amp;quot; y2=&amp;quot;80&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: white;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#padded); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;use xlink:href=&amp;quot;#show-line&amp;quot; transform=&amp;quot;translate (20,20)&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;130&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#repeated); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;use xlink:href=&amp;quot;#show-line&amp;quot; transform=&amp;quot;translate (130,20)&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;240&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#reflected); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;use xlink:href=&amp;quot;#show-line&amp;quot; transform=&amp;quot;translate (240,20)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-10&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-10. spreadMethod values pad, repeat, and reflect for a linear gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt154.png|spreadMethod values&lt;br /&gt;
   pad,&lt;br /&gt;
   repeat, and&lt;br /&gt;
   reflect for a linear gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== radialGradient ===&lt;br /&gt;
&lt;br /&gt;
The other type of gradient you can use is the radial gradient, where the color transition occurs along a circular path.&amp;lt;ref&amp;gt;If the bounding box of the object being filled is not square, the transition path will become elliptical to match the aspect ratio of the bounding box.&amp;lt;/ref&amp;gt; It's set up in much the same way as a linear gradient. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-11|Example 7-11]] sets three stops, which, as you see in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-11|Figure 7-11]], are orange, green, and purple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-11&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-11. Radial gradient with three stops'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;radialGradient id=&amp;quot;three_stops&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #f96;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;50%&amp;quot; style=&amp;quot;stop-color: #9c9;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #906;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/radialGradient&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#three_stops); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-11&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-11. Radial gradient with three stops'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt155.png|Radial gradient with three stops]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Establishing transition limits for a radial gradient ====&lt;br /&gt;
&lt;br /&gt;
Instead of using a line to determine where the 0% and 100% stop points should be, a radial gradient's limits are determined by a circle; the center is the 0% stop point, and the outer circumference defines the 100% stop point. You define the outer circle with the &amp;lt;tt&amp;gt;cx&amp;lt;/tt&amp;gt; (center ''x''), &amp;lt;tt&amp;gt;cy&amp;lt;/tt&amp;gt; (center ''y''), and &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt; (radius) attributes. All of these are in terms of percentages of the object's bounding box. The default values for all these attributes is 50%. [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-12|Example 7-12]] draws a square with a radial gradient with the zero point centered at the upper left of the square and the outer edge at the lower right. The result is shown in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-12|Figure 7-12]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-12&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-12. Setting limits for a radial gradient'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;radialGradient id=&amp;quot;center_origin&amp;quot;&lt;br /&gt;
     '''cx=&amp;quot;0&amp;quot; cy=&amp;quot;0&amp;quot; r=&amp;quot;100%&amp;quot;'''&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #f96;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;50%&amp;quot; style=&amp;quot;stop-color: #9c9;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #906;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/radialGradient&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#center_origin); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-12&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-12. Setting limits for a radial gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt156.png|Setting limits for a radial gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 0% stop point, also called the focal point, is by default placed at the center of the circle that defines the 100% stop point. If you wish to have the 0% stop point at some point other than the center of the limit circle, you must change the &amp;lt;tt&amp;gt;fx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;fy&amp;lt;/tt&amp;gt; attributes. The focal point should be within the circle established for the 100% stop point. If it's not, the SVG viewer program will automatically move the focal point to the outer circumference of the end circle.&lt;br /&gt;
&lt;br /&gt;
In [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-13|Example 7-13]], the circle is centered at the origin with a radius of 100%, but the focal point is at (30%, 30%). As you see in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-13|Figure 7-13]], this has the visual effect of moving the &amp;quot;center.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-13&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-13. Setting focal point for a radial gradient'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;radialGradient id=&amp;quot;focal_set&amp;quot;&lt;br /&gt;
     '''cx=&amp;quot;0&amp;quot; cy=&amp;quot;0&amp;quot; fx=&amp;quot;30%&amp;quot; fy=&amp;quot;30%&amp;quot; r=&amp;quot;100%&amp;quot;'''&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #f96;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;50%&amp;quot; style=&amp;quot;stop-color: #9c9;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #906;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/radialGradient&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#focal_set); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-13&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-13. Setting focal point for a radial gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt157.png|Setting focal point for a radial gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default values for the limit-setting attributes of a &amp;lt;tt&amp;gt;&amp;lt;radialGradient&amp;gt;&amp;lt;/tt&amp;gt; are as follows:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Attribute !! Default value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;cx&amp;lt;/tt&amp;gt; || 50% (horizontal center of object bounding box)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;cy&amp;lt;/tt&amp;gt; || 50% (vertical center of object bounding box)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt; || 50% (half the width/height of object bounding box)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;fx&amp;lt;/tt&amp;gt; || same as &amp;lt;tt&amp;gt;cx&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;fy&amp;lt;/tt&amp;gt; || same as &amp;lt;tt&amp;gt;cy&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
'''Note'''&lt;br /&gt;
&lt;br /&gt;
If you wish to establish the circle limits using user space coordinates instead of percentages, set the &amp;lt;tt&amp;gt;gradientUnits&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;userSpaceOnUse&amp;lt;/tt&amp;gt; instead of the default value, which is &amp;lt;tt&amp;gt;objectBoundingBox&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== The spreadMethod attribute for radial gradients ====&lt;br /&gt;
&lt;br /&gt;
In the event that the limits you've described don't reach to the edges of the object, you can set the &amp;lt;tt&amp;gt;spreadMethod&amp;lt;/tt&amp;gt; attribute to one of the values &amp;lt;tt&amp;gt;pad&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;repeat&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;reflect&amp;lt;/tt&amp;gt; as described earlier in [[SVG Essentials/Patterns and Gradients#The spreadMethod attribute|Section 7.2.1.3]] to fill up the remaining space as you wish. We've written all three effects in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-14|Example 7-14]]; [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-14|Figure 7-14]] shows the leftmost square's gradient padded, the middle square's gradient repeated, and the right square's gradient reflected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-14&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-14. Effects of spreadMethod values on a radial gradient'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;radialGradient id=&amp;quot;three_stops&amp;quot;&lt;br /&gt;
     cx=&amp;quot;0%&amp;quot; cy=&amp;quot;0%&amp;quot; r=&amp;quot;70%&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #f96;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;50%&amp;quot; style=&amp;quot;stop-color: #9c9;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #906;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/radialGradient&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;radialGradient id=&amp;quot;padded&amp;quot; xlink:href=&amp;quot;#three_stops&amp;quot;&lt;br /&gt;
     spreadMethod=&amp;quot;pad&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;radialGradient id=&amp;quot;repeated&amp;quot; xlink:href=&amp;quot;#three_stops&amp;quot;&lt;br /&gt;
     spreadMethod=&amp;quot;repeat&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;radialGradient id=&amp;quot;reflected&amp;quot; xlink:href=&amp;quot;#three_stops&amp;quot;&lt;br /&gt;
     spreadMethod=&amp;quot;reflect&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#padded); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;130&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#repeated); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;240&amp;quot; y=&amp;quot;20&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#reflected); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-14&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-14. spreadMethod values pad, repeat, and reflect for a radial gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt158.png|spreadMethod values&lt;br /&gt;
   pad,&lt;br /&gt;
   repeat, and&lt;br /&gt;
   reflect for a radial gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gradient Reference Summary ===&lt;br /&gt;
&lt;br /&gt;
Linear and radial gradients describe a smooth transition of colors used to fill an object. The object in question has a bounding box, defined as the smallest rectangle that entirely contains the object. The &amp;lt;tt&amp;gt;&amp;lt;linearGradient&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;radialGradient&amp;gt;&amp;lt;/tt&amp;gt; elements are both containers for a series of &amp;lt;tt&amp;gt;&amp;lt;stop&amp;gt;&amp;lt;/tt&amp;gt; elements. Each of these &amp;lt;tt&amp;gt;&amp;lt;stop&amp;gt;&amp;lt;/tt&amp;gt; elements specifies a &amp;lt;tt&amp;gt;stop-color&amp;lt;/tt&amp;gt; and an &amp;lt;tt&amp;gt;offset&amp;lt;/tt&amp;gt;. For linear gradients, the offset is a percentage of the distance along the gradient's linear vector. For radial gradients, it is a percentage of the distance along the gradient's radius.&lt;br /&gt;
&lt;br /&gt;
For a linear gradient, the starting point of the vector (which has the 0% stop color) is defined by the attributes &amp;lt;tt&amp;gt;x1&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y1&amp;lt;/tt&amp;gt;; the ending point (which has the 100% stop color) by the attributes &amp;lt;tt&amp;gt;x2&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;y2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For a radial gradient, the focal point (which has the 0% stop color) is defined by the attributes &amp;lt;tt&amp;gt;fx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;fy&amp;lt;/tt&amp;gt;; the circle that has the 100% stop color is defined by its center coordinates &amp;lt;tt&amp;gt;cx&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cy&amp;lt;/tt&amp;gt; and its radius &amp;lt;tt&amp;gt;r&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;tt&amp;gt;gradientUnits&amp;lt;/tt&amp;gt; attribute has the value &amp;lt;tt&amp;gt;objectBoundingBox&amp;lt;/tt&amp;gt;, the coordinates are taken as a percentage of bounding box's dimensions (this is the default). If the value is set to &amp;lt;tt&amp;gt;userSpaceOnuse&amp;lt;/tt&amp;gt;, the coordinates are taken to be in the coordinate system used by the object that is being filled.&lt;br /&gt;
&lt;br /&gt;
If the vector for a linear gradient or the circle for a radial gradient does not reach to the boundaries of the object being filled, the remaining space will be colored as determined by the value of the &amp;lt;tt&amp;gt;spreadMethod&amp;lt;/tt&amp;gt; attribute: &amp;lt;tt&amp;gt;pad&amp;lt;/tt&amp;gt;, the default, extends the start and end colors to the boundaries; &amp;lt;tt&amp;gt;repeat&amp;lt;/tt&amp;gt; repeats the gradient start-to-end until it reaches the boundaries; and &amp;lt;tt&amp;gt;reflect&amp;lt;/tt&amp;gt; replicates the gradient end-to-start and start-to-end until it reaches the object boundaries.&lt;br /&gt;
&lt;br /&gt;
== Transforming Gradients and Patterns ==&lt;br /&gt;
&lt;br /&gt;
Sometimes you may need to skew, stretch, or rotate a pattern or gradient. You're not transforming the object being filled; you're transforming the pattern or the color spectrum used to fill the object. The &amp;lt;tt&amp;gt;gradientTransform&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;patternTransform&amp;lt;/tt&amp;gt; attributes let you do just that, as written in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-EX-15|Example 7-15]] and shown in [[SVG Essentials/Patterns and Gradients#svgess-CHP-7-FIG-15|Figure 7-15]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-EX-15&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 7-15. Transforming patterns and gradients'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;defs&amp;gt;&lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;plain&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;0%&amp;quot; style=&amp;quot;stop-color: #ffcc00;&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;33.3%&amp;quot; style=&amp;quot;stop-color: #cc6699&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;stop offset=&amp;quot;100%&amp;quot; style=&amp;quot;stop-color: #66cc99;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/linearGradient&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;linearGradient id=&amp;quot;skewed-gradient&amp;quot;&lt;br /&gt;
   gradientTransform=&amp;quot;skewX(10)&amp;quot;&lt;br /&gt;
   xlink:href=&amp;quot;#plain&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;tile&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; width=&amp;quot;20%&amp;quot; height=&amp;quot;20%&amp;quot;&lt;br /&gt;
     patternUnits=&amp;quot;objectBoundingBox&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 Q 5 20 10 10 T 20 20&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: black; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;path d=&amp;quot;M 0 0 h 20 v 20 h -20 z&amp;quot;&lt;br /&gt;
     style=&amp;quot;stroke: gray; fill: none;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/pattern&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;pattern id=&amp;quot;skewed-tile&amp;quot;&lt;br /&gt;
     patternTransform=&amp;quot;skewY(15)&amp;quot;&lt;br /&gt;
     xlink:href=&amp;quot;#tile&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;/defs&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;10&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;135&amp;quot; y=&amp;quot;10&amp;quot; width=&amp;quot;100&amp;quot; height=&amp;quot;100&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#skewed-tile); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;120&amp;quot; width=&amp;quot;200&amp;quot; height=&amp;quot;50&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#plain); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;rect x=&amp;quot;20&amp;quot; y=&amp;quot;190&amp;quot; width=&amp;quot;200&amp;quot; height=&amp;quot;50&amp;quot;&lt;br /&gt;
     style=&amp;quot;fill: url(#skewed-gradient); stroke: black;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;svgess-CHP-7-FIG-15&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 7-15. Transformation of a pattern and gradient'''&lt;br /&gt;
&lt;br /&gt;
[[Image:SVG Essentials/I_7_tt159.png|Transformation of a pattern and gradient]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One final note about gradients and patterns — although we've only applied them to the filled area of a shape, you may also apply them to the &amp;lt;tt&amp;gt;stroke&amp;lt;/tt&amp;gt;. This lets you produce a multicolored or patterned outline for an object. You'll usually set the &amp;lt;tt&amp;gt;stroke-width&amp;lt;/tt&amp;gt; to a number greater than one so that the effect is more clearly visible.&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	</feed>