Layout kit command
transform.info
Transform Values
Answers objects' scale, rotation and shear (and those of placed content).
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- no
- Acts on
ids(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
content | boolean | no | measure the first target's placed graphic, not the frame |
ids | (integer | string)[] | no |
Call through layout_run
text
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "transform.info" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: content, ids. layout_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
height | number | no | |
rotation | number | no | |
scaleX | number | no | |
scaleY | number | no | |
shear | number | no | |
width | number | no | |
x | number | no | |
y | number | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"height": {
"type": "number"
},
"rotation": {
"type": "number"
},
"scaleX": {
"type": "number"
},
"scaleY": {
"type": "number"
},
"shear": {
"type": "number"
},
"width": {
"type": "number"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"content": {
"description": "measure the first target's placed graphic, not the frame",
"type": "boolean"
},
"ids": {
"items": {
"description": "an id",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array",
"x-khp-types": [
"Item"
]
}
},
"returns": "{scaleX, scaleY (%), rotation, shear (°), content?: the same for a placed graphic} of the first target; {x, y, width, height}: the box transform.set measures (top-left, page-relative). With `content: true`, the first target's placed graphic itself: its box, scale, rotation and shear",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (layout_commands through @kition/[email protected], built from KitionAI/kition-layout@8767a18). As data: commands.jsonl.