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
| Name | Type | Required | Description |
|---|---|---|---|
corners | boolean | no | |
height | number | no | |
origin | any[] | no | read by the command beside its listed parameters |
proportional | boolean | no | |
reference | integer | no | 0 to 8; 9-point grid |
strokes | boolean | no | |
sx | number | no | read by the command beside its listed parameters |
sy | number | no | read by the command beside its listed parameters |
width | number | no | |
x | number | no | |
y | number | no |
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.