# dxSetTextureEdge (Client)

> Chooses what an image shows when it is read outside its edges.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Screen drawing
- **URL**: https://wiki.mymp.gg/en/dxSetTextureEdge

## Syntax

```lua
bool dxSetTextureEdge(texture|dui texture, string edge [, color borderColor = 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `texture` | `texture\|dui` | The image: a texture, render target, screen source or dui. |
| `edge` | `string` | `wrap` (repeats), `mirror` (repeats mirrored), `clamp` (stretches the edge), `border` (uses `borderColor`) or `mirror-once`. |
| `borderColor` | `color` | Border colour for `border`, a `tocolor` value. *(default: `0`)* |

## Returns

`true`.

## Example

```lua
local pattern = engineCreateTexture("images/stripes.png")
dxSetTextureEdge(pattern, "wrap")

addEventHandler("onClientRender", root, function()
    dxDrawImageSection(0, 0, 400, 100, 0, 0, 400, 100, pattern)
end)
```

## See also

- [dxDrawImageSection (Client)](https://wiki.mymp.gg/en/dxDrawImageSection.md): Draws part of an image on the screen for one frame.
- [engineSetTxdTextureSampling (Client)](https://wiki.mymp.gg/en/engineSetTxdTextureSampling.md): Overrides how the world samples a txd's texture: what happens past its edges and how it is filtered. It takes the place of the material's own addressing.
- [engineCreateTexture (Client)](https://wiki.mymp.gg/en/engineCreateTexture.md): Creates a texture from an image file in the resource or from image bytes in memory. The texture exists on this client only.
