Vector kit command

object.setBounds

Set Bounds

Sets the selection's position and size as the Transform panel does, about one of nine reference points, optionally keeping proportions and scaling strokes and corners.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes

Parameters

Parameters of object.setBounds
NameTypeRequiredDescription
cornersbooleanno
heightnumberno
originany[]noread by the command beside its listed parameters
proportionalbooleanno
referenceintegerno0 to 8; 9-point grid
strokesbooleanno
sxnumbernoread by the command beside its listed parameters
synumbernoread by the command beside its listed parameters
widthnumberno
xnumberno
ynumberno

Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: corners, height, origin, proportional, reference, strokes, sx, sy, width, x, y. 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": {
    "corners": {
      "type": "boolean"
    },
    "height": {
      "type": "number"
    },
    "origin": {
      "description": "read by the command beside its listed parameters",
      "type": "array"
    },
    "proportional": {
      "type": "boolean"
    },
    "reference": {
      "description": "0 to 8; 9-point grid",
      "type": "integer"
    },
    "strokes": {
      "type": "boolean"
    },
    "sx": {
      "description": "read by the command beside its listed parameters",
      "type": "number"
    },
    "sy": {
      "description": "read by the command beside its listed parameters",
      "type": "number"
    },
    "width": {
      "type": "number"
    },
    "x": {
      "type": "number"
    },
    "y": {
      "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.