Layout kit command
object.stroke
Stroke
Sets objects' stroke: swatch, tint, weight, alignment, stroke type, caps and joins, gap colour.
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- yes
- Acts on
ids(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
align | "center" | "inside" | "outside" | no | |
cap | "butt" | "round" | "projecting" | no | |
edge | string | no | read by the command beside its listed parameters |
end | "none" | "simple" | "simpleWide" | "triangle" | "triangleWide" | "barbed" | "curved" | "circle" | "circleSolid" | "square" | "squareSolid" | "bar" | no | |
gapOverprint | boolean | no | |
gapSwatch | string | no | a swatch name |
gapTint | number | no | percent |
ids | (integer | string)[] | no | |
join | "miter" | "round" | "bevel" | no | |
miterLimit | number | no | |
start | number | no | |
swatch | string | no | a swatch name |
tint | number | no | percent from 0 to 100 |
to | string | no | read by the command beside its listed parameters |
type | object | no | {kind:…} |
weight | number | no |
Call through layout_run
text
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "object.stroke" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: align, cap, edge, end, gapOverprint, gapSwatch, gapTint, ids, join, miterLimit, start, swatch, tint, to, type, weight. layout_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"
},
"cap": {
"enum": [
"butt",
"round",
"projecting"
],
"type": "string"
},
"edge": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"end": {
"enum": [
"none",
"simple",
"simpleWide",
"triangle",
"triangleWide",
"barbed",
"curved",
"circle",
"circleSolid",
"square",
"squareSolid",
"bar"
],
"type": "string"
},
"gapOverprint": {
"type": "boolean"
},
"gapSwatch": {
"description": "a swatch name",
"type": "string",
"x-khp-name": "name",
"x-khp-types": [
"Swatch"
]
},
"gapTint": {
"description": "percent",
"type": "number"
},
"ids": {
"items": {
"description": "an id",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array",
"x-khp-types": [
"Item"
]
},
"join": {
"enum": [
"miter",
"round",
"bevel"
],
"type": "string"
},
"miterLimit": {
"type": "number"
},
"start": {
"type": "number"
},
"swatch": {
"description": "a swatch name",
"type": "string",
"x-khp-name": "name",
"x-khp-types": [
"Swatch"
]
},
"tint": {
"description": "percent from 0 to 100",
"type": "number"
},
"to": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"type": {
"additionalProperties": true,
"description": "{kind:…}",
"properties": {
"kind": {
"description": "…"
}
},
"type": "object"
},
"weight": {
"type": "number"
}
},
"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.