Rotate object
rotate_objectRotate an object or group by a specified angle around a point or the origin. Useful for spinning SVG elements in your designs.
Instructions
Rotate an object/group by degrees about a point.
When to use: spinning one object; get its id from find_objects. To move use move_object, to
resize use scale_object.
Key params: degrees is the rotation angle; it rotates about (cx, cy) when BOTH are given,
otherwise about the parent coordinate-space origin.
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: rotate_object(doc_id, "arrow", 90, cx=50, cy=50)
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 |
|---|---|---|---|
| cx | No | ||
| cy | No | ||
| doc_id | Yes | ||
| degrees | 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 |