1.11. SVG <path>

发布时间 : 2025-10-25 13:33:31 UTC      

Page Views: 9 views

1.11.1. SVG path-

Element is used to define a path.

The following command can be used for path data:

  • M = moveto

  • L = lineto

  • H = horizontal lineto

  • V = vertical lineto

  • C = curveto

  • S = smooth curveto

  • Q = quadratic B é zier curve

  • T = smooth quadratic B é zier curveto

  • A = elliptical Arc

  • Z = closepath

Note: all the above commands allow lowercase letters. Uppercase indicates absolute positioning and lowercase indicates relative positioning.

1.11.2. Example 1

The above example defines a path that starts at location 150, arrives at location 75 200, then starts from there to 225 200, and finally closes the path at 150.

Here is the SVG code:

Example

<svgxmlns="http://www.w3.org/2000/svg"version="1.1"><pathd="M150 0 L75 200 L225 200 Z"/> 

For Opera users: view the SVG file (right-click the SVG drawing preview source).

1.11.3. Example 2

The following example creates a quadratic Bezier curve, where An and C are the start and end points, and B is the control point:

Here is the SVG code:

Example

ABC 

For Opera users: view the SVG file (right-click the SVG drawing preview source).

Is it complicated? Yes! Due to the complexity of drawing paths, it is strongly recommended that you use the SVG editor to create complex graphics.

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。