Path

Functions summary

Unit
@Composable
@VectorComposable
Path(
    pathData: List<PathNode>,
    pathFillType: PathFillType,
    name: String,
    fill: Brush?,
    fillAlpha: Float,
    stroke: Brush?,
    strokeAlpha: Float,
    strokeLineWidth: Float,
    strokeLineCap: StrokeCap,
    strokeLineJoin: StrokeJoin,
    strokeLineMiter: Float,
    trimPathStart: Float,
    trimPathEnd: Float,
    trimPathOffset: Float
)

Defines a path inside a VectorPainter.

Cmn

Functions

Path

@Composable
@VectorComposable
fun Path(
    pathData: List<PathNode>,
    pathFillType: PathFillType = DefaultFillType,
    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,
    trimPathStart: Float = DefaultTrimPathStart,
    trimPathEnd: Float = DefaultTrimPathEnd,
    trimPathOffset: Float = DefaultTrimPathOffset
): Unit

Defines a path inside a VectorPainter. This is not a regular UI composable, it can only be called inside composables called from the content parameter to rememberVectorPainter.

Parameters
pathData: List<PathNode>

List of PathNodes that define the path.

pathFillType: PathFillType = DefaultFillType

The PathFillType that specifies how to fill the path.

name: String = DefaultPathName

Optional name of the path used when describing the vector as a string.

fill: Brush? = null

The Brush used to fill the path.

fillAlpha: Float = 1.0f

The alpha value to use for fill.

stroke: Brush? = null

The Brush used to stroke the path.

strokeAlpha: Float = 1.0f

The alpha value to use for stroke.

strokeLineWidth: Float = DefaultStrokeLineWidth

The width of the stroke. See Stroke.width for details.

strokeLineCap: StrokeCap = DefaultStrokeLineCap

The StrokeCap of stroke. See Stroke.cap for details.

strokeLineJoin: StrokeJoin = DefaultStrokeLineJoin

The StrokeJoin of stroke. See Stroke.join for details.

strokeLineMiter: Float = DefaultStrokeLineMiter

The stroke miter value. See Stroke.miter for details.

trimPathStart: Float = DefaultTrimPathStart

The fraction of the path that specifies the start of the clipped region of the path. See PathMeasure.getSegment.

trimPathEnd: Float = DefaultTrimPathEnd

The fraction of the path that specifies the end of the clipped region of the path. See PathMeasure.getSegment.

trimPathOffset: Float = DefaultTrimPathOffset

The amount to offset both trimPathStart and trimPathEnd.