Class

RemoteImageVector

A base class for defining vector graphics that can be drawn in a remote compose.

Source set: JvmAndAndroid
public class RemoteImageVector internal constructor(
    internal val name: String,
    internal val defaultWidth: RemoteFloat,
    internal val defaultHeight: RemoteFloat,
    internal val viewportWidth: RemoteFloat,
    internal val viewportHeight: RemoteFloat,
    internal val tintColor: RemoteColor = RemoteColor.Transparent,
    internal val tintBlendMode: RemoteBlendMode = RemoteBlendMode.SrcIn,
    internal val autoMirror: Boolean = false,
)

A base class for defining vector graphics that can be drawn in a remote compose. It could be rendered by passing it as an argument to painterRemoteVector.

Members

Companion

Source set: JvmAndAndroid
public companion object

Builder

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: