Class

RemoteImageVector.Builder

Builder used to construct a Vector graphic tree.

Source set: Android
public class Builder(
        private val defaultWidth: RemoteDp,
        private val defaultHeight: RemoteDp,
        private val viewportWidth: RemoteFloat,
        private val viewportHeight: RemoteFloat,
        private val tintColor: RemoteColor,
        private val name: String = DefaultGroupName,
        private val tintBlendMode: BlendMode = BlendMode.SrcIn,
        private val autoMirror: Boolean = false,
    )

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 The generated ImageVector is recommended to be memoized across composition calls to avoid doing redundant work

Parameters

defaultWidth The default width of the vector asset in RemoteDp
defaultHeight The default height of the vector asset in RemoteDp
viewportWidth Used to define the width of the viewport space. Viewport is basically the virtual canvas where the paths are drawn on.
viewportHeight Used to define the height of the viewport space. Viewport is basically the virtual canvas where the paths are drawn on.
tintColor Optional color used to tint the entire vector image
name Name of the vector asset
tintBlendMode Blend mode used to apply the tint color
autoMirror Determines if the vector asset should automatically be mirrored for right to left locales

Functions

build

Source set: Android
public fun build(): RemoteImageVector

Construct a ImageVector. This concludes the creation process of a ImageVector graphic This builder cannot be re-used to create additional ImageVector instances

Return

The newly created ImageVector instance

Content updated: