# RadialGradient

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/Brush.kt+class:androidx.compose.ui.graphics.RadialGradient) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  class RadialGradient : ShaderBrush, Interpolatable
  ```

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.compose.ui.graphics.Brush](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush) |||
|   | ↳ | [androidx.compose.ui.graphics.ShaderBrush](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ShaderBrush) ||
|   |   | ↳ | [androidx.compose.ui.graphics.RadialGradient](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RadialGradient) |

*** ** * ** ***

Brush implementation used to apply a radial gradient on a given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint`

## Summary

| ### Public functions |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shader` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RadialGradient#createShader(androidx.compose.ui.geometry.Size)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size)` | Cmn |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RadialGradient#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RadialGradient#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RadialGradient#lerp(kotlin.Any,kotlin.Float)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` This method is defined such that a value of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` being 1.0 means that the interpolation has finished, meaning that this method should return either `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` (or something equivalent to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`), 0.0 meaning that the interpolation has not started, returning `this` (or something equivalent to `this`), and values in between meaning that the interpolation is at the relevant point on the timeline between `this` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RadialGradient#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/RadialGradient#intrinsicSize()` Return the intrinsic size of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush`. | Cmn |

| ### Inherited functions |
|---|
| From [androidx.compose.ui.graphics.ShaderBrush](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ShaderBrush) |---|---|---| | `final https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ShaderBrush#applyTo(androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.Paint,kotlin.Float)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, p: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` | Cmn | |

| ### Inherited properties |
|---|
| From [androidx.compose.ui.graphics.ShaderBrush](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ShaderBrush) |---|---|---| | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ShaderBrush#transform()` A transformation matrix for the shader. | Cmn | |

## Public functions

### createShader

Cmn

```
open fun createShader(size: Size): Shader
```

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### lerp

Cmn

```
open fun lerp(other: Any?, t: Float): Any?
```

This method is defined such that a value of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` being 1.0 means that the interpolation has finished, meaning that this method should return either `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` (or something equivalent to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`), 0.0 meaning that the interpolation has not started, returning `this` (or something equivalent to `this`), and values in between meaning that the interpolation is at the relevant point on the timeline between `this` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)`. The interpolation can be extrapolated beyond 0.0 and 1.0, so negative values and values greater than 1.0 are valid.

Note that the type of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` may not be the same as the type of `this`, however if the implementation knows how to losslessly convert from one type to another, the conversion can be made in order to optimistically provide a valid interpolation.

If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable#lerp(kotlin.Any,kotlin.Float)` is `null`, this can be interpreted as interpolating between "nothing" or, "no effect", into whatever the value of `this` is. In this case, if it is possible to construct a version of this type that is visually or semantically equivalent to "no effect", then it might make sense to return an interpolation between that value and `this`.

If there is no known way to interpolate between the two values, the implementation should return null.

| Parameters |
|---|---|
| `other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The other object to be intorpolated with this one. |
| `t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The position on the timeline. This is usually between 0 and 1, but it is valid for it to be outside of this range. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The interpolated object. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Interpolatable` | #lerp |

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### intrinsicSize

Cmn

```
open val intrinsicSize: Size
```

Return the intrinsic size of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush`. If the there is no intrinsic size (i.e. filling bounds with an arbitrary color) return `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#Unspecified()`. If there is no intrinsic size in a single dimension, return `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` with `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/-companion/-na-n.html` in the desired dimension.