ImageParser

class ImageParser(fileManager: FileManager, contentParsers: Map<FileType, ContentParser>)(source)

Parses SVG and Android Vector Drawable files into IconFileContents.

Composes file I/O (via FileManager) with content parsing (via ContentParser) to convert vector files on disk into domain models. The appropriate parser is selected from the injected contentParsers map based on the file's FileType.

Constructors

Link copied to clipboard
constructor(fileManager: FileManager, contentParsers: Map<FileType, ContentParser>)

Functions

Link copied to clipboard
fun parseToModel(file: Path, iconName: String, config: ParserConfig): IconFileContents

Parses a file into an IconFileContents domain model.