Scale object
scale_objectScale an object or group by a factor along the x-axis and optionally the y-axis. Resize a specific object using its ID.
Instructions
Scale an object/group by factor sx (and sy, defaulting to sx for uniform).
When to use: resizing one object; get its id from find_objects. To reposition use
move_object, to rotate use rotate_object, to resize the whole page use resize_canvas.
Key params: sx (and optional sy, defaulting to sx for uniform) scale about the parent
coordinate-space ORIGIN; non-finite or non-positive factors are rejected.
Return shape: EditResult — operation_id, snapshot_id, changed (real before/after content
diff), before/after preview; the edit lands on the working copy only (reversible).
Example: scale_object(doc_id, "logo", 2)
Render and look before you trust this edit: render with render_preview (or live_render_view)
and inspect the result before relying on it; restore_snapshot reverts it if it is wrong.
Risk class: medium.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sx | Yes | ||
| sy | No | ||
| doc_id | Yes | ||
| object_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| changed | Yes | ||
| summary | No | ||
| snapshot_id | Yes | ||
| operation_id | Yes | ||
| preview_after | No | ||
| preview_before | No |