Class

RemoteImageVector.Builder

Builder used to construct a Vector graphic tree.

Source set: JvmAndAndroid
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: RemoteBlendMode = RemoteBlendMode.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 RemoteImageVector before it is composed through The generated RemoteImageVector 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: JvmAndAndroid
public fun build(): RemoteImageVector

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

Return

The newly created RemoteImageVector instance

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: