addOutline

Function

Common
fun Path.addOutline(outline: Outline) =
    when (outline) {
        is Outline.Rectangle -> addRect(outline.rect)
        is Outline.Rounded -> addRoundRect(outline.roundRect)
        is Outline.Generic -> addPath(outline.path)
    }

Adds the outline to the Path.