Modules
Overview
The project is organized into three main blocks:
macros/: user-facing commands registered in Aegisub.modules/: reusable MoonScript libraries.ffi-packages/: native code and build scripts used by the FFI wrappers.
Public Module Map
ILL.ILL
The main library of the project. It is the base module for text, tags, line processing, and shape manipulation.
Main areas:
Aegi: Aegisub progress, dialog, and log integration.Config: macro configuration persistence.Math,Table,Util,UTF8: general-purpose helpers.Ass: ASS script reading, iteration, and updates.Line: line processing, expansion, splitting, and frame-by-frame workflows.Tag,Tags,Text: ASS tag and text parsing/manipulation.Point,Segment,Curve,Path: vector geometry.Font: text metrics and text-to-shape conversion.
ILL.IMG
Image loading and conversion module.
Main areas:
IMG: loads image files and converts them into ASS raster lines.Tracer: color tracing pipeline with presets.Potrace: monochrome vectorization.LIBPNG,LIBJPG,LIBGIF,LIBBMP: format-specific decoders.
clipper2.clipper2
FFI wrapper for native geometric operations.
Main areas:
CPP.path: native path creation and manipulation.CPP.paths: path collections and boolean operations.- enums for
FillRule,JoinType, andEndType.
Relationship Between Modules
Shaperymainly depends onILL.ILLandclipper2.clipper2.Envelope Distortdepends onILL.ILL.Make Imagedepends onILL.IMGandILL.ILL.Split Text,Change Alignment, andLine To FBFmainly depend onILL.ILL.
Recommended Entry Point For Development
If you are building a new macro:
- start with
AssandLine; - use
Text,Tags, andTagto manipulate ASS content; - use
PathandPointwhen the workflow involves shape data; - use
IMGorclipper2only when image processing or heavy geometry is actually needed.