HTML and CSS Reference
In-Depth Information
Esempio 10.12
<svg width="500" height="450">
<defs>
<radialGradient id="blueg" cx="0" cy="1" r="1">
<stop offset="0" stop-color="black" />
<stop offset="1" stop-color="blue" />
</radialGradient>
<radialGradient id="redg" cx="1" cy="1" r="1">
<stop offset="0" stop-color="black" />
<stop offset="1" stop-color="red" />
</radialGradient>
<radialGradient id="yellowg" cx="1" cy="0" r="1">
<stop offset="0" stop-color="black" />
<stop offset="1" stop-color="yellow" />
</radialGradient>
</defs>
<path fill="url(#blueg)"
d="M 310,402 L 213,214 L 326,35 C 454,111 468,319
310,402 z" />
<path fill="url(#redg)"
d="M 3,208 L 213,214 L 326,35 C 202,-46 8,30 3,208
z"/>
<path fill="url(#yellowg)"
d="M 3,208 L 213,214 L 311,400 C 177,467 3,380 3,208
z" />
</svg>
In questo caso, essendo un radiale, dobbiamo specificare il centro cx , xy e il raggio, otte-
nendo la torta visibile nella figura 10.8 .
 
Search WWH ::




Custom Search