ass_set_clip
Set, add, or remove clip and iclip tags on selected Aegisub subtitle lines using rectangles, ASS drawings, or SVG paths.
Instructions
Set, add or remove a clip on the selected lines.
selection accepts anything :func:base.resolve_indices understands
(None = the session selection, or every line when none is set).
Geometry is taken from the first one of these that is given: rect
("x1,y1,x2,y2" or a 4-list, in script resolution unless scale
names the scale space those numbers are written in), drawing_text
(ASS path data), svg_path / svg_d (SVG path data) or spec
(a rectangle string, an ASS drawing, or an SVG path -- SVG is detected by
its H/V/Q/T/A/Z command letters and the result is converted).
scale for a vector clip sets the explicit \clip(<scale>,...) level;
when omitted a vector clip is written at level 1 (script resolution).
inverse=True emits \iclip.
mode:
"replace"-- strip every existing clip from the line, then insert."add"-- keep existing clips, insert the new one at the front."remove"-- strip every clip tag (\clipand\iclip) from the lines; the geometry arguments are ignored.
Returns {doc_id, mode, kind, tag, scale, inverse, lines: [{index, changed, text, removed, clip}]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | replace | |
| rect | No | ||
| spec | No | ||
| scale | No | ||
| svg_d | No | ||
| doc_id | No | ||
| inverse | No | ||
| svg_path | No | ||
| selection | No | ||
| drawing_text | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||