# dxDrawMaterialSectionLine3D (Client)

> Draws part of an image stretched along a line in the 3D world for one frame.

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

## Syntax

```lua
bool dxDrawMaterialSectionLine3D(float startX, startY, startZ, float endX, endY, endZ, float u, v, float usize, vsize, texture|dui material, float width [, bool flipUV = false, color color = tocolor(255, 255, 255), string|bool stage = postfx, float faceTowardX, faceTowardY, faceTowardZ = nil])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `startX, startY, startZ` | `float` | Start point in the world, the top of the image. A vec3 also works. |
| `endX, endY, endZ` | `float` | End point in the world, the bottom of the image. A vec3 also works. |
| `u, v` | `float` | Top-left corner of the part, in the image's pixels. A vec2 also works. |
| `usize, vsize` | `float` | Size of the part, in the image's pixels. A vec2 also works. |
| `flipUV` | `bool` | Flip the image. Can be left out. *(default: `false`)* |
| `material` | `texture\|dui` | The image: a texture, render target, screen source or dui. |
| `width` | `float` | Width of the strip, in world units. |
| `color` | `color` | Colour multiplied with the image, a `tocolor` value. *(default: `tocolor(255, 255, 255)`)* |
| `stage` | `string\|bool` | When to draw: `prefx`, `postfx` or `postgui`, or a boolean (`true` means `postgui`). *(default: `postfx`)* |
| `faceTowardX, faceTowardY, faceTowardZ` | `float` | Point the image's face turns to. Without it, the image faces the camera. A vec3 also works. *(default: `nil`)* |

## Returns

`true` once the drawing is queued.

## Example

```lua
local atlas = engineCreateTexture("images/atlas.png")

addEventHandler("onClientRender", root, function()
    dxDrawMaterialSectionLine3D(2488, -1666, 16, 2488, -1666, 14, 0, 0, 64, 64, atlas, 2)
end)
```

### Note

`prefx` and `postfx` draw the same way: only `postgui` changes the layer.

## See also

- [dxDrawMaterialLine3D (Client)](https://wiki.mymp.gg/en/dxDrawMaterialLine3D.md): Draws an image stretched along a line in the 3D world for one frame.
- [dxDrawImageSection (Client)](https://wiki.mymp.gg/en/dxDrawImageSection.md): Draws part of an image on the screen for one frame.
- [dxGetMaterialSize (Client)](https://wiki.mymp.gg/en/dxGetMaterialSize.md): Returns the size of an image in pixels.
