## SVG transcoder - the internals of the offline transcoder The Aurora SVG transcoder uses [Apache Batik](https://xmlgraphics.apache.org/batik/) to transcode SVG source into corresponding Kotlin classes that contain a sequence of Compose canvas draw calls to render the original content. How does it work? ### Parsing the SVG document We start in `SvgTranscoder`. It uses Batik's `DocumentLoader` to load the local file based on the `URI`, and `GVTBuilder` to construct an hierarchical representation of the SVG content. The root of that representation is a `GraphicsNode`. That is then passed to `SvgBaseTranscoder.transcode()`. This is the base class where the rest of the transcoding happens. Transcoding has three parts: - traversing the Batik tree - parsing out the information to create matching Compose instructions - printing those instructions in Kotlin syntax Let's take a look at each one of these parts. ### Traversing the Batik tree The 'GraphicsNode' that we get from Batik's `GVTBuilder` is the root of a hierarchical representation of the original SVG content. Here it is important to note that it is *not* the DOM tree of the original SVG document - some of the SVG elements such as `