Google is committed to advancing racial equity for Black communities. See how.

VectorPath

@Immutable class VectorPath : VectorNode
kotlin.Any
   ↳ androidx.compose.ui.graphics.vector.VectorNode
   ↳ androidx.compose.ui.graphics.vector.VectorPath

Leaf node of a Vector graphics tree. This specifies a path shape and parameters to color and style the the shape itself

This is constructed as part of the result of VectorAssetBuilder construction

Summary

Public methods
Boolean
equals(other: Any?)

Int

Properties
Brush?

Specifies the color or gradient used to fill the path

Float

Opacity to fill the path

String

Name of the corresponding path

List<PathNode>

Path information to render the shape of the path

PathFillType

Rule to determine how the interior of the path is to be calculated

Brush?

Specifies the color or gradient used to fill the stroke

Float

Opacity to stroke the path

StrokeCap

Specifies the linecap for a stroked path, either butt, round, or square.

StrokeJoin

Specifies the linejoin for a stroked path, either miter, round or bevel.

Float

Specifies the miter limit for a stroked path, the default is 4

Float

Width of the line to stroke the path

Float

Specifies the fraction of the path to trim from the end, in the range from 0 to 1.

Float

Specifies the offset of the trim region (allows showed region to include the start and end), in the range from 0 to 1.

Float

Specifies the fraction of the path to trim from the start, in the range from 0 to 1.

Public methods

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

Properties

fill

val fill: Brush?

Specifies the color or gradient used to fill the path

fillAlpha

val fillAlpha: Float

Opacity to fill the path

name

val name: String

Name of the corresponding path

pathData

val pathData: List<PathNode>

Path information to render the shape of the path

pathFillType

val pathFillType: PathFillType

Rule to determine how the interior of the path is to be calculated

stroke

val stroke: Brush?

Specifies the color or gradient used to fill the stroke

strokeAlpha

val strokeAlpha: Float

Opacity to stroke the path

strokeLineCap

val strokeLineCap: StrokeCap

Specifies the linecap for a stroked path, either butt, round, or square. The default is butt.

strokeLineJoin

val strokeLineJoin: StrokeJoin

Specifies the linejoin for a stroked path, either miter, round or bevel. The default is miter

strokeLineMiter

val strokeLineMiter: Float

Specifies the miter limit for a stroked path, the default is 4

strokeLineWidth

val strokeLineWidth: Float

Width of the line to stroke the path

trimPathEnd

val trimPathEnd: Float

Specifies the fraction of the path to trim from the end, in the range from 0 to 1. The default is 1.

trimPathOffset

val trimPathOffset: Float

Specifies the offset of the trim region (allows showed region to include the start and end), in the range from 0 to 1. The default is 0.

trimPathStart

val trimPathStart: Float

Specifies the fraction of the path to trim from the start, in the range from 0 to 1. The default is 0.