Svg

Represents an SVG with mutable properties.

NOTE: This interface is provided to enable custom SVG parsing/rendering implementations, however it intentionally only provides hooks for the properties Coil uses. Additionally, these classes are very likely to change in the future.

Types

Link copied to clipboard
fun interface Parser

An SVG parser that converts bytes into an Svg.

Link copied to clipboard
data class ViewBox(val left: Float, val top: Float, val right: Float, val bottom: Float)

Properties

Link copied to clipboard
abstract val height: Float
Link copied to clipboard
abstract var viewBox: Svg.ViewBox?
Link copied to clipboard
abstract val width: Float

Functions

Link copied to clipboard
abstract fun asImage(width: Int = this.width.toInt(), height: Int = this.height.toInt()): Image

Wrap this SVG as an Image.

Link copied to clipboard
abstract fun height(value: String)
Link copied to clipboard
abstract fun options(options: Options)
Link copied to clipboard
abstract fun width(value: String)