Schemas / Geometry / paint

rig.paint.stroke_style

v0.31.0 · draft 5 fields 0 required

Fields

FieldTypeMeaning
cap enumbutt · square · round optional Optional. butt, square, round; absent = butt
join enummiter · bevel · round optional Optional. miter, bevel, round; absent = miter
miterLimit float optional Optional. Miter cut-off (SVG / canvas); absent = 4. Meaningful when join is miter; hosts that do not ship a limiter still accept and ignore it
dash array<float> optional Optional. On/off lengths in content units; absent or empty = solid
dashOffset float optional Optional. Dash phase in content units; absent = 0

Stroke caps, joins, and dash on a drawable. Format when present.

Compose on the same entity as rig.paint.fill_stroke or rig.paint.stroke. Colour and width stay there. Omit this component when every field is the absent default.

Do not grow rig.paint.fill_stroke with these fields. Do not put them on the paint entity (rig.paint.solid / rig.paint.gradient).

JSON Schema

Resolves at https://rig.works/schemas/rig.paint.stroke_style.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.paint.stroke_style.schema.json",
  "title": "rig.paint.stroke_style",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "cap": {
      "type": "string",
      "enum": [
        "butt",
        "square",
        "round"
      ]
    },
    "join": {
      "type": "string",
      "enum": [
        "miter",
        "bevel",
        "round"
      ]
    },
    "miterLimit": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "dash": {
      "type": "array",
      "items": {
        "$ref": "./_defs.schema.json#/$defs/float"
      }
    },
    "dashOffset": {
      "$ref": "./_defs.schema.json#/$defs/float"
    }
  }
}

Seen in

minimal-scene.json