Class

RemoteImageVector.Builder

Builder used to construct a Vector graphic tree.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
public class Builder(

        /**
         * Used to define the width of the viewport space. Viewport is basically the virtual canvas
         * where the paths are drawn on.
         */
        private val viewportWidth: RemoteFloat,

        /**
         * Used to define the height of the viewport space. Viewport is basically the virtual canvas
         * where the paths are drawn on.
         */
        private val viewportHeight: RemoteFloat,

        /** Optional color used to tint the entire vector image */
        private val tintColor: RemoteColor,

        /** Name of the vector asset */
        private val name: String = DefaultGroupName,

        /** Blend mode used to apply the tint color */
        private val tintBlendMode: BlendMode = BlendMode.SrcIn,

        /**
         * Determines if the vector asset should automatically be mirrored for right to left locales
         */
        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

Functions

build

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

Returns

The newly created ImageVector instance