# Xui.ToolKit.UI.Drawing

Assembly: **Xui.ToolKit.UI** · [C# declarations](index.cs) · [Assembly overview](../index.md)

## Types

- [`class RoundedRectShadow`](#api-43fea4f3b27ccebb)

<a id="api-43fea4f3b27ccebb"></a>

## `class RoundedRectShadow`

Draws a soft rounded-rectangle outline shadow using only gradient-filled geometry.

```csharp
public static class RoundedRectShadow
{
    public static void Draw(IContext context, Rect bounds, CornerRadius radius, nfloat extent, Color color);
}
```

<a id="api-1ffaf7083a49828e"></a>

### [`void RoundedRectShadow.Draw(IContext context, Rect bounds, CornerRadius radius, NFloat extent, Color color)`](#api-1ffaf7083a49828e)


```csharp
public static void Draw(IContext context, Rect bounds, CornerRadius radius, nfloat extent, Color color);
```

Draws a shadow outside the supplied rounded rectangle.

- **`context`** — The drawing context.

- **`bounds`** — The rectangle whose interior remains unpainted.

- **`radius`** — Corner radii, clamped to fit the rectangle.

- **`extent`** — Distance from the outline to the transparent outer edge.

- **`color`** — Shadow color and opacity at the outline.

Uses up to four strips and four quarter rings, without a bitmap, blur pass, or extra clip. Uniform corners share one radial gradient; all strips share one linear gradient. This is a geometric falloff, not a Gaussian blur. Canvas state is restored, but the current path is replaced. The caller must include the extent in its culling bounds.

