SvgoPlugin

sealed interface SvgoPlugin(source)

Describes a single SVGO plugin and its parameters.

Each variant maps to a specific SVGO plugin. The name property matches the plugin identifier expected by SVGO.

Inheritors

Types

Link copied to clipboard
data class AddDefaultFillToShapes(val shapes: List<String>) : SvgoPlugin

Custom plugin that adds fill="#000" to shapes missing an explicit fill.

Link copied to clipboard
data class ConvertPathData(val leadingZero: Boolean, val floatPrecision: Int) : SvgoPlugin

Configures path data optimization.

Link copied to clipboard
data class OverrideConvertShapeToPath(val convertArcs: Boolean, val floatPrecision: Int) : SvgoPlugin

Overrides the built-in convertShapeToPath plugin to skip shapes with stroke-dasharray (which s2c doesn't support on paths).

Link copied to clipboard
data class PresetDefault(val overrides: Map<String, Boolean>) : SvgoPlugin

The built-in preset-default plugin bundle with specific overrides.

Properties

Link copied to clipboard
abstract val name: String