Next: font, Previous: component, Up: Object types [Contents][Index]

#### 12.4.12 path

Valid in: Schematic and Symbol files

Valid since: Fileformat version 2 (release 1.5.1)

    type color width capstyle dashstyle dashlength dashspace filltype fillwidth angle1 pitch1 angle2 pitch2 numlines
    path data line 1
    path data line 2
    path data line 3
    ...
    path data line N

Pos. | Field | Type/unit | Description
--- | --- | --- | ---
# | type | char | H
1 | color | int | Color index
2 | width | int/mils | Width of line
3 | capstyle | int | Line cap style
4 | dashstyle | int | Type of dash style
5 | dashlength | int/mils | Length of dash
6 | dashspace | int/mils | Space inbetween dashes
7 | filltype | int | Type of fill
8 | fillwidth | int/mils | Width of the fill lines
9 | angle1 | int/degrees | First angle of fill
10 | pitch1 | int/mils | First pitch/spacing of fill
11 | angle2 | int/degrees | Second angle of fill
12 | pitch2 | int/mils | Second pitch/spacing of fill
13 | num_lines | int | Number of lines of path data (1 based)
14 | path data line 1 ... N | path data | The path data, on separate lines

- The capstyle is an enumerated type:
  - END NONE = 0
  - END SQUARE = 1
  - END ROUND = 2

- The dashstyle is an enumerated type:
  - TYPE SOLID = 0
  - TYPE DOTTED = 1
  - TYPE DASHED = 2
  - TYPE CENTER = 3
  - TYPE PHANTOM = 4
- The dashlength parameter is not used for TYPE SOLID and TYPE DOTTED. This parameter should take on a value of -1 in these cases.
- The dashspace parameter is not used for TYPE SOLID. This parameter should take on a value of -1 in these case.

- The filltype parameter is an enumerated type:
  - FILLING HOLLOW = 0
  - FILLING FILL = 1
  - FILLING MESH = 2
  - FILLING HATCH = 3
  - FILLING VOID = 4 unused
- If the filltype is 0 (FILLING HOLLOW), then all the fill parameters should take on a value of -1.
- The fill type FILLING FILL is a solid color fill.
- The two pairs of pitch and spacing control the fill or hatch if the fill type is FILLING MESH.
- Only the first pair of pitch and spacing are used if the fill type is FILLING HATCH.

- The format of path data is deliberately similar to that of paths in the W3C SVG standard.
- The subset of the SVG path syntax emitted by gEDA is documented below in section Path data.
- As an implementation detail; libgeda takes code from librsvg, an SVG parsing library. As a result, the majority of SVG path syntax is read correctly, however this is always normalised to absolute move, line, Bézier curve and close-path commands internally (and is saved as such).
- Coordinates along the path are specified in the standard gschem coordinate space.

Example:

    H 3 10 0 0 -1 -1 0 -1 -1 -1 -1 -1 5
    M 410,240
    L 501,200
    L 455,295
    L 435,265
    z

A path starting at (410,240) with lines drawn from there, and joining points (501,200), (455,295), (435,265), closing back to its origin. It has color index 3, is 10 mils thick, no cap, solid style. There are 5 lines of path data.

Next: font, Previous: component, Up: Object types [Contents][Index]