XML technologies / SVG / Using complex graphic elements and formatting / Using paths correctly / Creating Bézier curves / The S command
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
The S command draws curves similar to C. However, only one control point needs to be specified here, since both control points share the same position. The syntax is:
S x2 y2 x y
Here, x/y specifies the line’s destination, and x2/y2 the second control point’s position. The first control point is calculated asymmetrically to the second control point of the previous Bézier curve in the path. If there is no previous curve, only the second control point is used. The instruction
<path d="M100 100 S300 250 350 100" style="stroke:rgb(0,0,0);stroke-width:3;fill:none"/>produces a result such as:
Figure: Bézier curve created with the S command.
Note:
The control point and guide line have again been drawn for illustration.
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