ass_get_drawing
Inspect drawing data from an ASS subtitle line or raw drawing string. Returns parsed commands, bounding box, size, center, path length, and point counts.
Instructions
Inspect the drawing part of a line, or a raw drawing string.
Pass exactly one of:
index+doc_id-- the line at that 0-based index (doc.events()order) is split withtags.drawing_partsand its drawing is inspected;text-- either a full override line (anything containing{or a\ptag, split the same way) or bare drawing path data.
scale is the \p level in effect for the drawing, so the returned
commands, bbox, size, centre and path length are all in that scale space
(units as written in the file); multiply by
2 ** (1 - scale) for script pixels. normalised_* mirrors of the
bbox/size are provided already converted.
Returns a dict with source ("line" or "text"), doc_id,
index, drawing (the raw drawing text), scale, has_drawing,
commands (list of {kind, args, points, text}), bbox,
normalised_bbox, size, normalised_size, center (aliased as
centre), subpath_count, point_count, path_length,
svg_path and clips (see :func:ass_get_clips for that shape).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| index | No | ||
| doc_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||