Summary

   



 Download CD Content

Overview

This chapter demonstrates how to use the SVG path element in order to specify quadratic Bezier curves and cubic Bezier curves. This SVG element provides an extremely powerful mechanism for defining Bezier curves, which can be easily exploited to produce some very exotic graphics images. This chapter will show you how to generate some interesting combinations of Bezier curves, checkerboard patterns, and various types of gradient shading; it will provide ideas and techniques that you can use as a starting point for your own experimentation.

As a rule, it's better to avoid hard-coded values whenever possible in SVG documents because such values tend to make it more difficult to create other SVG documents leverage and generalize those features. While you certainly create beautiful SVG-based graphics with thousands of hard-coded values, imagine yourself trying to enhance this type of code after a six-month hiatus. (Just trying to remember what the code does will probably be a task unto itself.) The exception to this rule is when you are experimenting with new geometric objects; use as many different combinations of hard-coded values as you can in order to understand how those objects react to subtle (as well as not-so-subtle) changes in attribute values. In Chapters 13 and 14 you will learn how to use ECMAScript in order to programmatically change the values of attributes using a variety of techniques. As was the case in previous chapters, all the code and images for this chapter can be found on the companion CD-ROM in the Chapter 5 folder.



   



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