XML technologies / SVG / Filters, transformations and gradients / Summary, questions and exercises

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

Summary

  • The transform attribute rotates and skews elements.

  • Changes always refer to the object’s origin.

  • Colors can be defined with hexadecimal color specifications, by color names, or with the rgb function.

  • Gradients are defined with the tags <radialGradient> and <linearGradient>.

  • Filters are defined with the <filter> tag.

  • Multiple filters can be defined and combined inside this tag.

  • Apply a filter using the filter property in the style attribute.

Questions and exercises

The following exercises form a single unit.

  1. Create an SVG file and insert large text. Make it bold and give it a black border.

  2. Add a white-to-red linear gradient and use it to fill the text.

  3. Apply a filter to the element to create a 3D effect.

  4. Add a black shadow to the text.

  5. Apply a colored light cone to the text.

  6. Place a rectangle behind the text and fill it with a fractal pattern.

  7. Group both elements and skew the group on the x axis.

   

 

 

 

back to top