XML technologies / SVG / Using complex graphic elements and formatting / Using paths correctly / Creating Bézier curves / The Q command

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

The Q command draws quadratic Bézier curves with this syntax:

Q x1 y1 x y

The values x/y set the line’s endpoint, while x1/y1 defines its control point. Two guide lines from this point produce a smooth bend. The figure illustrates the curve produced by the instruction

<path d="M100 100 Q150 250 300 100" style="stroke:rgb(0,0,0);stroke-width:3;fill:none"/>

.

Bézier curve created with Q, showing guide lines

Figure: Bézier curve created with Q, showing guide lines.

   

 

 

 

back to top