ZVON > References > Zvon Example Repository
Example repository: index | categories | search

All > SVG > Gradient Patterns > gradPatt-radialGr-BE-05


File: gradPatt-radialGr-BE-05
Author: Haroon Sheikh
Origin: W3C SVG conformance suite

Rendered imageSVG source
ElementsAttributes
axlink:href |
descid |
gid | style |
pathd | style |
radialGradientcx | cy | fx | fy | gradientUnits | id | r |
rectheight | id | style | transform | width | x | y |
stopoffset | style |
svgheight | id | width |
textstyle | x | y |
titleid |

Source

<svg id="svg-root" width="450" height="450" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" >
     <title id="test-title">gradPatt-radialGr-BE-05</title>
     <desc id="test-desc">Test that the viewer can handle the gradientUnits attribute on radial gradients.</desc>
     <g id="test-body-content">
          <rect x="1" y="1" width="448" height="448" style="fill:none;stroke:#000000;"/>
          <text style="font-family:Helvetica;font-size:15;" x="10" y="25">Testing gradientUnits attribute</text>
          <radialGradient id="Grad1">
               <stop style="stop-color:blue;" offset="0"/>
               <stop style="stop-color:red;" offset="1"/>
          </radialGradient>
          <rect x="10" y="35" width="430" height="60" style="fill:url(#Grad1);"/>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="110">Radial gradient with default attributes (from blue to red)</text>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="125">Gradient is blue at the object center and red at the object edges</text>
          <radialGradient id="Grad2" gradientUnits="objectBoundingBox" cx=".2" cy=".2" fx=".2" fy=".2" r=".5">
               <stop style="stop-color:blue;" offset="0"/>
               <stop style="stop-color:red;" offset="1"/>
          </radialGradient>
          <rect x="10" y="145" width="430" height="80" style="fill:url(#Grad2);"/>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="240">gradientUnits=objectBoundingBox</text>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="255">cx=.2, cy=.2, r=.5, fx=.2 fy=.2</text>
          <radialGradient id="Grad3" cx="30" cy="215" r="30" fx="30" fy="215" gradientUnits="userSpaceOnUse">
               <stop style="stop-color:red;" offset="0"/>
               <stop style="stop-color:blue;" offset="1"/>
          </radialGradient>
          <rect transform="translate(10, 340) rotate(-90)" x="0" y="0" width="60" height="430" style="fill:url(#Grad3);"/>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="355">gradientUnits=userSpaceOnUse</text>
          <text style="font-family:Helvetica;font-size:12;" x="10" y="370">Gradient is red to blue radial gradiant from center to horizontal bounds</text>
     </g>
     <g id="test-legend" style="fill:black;font-family:Helvetica;font-size:10;">
          <rect x="10" y="390" width="275" height="50" style="fill:none;stroke:#000000;"/>
          <path style="fill:none;stroke:#000000;" d="M10 405 h275 M205 405 v35 M10 426 h195 M205 422 h80"/>
          <text x="25" y="401">Scalable Vector Graphics (SVG) Conformance Suite</text>
          <a xlink:href="copyright-documents-19990405.html">
               <text x="12" y="437" style="fill:blue;">Copyright 2000 W3C. All Rights Reserved.</text>
          </a>
          <text style="font-size:12;" x="35" y="420">gradPatt-radialGr-BE-05</text>
          <text style="font-size:10;" x="210" y="417">$Revision: 1.1 $</text>
          <text style="font-size:10;" x="210" y="435">Release 2.0</text>
          <rect id="test-frame" x="1" y="1" width="448" height="448" style="fill:none;stroke:#000000;"/>
     </g>
</svg>



Sponsored links: conference call service, VoIP Internettelefonie, DSL, SDSL, ADSL, answering service