- Documentation
- Client functions
- dxSetTextureEdge
Function
dxSetTextureEdge
Sets what a texture shows outside its image in sections (dxDrawImageSection): repeat (wrap), mirror (mirror), stretched edge (clamp) or a border colour (border).
Syntax
bool dxSetTextureEdge(element theTexture, string textureEdge [, int borderColor])Arguments
theTextureelement- The texture.
textureEdgestring"wrap","mirror","clamp","border".borderColorint, optional- Border colour for
border.
Returns
true on success.
Example
A tiled background: a section bigger than the texture repeats it.
local tile = dxCreateTexture("img/kafel.png")
dxSetTextureEdge(tile, "wrap")
addEventHandler("onClientRender", root, function()
dxDrawImageSection(0, 0, 512, 512, 0, 0, 512, 512, tile)
end)