Chapter 1: SVG Coordinate System, Simple Shapes, and Colors

   



SVG and Web Development

If you've worked with a combination of HTML, JavaScript, and bit-mapped files, you know how tedious that code can become in terms of maintenance and enhancements of the code. Although you can dynamically generate images 'on-demand,' most HTML pages contain static images. What do you get when you migrate to an SVG-based environment? First, SVG allows you to embed bit-mapped files (e.g., GIF files) and perform SVG transformations on them (such as scaling) and as well as applying SVG filters. Second, you benefit from the advantages of the scalable nature of SVG, which means that SVG does not suffer from the image degradation that occurs when you magnify bit-mapped images. Third, if you work extensively with JavaScript, you're in luck: SVG supports ECMAScript, which means that you can migrate your existing code base over to SVG. This also means that you don't have to learn any new languages, such as ActionScript for Macromedia Flash. Fourth, SVG is derived from XML, which in turn is based on Unicode; consequently, you can use SVG in order to display any characters that are supported by the underlying viewer, including languages such as Arabic, Hebrew, and Japanese. For example, you can do something like this,

   <text x="10" y="10">&#x3b1;&#x3b2;</text>

which renders the first two letters 'alpha' and 'beta' of the Greek alphabet.

Finally, online resources are available if you are interested in developing SVG-based content, such as the Yahoo group svg-developers, where you'll find a free exchange of ideas, SVG code, and lively discussions about all sorts of issues and events that may have an impact on SVG.



   



Fundamentals of SVG Programming. Concepts to Source Code
Fundamentals of SVG Programming: Concepts to Source Code (Graphics Series)
ISBN: 1584502983
EAN: 2147483647
Year: 2003
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net