XML technologies / SVG / Filters, transformations and gradients / Using and combining filters and lighting effectively / Lighting effects / Defining a point light source
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
The tag <fePointLight> creates a point light source. It has these attributes:
xsets the light source’s x coordinate. The default is 0.ysets the light source’s y coordinate. The default is 0.zsets the light source’s height, its position on the z axis.
For x and y, specify absolute or percentage values to position the light source relative to the size of the object receiving the filter.
<filter id="FLicht02">
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" style="lighting-color:white">
<fePointLight x="10%" y="10%" z="30"/>
</feDiffuseLighting>
</filter>
Applied to the previous example’s circle, with the same parent filter settings, this filter produces the following output. The figure also shows the first filter’s result to clarify the difference.
Figure: Filter results for feDistantLight and fePointLight.
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