Vector kit command

paint.freeform.addPoint

Add Freeform Point

Adds a colour point to the freeform gradient on the selection's fill or stroke at a position, with colour, opacity and spread.

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 paint.freeform.addPoint
NameTypeRequiredDescription
atnumber[]nodocument coordinates
colorstringnodefault: the gradient's colour there
idintegernoobject ID
idsinteger[]noobject IDs
iteminteger | nullno
linebooleannojoin it to the selected point: extends the line ending there, else starts one
opacitynumberno0..1, or 0..100
spreadnumberno0..1, or 0..100 %; the radius of pure colour around the point, a fraction of half the object's larger side; default 0
strokebooleannodefault: the targeted item's kind, else the active proxy
targetstringno"object" (default) or "contents": the objects themselves, or what their groups and layers hold

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "paint.freeform.addPoint" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: at, color, id, ids, item, line, opacity, spread, stroke, target. 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": {
    "at": {
      "description": "document coordinates",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "color": {
      "description": "default: the gradient's colour there",
      "type": "string"
    },
    "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"
        }
      ]
    },
    "line": {
      "default": true,
      "description": "join it to the selected point: extends the line ending there, else starts one",
      "type": "boolean"
    },
    "opacity": {
      "description": "0..1, or 0..100",
      "type": "number"
    },
    "spread": {
      "description": "0..1, or 0..100 %; the radius of pure colour around the point, a fraction of half the object's larger side; default 0",
      "type": "number"
    },
    "stroke": {
      "description": "default: the targeted item's kind, else the active proxy",
      "type": "boolean"
    },
    "target": {
      "description": "\"object\" (default) or \"contents\": the objects themselves, or what their groups and layers hold",
      "type": "string"
    }
  },
  "returns": "{index}",
  "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.