Vector kit command

stroke.set

Stroke Options

Sets stroke options of the selection or ids: weight, cap, join, miter limit, alignment, dashes, arrowheads and width profile.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of stroke.set
NameTypeRequiredDescription
align"center" | "inside" | "outside"no
alignDashesbooleannotrue: dashes fitted to corners and path ends, every run between them holding whole periods with a dash centred on each corner and end; false, the default for a new pattern: exact lengths
arrowAlignstringnolike extend; tip past the end point, default; one of several alternative parameters
cap"butt" | "round" | "square"no
dashnumber[] | nullno
dashOffsetnumberno
endArrowstring | nullno
idintegernoobject ID
idsinteger[]noobject IDs
iteminteger | nullno
join"miter" | "round" | "bevel"no
miterLimitnumberno
profilestring | nullno
startArrowstring | nullno
tipanynotip on the end point; the stroke is shortened; one of several alternative parameters
weightnumbernopoints

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "stroke.set" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: align, alignDashes, arrowAlign, cap, dash, dashOffset, endArrow, id, ids, item, join, miterLimit, profile, startArrow, tip, weight. vector_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "align": {
      "enum": [
        "center",
        "inside",
        "outside"
      ],
      "type": "string"
    },
    "alignDashes": {
      "description": "true: dashes fitted to corners and path ends, every run between them holding whole periods with a dash centred on each corner and end; false, the default for a new pattern: exact lengths",
      "type": "boolean"
    },
    "arrowAlign": {
      "description": "like extend; tip past the end point, default; one of several alternative parameters",
      "type": "string"
    },
    "cap": {
      "enum": [
        "butt",
        "round",
        "square"
      ],
      "type": "string"
    },
    "dash": {
      "oneOf": [
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "dashOffset": {
      "type": "number"
    },
    "endArrow": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "item": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "join": {
      "enum": [
        "miter",
        "round",
        "bevel"
      ],
      "type": "string"
    },
    "miterLimit": {
      "type": "number"
    },
    "profile": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "startArrow": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "tip": {
      "description": "tip on the end point; the stroke is shortened; one of several alternative parameters"
    },
    "weight": {
      "description": "points",
      "type": "number"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.