# Sandbox.Texture.Update

## Overload 1

```csharp
void Update(System.ReadOnlySpan<byte> data, int x = 0, int y = 0, int width = 0, int height = 0)
```

### Parameters

- `data` (`System.ReadOnlySpan<byte>`)
- `x` (`int`), default `0`
- `y` (`int`), default `0`
- `width` (`int`), default `0`
- `height` (`int`), default `0`

## Overload 2

```csharp
void Update(System.ReadOnlySpan<T> data, int x = 0, int y = 0, int width = 0, int height = 0)
```

### Parameters

- `data` (`System.ReadOnlySpan<T>`)
- `x` (`int`), default `0`
- `y` (`int`), default `0`
- `width` (`int`), default `0`
- `height` (`int`), default `0`

## Overload 3

```csharp
void Update(System.ReadOnlySpan<Color32> data, int x = 0, int y = 0, int width = 0, int height = 0)
```

### Parameters

- `data` (`System.ReadOnlySpan<Color32>`)
- `x` (`int`), default `0`
- `y` (`int`), default `0`
- `width` (`int`), default `0`
- `height` (`int`), default `0`

## Overload 4

```csharp
void Update(Bitmap source)
```

Update this texture from the bitmap

### Parameters

- `source` (`Bitmap`)

## Overload 5

```csharp
void Update(Color32 color, Rect rect)
```

Write a coloured rectangle to the texture

### Parameters

- `color` (`Color32`)
- `rect` (`Rect`)

## Overload 6

```csharp
void Update(Color32 color, float x, float y)
```

Write a coloured pixel to the texture

### Parameters

- `color` (`Color32`)
- `x` (`float`)
- `y` (`float`)

Declared in [Sandbox.Texture](/api/Sandbox.Texture).
Assembly: `Sandbox.Engine`.
