XML technologies / SVG / Filters, transformations and gradients / Defining and assigning gradients / Finishing the button
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
The awkward position within the graphic is still a problem. Group its individual elements and position them relative to the group’s origin. You can then move the group to any desired point in the graphic.
<?xml version="1.0" standalone="no"?>
...
<svg width="500" height="500">
<radialGradient id="runderVerlauf" cx="50%" cy="90%" r="60%" fx="60%" fy="80%">
...
</radialGradient>
<linearGradient id="linearerVerlauf" gradientTransform="rotate(90)">
...
</linearGradient>
<g transform="translate(20,20)">
<circle cx="25" cy="25" r="25" style="stroke-width:1;stroke-opacity:0.8;stroke:rgb(222,0,0);opacity:1;fill:url(#runderVerlauf)"/>
<ellipse cx="25" cy="15" rx="20" ry="12" style="stroke-width:1;stroke:none; opacity:1;fill:url(#linearerVerlauf)"/>
</g>
</svg>
Copyright © verlag moderne industrie GmbH 2001
You may print the online version for your private use.
Otherwise, this chapter from “Das Einsteigerseminar SVG — Webgrafiken mit XML” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
verlag moderne industrie GmbH, Justus-von-Liebig-Straße 1, D-86899 Landsberg/Lech, fon ++49 (0) 81 91 / 125 – 0, leserservice(at)mi-verlag.de
back to top