dxSetTextureEdge
Client-side
Server-side
Shared
This functions allows you to change the edge handling after creating the texture.
OOP Syntax Help! I don't understand this!
- Method:texture:setEdge(...)
Syntax
bool dxSetTextureEdge ( texture theTexture, string textureEdge, [ int border-color = 0 ] )Required Arguments
- theTexture: The affected texture.
- textureEdge: The texture edge mode.
- wrap: Wrap the texture at the edges (default).
- clamp: Clamp the texture at the edges. This may help avoid edge artifacts.
- mirror: Mirror the texture at the edges.
- border
- mirror-once
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- border-color (default: 0): If textureEdge is set to
border, you are able to define a border color here.
Returns
- bool: result
Returns true if success, false otherwise.
Code Examples
client
The following example draws the image ingame.
local renderTarget1 = dxCreateScreenSource(300, 300)dxSetTextureEdge(renderTarget1, "wrap")local renderTarget2 = dxCreateScreenSource(300, 300)dxSetTextureEdge(renderTarget2, "mirror")local renderTarget3 = dxCreateScreenSource(300, 300)dxSetTextureEdge(renderTarget3, "clamp")local renderTarget4 = dxCreateScreenSource(300, 300)dxSetTextureEdge(renderTarget4, "border", tocolor(255, 0, 0))
addEventHandler("onClientRender", root, function() -- Update the screen sources dxUpdateScreenSource(renderTarget1) dxUpdateScreenSource(renderTarget2) dxUpdateScreenSource(renderTarget3) dxUpdateScreenSource(renderTarget4)
-- Draw screen sources in different modes dxDrawImageSection(20, 200, 300, 300, -50, 0, 100, 100, renderTarget1) dxDrawImageSection(350, 200, 300, 300, -50, 0, 100, 100, renderTarget2) dxDrawImageSection(680, 200, 300, 300, -50, 0, 100, 100, renderTarget3) dxDrawImageSection(1010, 200, 300, 300, -50, 0, 100, 100, renderTarget4)end)See Also
Drawing Functions
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTargetUpdated
- dxCreateScreenSource
- dxCreateShader
- dxCreateTextureUpdated
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawModel3DNew
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsFormat
- dxGetPixelsSize
- dxGetStatusUpdated
- dxGetTextSize
- dxGetTexturePixelsUpdated
- dxGetTextWidth
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetShaderValue
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource
