Shape

Responsibility

Shape describes certified primitive geometry. The first certified primitives are rectangle and ellipse.

{
  "id": "card",
  "type": "shape",
  "shape": { "kind": "rectangle" },
  "frame": { "width": 640, "height": 360 },
  "fill": "#18B89A",
  "fillOpacity": 1,
  "stroke": "#FFFFFF",
  "strokeOpacity": 1,
  "strokeWidth": 4,
  "transform": {
    "translate": { "x": 120, "y": 80, "z": 0 },
    "rotate": { "x": 0, "y": 0, "z": 0 },
    "scale": { "x": 1, "y": 1, "z": 1 },
    "anchor": { "x": 0.5, "y": 0.5, "z": 0 }
  }
}

Paint independence

Fill and stroke are separate paint inputs. Their colors and opacity values must not be silently merged.

Rounded geometry

Rounded corners are geometry semantics. They are not a CSS-only feature and are not represented as a renderer resource.