# rememberVectorPainter

Common/All

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/rememberVectorPainter.composable#rememberVectorPainter(androidx.compose.ui.graphics.vector.ImageVector)(image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector)` Create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableOpenTarget(index = -1) [rememberVectorPainter](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/rememberVectorPainter.composable#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Function2))( defaultWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, defaultHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, tintColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, tintBlendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorComposable (viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Replace rememberVectorPainter graphicsLayer that consumes the auto mirror flag | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposableOpenTarget(index = -1) https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/rememberVectorPainter.composable#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Boolean,kotlin.Function2)( defaultWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, defaultHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, tintColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, tintBlendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode, autoMirror: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorComposable (viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` with the Vector defined by the provided sub-composition. | Cmn |

## Functions

### rememberVectorPainter

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/vector/VectorPainter.kt+function:rememberVectorPainter) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
@Composable
fun rememberVectorPainter(image: ImageVector): VectorPainter
```

Create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector`. This will create a sub-composition of the vector hierarchy given the tree structure in `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector`

| Parameters |
|---|---|
| `image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/ImageVector` | ImageVector used to create a vector graphic sub-composition |

### rememberVectorPainter

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/vector/VectorPainter.kt+function:rememberVectorPainter)

```
@Composable
@ComposableOpenTarget(index = -1)
fun [rememberVectorPainter](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/rememberVectorPainter.composable#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Function2))(
    defaultWidth: Dp,
    defaultHeight: Dp,
    viewportWidth: Float = Float.NaN,
    viewportHeight: Float = Float.NaN,
    name: String = RootGroupName,
    tintColor: Color = Color.Unspecified,
    tintBlendMode: BlendMode = BlendMode.SrcIn,
    content: @Composable @VectorComposable (viewportWidth: Float, viewportHeight: Float) -> Unit
): VectorPainter
```

> [!CAUTION]
> **This function is deprecated.**   
> Replace rememberVectorPainter graphicsLayer that consumes the auto mirror flag, use this instead:
>
> ```kotlin
> rememberVectorPainter(defaultWidth, defaultHeight, viewportWidth, viewportHeight, name, tintColor, tintBlendMode, false, content)
> ```

Create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` with the Vector defined by the provided sub-composition

| Parameters |
|---|---|
| `defaultWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | Intrinsic width of the Vector in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` |
| `defaultHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | Intrinsic height of the Vector in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` |
| `viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Width of the viewport space. The viewport is the virtual canvas where paths are drawn on. This parameter is optional. Not providing it will use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Function2)` converted to pixels |
| `viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Height of the viewport space. The viewport is the virtual canvas where paths are drawn on. This parameter is optional. Not providing it will use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Function2)` converted to pixels |
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html = RootGroupName` | optional identifier used to identify the root of this vector graphic |
| `tintColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | optional color used to tint the root group of this vector graphic |
| `tintBlendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = BlendMode.SrcIn` | BlendMode used in combination with `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Function2)` |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorComposable (viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Composable used to define the structure and contents of the vector graphic |

### rememberVectorPainter

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/vector/VectorPainter.kt+function:rememberVectorPainter)

```
@Composable
@ComposableOpenTarget(index = -1)
fun rememberVectorPainter(
    defaultWidth: Dp,
    defaultHeight: Dp,
    viewportWidth: Float = Float.NaN,
    viewportHeight: Float = Float.NaN,
    name: String = RootGroupName,
    tintColor: Color = Color.Unspecified,
    tintBlendMode: BlendMode = BlendMode.SrcIn,
    autoMirror: Boolean = false,
    content: @Composable @VectorComposable (viewportWidth: Float, viewportHeight: Float) -> Unit
): VectorPainter
```

Create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorPainter` with the Vector defined by the provided sub-composition.

Inside `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Boolean,kotlin.Function2)` use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/Group.composable#Group(kotlin.String,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.collections.List,kotlin.Function0)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/Path.composable#Path(kotlin.collections.List,androidx.compose.ui.graphics.PathFillType,kotlin.String,androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.graphics.Brush,kotlin.Float,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.StrokeJoin,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float)` composables to define the vector

| Parameters |
|---|---|
| `defaultWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | Intrinsic width of the Vector in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` |
| `defaultHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | Intrinsic height of the Vector in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` |
| `viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Width of the viewport space. The viewport is the virtual canvas where paths are drawn on. This parameter is optional. Not providing it will use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Boolean,kotlin.Function2)` converted to pixels |
| `viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Height of the viewport space. The viewport is the virtual canvas where paths are drawn on. This parameter is optional. Not providing it will use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Boolean,kotlin.Function2)` converted to pixels |
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html = RootGroupName` | optional identifier used to identify the root of this vector graphic |
| `tintColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | optional color used to tint the root group of this vector graphic |
| `tintBlendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = BlendMode.SrcIn` | BlendMode used in combination with `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/package-summary#rememberVectorPainter(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,kotlin.Float,kotlin.Float,kotlin.String,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.BlendMode,kotlin.Boolean,kotlin.Function2)` |
| `autoMirror: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Determines if the contents of the Vector should be mirrored for right to left layouts. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/vector/VectorComposable (viewportWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, viewportHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Composable used to define the structure and contents of the vector graphic |