{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

VectorPath

public final class VectorPath extends VectorNode

java.lang.Object
   ↳ 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 shape itself

This is constructed as part of the result of ImageVector.Builder construction

Summary

Public methods

boolean
equals(Object other)
final Brush

Specifies the color or gradient used to fill the path

final float

Opacity to fill the path

final @NonNull String

Name of the corresponding path

final @NonNull List<@NonNull PathNode>

Path information to render the shape of the path

final @NonNull PathFillType

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

final Brush

Specifies the color or gradient used to fill the stroke

final float

Opacity to stroke the path

final @NonNull StrokeCap

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

final @NonNull StrokeJoin

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

final float

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

final float

Width of the line to stroke the path

final float

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

final float

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

final float

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

int

Public methods

equals

public boolean equals(Object other)

getFill

public final Brush getFill()

Specifies the color or gradient used to fill the path

getFillAlpha

public final float getFillAlpha()

Opacity to fill the path

getName

public final @NonNull String getName()

Name of the corresponding path

getPathData

public final @NonNull List<@NonNull PathNodegetPathData()

Path information to render the shape of the path

getPathFillType

public final @NonNull PathFillType getPathFillType()

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

getStroke

public final Brush getStroke()

Specifies the color or gradient used to fill the stroke

getStrokeAlpha

public final float getStrokeAlpha()

Opacity to stroke the path

getStrokeLineCap

public final @NonNull StrokeCap getStrokeLineCap()

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

getStrokeLineJoin

public final @NonNull StrokeJoin getStrokeLineJoin()

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

getStrokeLineMiter

public final float getStrokeLineMiter()

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

getStrokeLineWidth

public final float getStrokeLineWidth()

Width of the line to stroke the path

getTrimPathEnd

public final float getTrimPathEnd()

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

getTrimPathOffset

public final float getTrimPathOffset()

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.

getTrimPathStart

public final float getTrimPathStart()

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

hashCode

public int hashCode()