Path
Composable Function
Common
@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,
)
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 of PathNodes that define the path. |
| pathFillType | The PathFillType that specifies how to fill the path. |
| name | Optional name of the path used when describing the vector as a string. |
| fill | The Brush used to fill the path. |
| fillAlpha | The alpha value to use for fill. |
| stroke | The Brush used to stroke the path. |
| strokeAlpha | The alpha value to use for stroke. |
| strokeLineWidth | The width of the stroke. See Stroke.width for details. |
| strokeLineCap | The StrokeCap of stroke. See Stroke.cap for details. |
| strokeLineJoin | The StrokeJoin of stroke. See Stroke.join for details. |
| strokeLineMiter | The stroke miter value. See Stroke.miter for details. |
| trimPathStart | The fraction of the path that specifies the start of the clipped region of the path. See PathMeasure.getSegment. |
| trimPathEnd | The fraction of the path that specifies the end of the clipped region of the path. See PathMeasure.getSegment. |
| trimPathOffset | The amount to offset both trimPathStart and trimPathEnd. |
