path

Function

Common
inline fun ImageVector.Builder.path(
    name: String = DefaultPathName,
    fill: Brush? = null,
    fillAlpha: Float = 1.0f,
    stroke: Brush? = null,
    strokeAlpha: Float = 1.0f,
    strokeLineWidth: Float = DefaultStrokeLineWidth,
    strokeLineCap: StrokeCap = DefaultStrokeLineCap,
    strokeLineJoin: StrokeJoin = DefaultStrokeLineJoin,
    strokeLineMiter: Float = DefaultStrokeLineMiter,
    pathFillType: PathFillType = DefaultFillType,
    pathBuilder: PathBuilder.() -> Unit,
) =
    addPath(
        PathData(pathBuilder),
        pathFillType,
        name,
        fill,
        fillAlpha,
        stroke,
        strokeAlpha,
        strokeLineWidth,
        strokeLineCap,
        strokeLineJoin,
        strokeLineMiter,
    )

DSL extension for adding a VectorPath to this.

See ImageVector.Builder.addPath for the corresponding builder function.

Parameters

namethe name for this path
fillspecifies the Brush used to fill the path
fillAlphathe alpha to fill the path
strokespecifies the Brush used to fill the stroke
strokeAlphathe alpha to stroke the path
strokeLineWidththe width of the line to stroke the path
strokeLineCapspecifies the linecap for a stroked path
strokeLineJoinspecifies the linejoin for a stroked path
strokeLineMiterspecifies the miter limit for a stroked path
pathFillTypespecifies the winding rule that decides how the interior of a Path is calculated.
pathBuilderPathBuilder lambda for adding PathNodes to this path.