Builder
Kotlin
|Java
class Builder
kotlin.Any | |
↳ | androidx.compose.ui.graphics.vector.ImageVector.Builder |
Builder used to construct a Vector graphic tree. This is useful for caching the result of expensive operations used to construct a vector graphic for compose. For example, the vector graphic could be serialized and downloaded from a server and represented internally in a ImageVector before it is composed through rememberVectorPainter The generated ImageVector is recommended to be memoized across composition calls to avoid doing redundant work
Summary
Public constructors | |
---|---|
<init>(name: String = DefaultGroupName, defaultWidth: Dp, defaultHeight: Dp, viewportWidth: Float, viewportHeight: Float, tintColor: Color = Color.Unspecified, tintBlendMode: BlendMode = BlendMode.SrcIn) Builder used to construct a Vector graphic tree. |
Public methods | |
---|---|
ImageVector.Builder |
addGroup(name: String = DefaultGroupName, rotate: Float = DefaultRotation, pivotX: Float = DefaultPivotX, pivotY: Float = DefaultPivotY, scaleX: Float = DefaultScaleX, scaleY: Float = DefaultScaleY, translationX: Float = DefaultTranslationX, translationY: Float = DefaultTranslationY, clipPathData: List<PathNode> = EmptyPath) Create a new group and push it to the front of the stack of ImageVector nodes |
ImageVector.Builder |
addPath(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) Add a path to the ImageVector graphic. |
ImageVector |
build() Construct a ImageVector. |
ImageVector.Builder |
Pops the topmost VectorGroup from this ImageVector. |
Extension functions | ||
---|---|---|
From androidx.compose.ui.graphics.vector
|