Class

RemoteImageVector

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

Source set: Android
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(Color.Unspecified),
    internal val tintBlendMode: BlendMode = BlendMode.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 androidx.compose.remote.creation.compose.vector.painterRemoteVector

Properties

hasClipPath

Source set: Android
public val hasClipPath: Boolean by lazy(LazyThreadSafetyMode.NONE) { root.hasClipPath }

Indicates whether this RemoteImageVector contains any clip paths.

Traverses the root and any nested groups in the vector hierarchy to check if any group specifies non-empty clip path data. This can be used to verify compatibility with player profiles that may not support clipping operations.

Members

Companion

Source set: Android
public companion object

Builder

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: