Path

Responsibility

Path describes one or more contours made from explicit segments. A path can be filled, stroked, or both.

{
  "id": "five-point-star",
  "type": "path",
  "payload": {
    "fillRule": "nonzero",
    "contours": [
      {
        "closed": true,
        "segments": [
          { "kind": "line", "to": { "x": 120, "y": 20 } },
          { "kind": "line", "to": { "x": 150, "y": 110 } },
          { "kind": "line", "to": { "x": 60, "y": 55 } }
        ]
      }
    ]
  }
}

Fill rules

nonzero and evenodd are path fill semantics. They determine which regions are inside a multi-contour path. They are not separate visual layers.

Stroke

Stroke width, cap, join, dash, color, and opacity are paint semantics applied to the path contour.