# FillGradient

> Describes a fill gradient used for rendering filled shapes in Painter2D. The start, end, center, focus, and radius properties are pixel coordinate relative to the painter's coordinate system.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public struct FillGradient
```

## Remarks

This struct encapsulates the data required to define a gradient fill, including the gradient itself, the type of gradient (linear or radial), and the parameters that control the direction or focus of the gradient.

## Properties

| Property                                                                                            | Description                                                                              |
| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [addressMode](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/addressmode.md)   | Specifies how the gradient is sampled when UV coordinates are outside the \[0, 1] range. |
| [center](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/center.md)             | The center point for a radial gradient.                                                  |
| [end](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/end.md)                   | The end point for a linear gradient.                                                     |
| [focus](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/focus.md)               | The Focus point for radial gradient.                                                     |
| [gradient](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/gradient.md)         | The color gradient used for the fill.                                                    |
| [gradientType](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/gradienttype.md) | The type of gradient to use (linear or radial).                                          |
| [radius](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/radius.md)             | The radius for a radial gradient.                                                        |
| [start](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/start.md)               | The start point for a linear gradient.                                                   |

## Static Methods

| Method                                                                                                          | Description                                                                                           |
| --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [MakeLinearGradient](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/makelineargradient.md) | Helper method to create a linear gradient fill, using startColor and endColor to define the gradient. |
| [MakeRadialGradient](/engine/6000.5/script-reference/unityengine/uielements/fillgradient/makeradialgradient.md) | Helper method to create a radial gradient fill, using startColor and endColor to define the gradient. |
