XML/SVG/Bezier

Материал из Web эксперт
Перейти к: навигация, поиск

Cubic Quadratic Bezier Curves

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
 "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg- 20001102.dtd">
<svg width="100%" height="100%">
  <g transform="translate(20,110)">
    <path
      d="m50,50 C20,100 20,250 400,250 M50,50 Q100,0 200,200 T350,-80"
      fill="blue" stroke-dasharray="1 2 2 1"
      style="stroke:red;" />
  </g>
</svg>



Double Reflected Cubic Bezier Curves

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
 "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
<svg width="100%" height="100%">
  <g transform="translate(45,45)">
    <path d="m20,20 C20,50 20,450 300,200 s-150,-250 200,100"
      fill="blue" stroke-dasharray="2 2 2 2"
      style="stroke:#880088;stroke-width:4;" />
  </g>
  <g transform="translate(35,35)">
    <path d="m20,20 C20,50 20,450 300,200 s-150,-250 200,100"
      fill="white" stroke-dasharray="8 4 8 4"
      style="stroke:#880088;stroke-width:4;" />
  </g>
</svg>