# CFX::SET_DRAW_ORIGIN

- **Hash:** `0xE10198D5`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetDrawOrigin`
- **Side:** client (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_DRAW_ORIGIN

## Signature

```c
void SET_DRAW_ORIGIN(float x, float y, float z, BOOL is2d);
```

## Parameters

- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `is2d` (`BOOL`)

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Sets the on-screen drawing origin for draw-functions in world coordinates.

The effect can be reset by calling [`CLEAR_DRAW_ORIGIN`](#\_0xDD76B263) and is limited to 32 different origins each frame.

## Usage

### Lua

```lua
SetDrawOrigin(x, y, z, is2d)

-- always available, by hash
Citizen.InvokeNative(0xe10198d5, x, y, z, is2d)
```

### JavaScript

```js
SetDrawOrigin(x, y, z, is2d);

// by hash
Citizen.invokeNative('0xe10198d5', x + 0.0000001, y + 0.0000001, z + 0.0000001, is2d);
```

### C#

```csharp
Function.Call((Hash)0xe10198d5, x, y, z, is2d);
```

- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

## See also

- [CFX::CLEAR_DRAW_ORIGIN](https://natives.borderlinerp.com/natives/CFX/CLEAR_DRAW_ORIGIN.md) — Resets the screen's draw-origin which was changed by the function SET_DRAW_ORIGIN back to x=0, y=0.

*Sources: Cfx.re native reference.*
