# SimpleTextureBaseAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/SimpleTextureBaseAPI

## Functions

### ClearRadialProgressBar

```lua
self:ClearRadialProgressBar()
```

Disable radial progress bar rendering and restore standard texture display.

### ClearSVG

```lua
self:ClearSVG()
```

### ClearTextureSlice

```lua
self:ClearTextureSlice()
```

Disable shader based nineslice texture rendering. Since SetAtlas will automatically load slice data for the atlas from the DB, can be useful if you want to disable nineslice after setting an atlas.

### ClearVertexOffsets

```lua
self:ClearVertexOffsets()
```

### GetAtlas

```lua
atlas = self:GetAtlas()
```

Returns:
- `atlas`: textureAtlas

### GetBlendMode

```lua
blendMode = self:GetBlendMode()
```

Returns:
- `blendMode`: BlendMode

### GetDesaturation

```lua
desaturation = self:GetDesaturation()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `desaturation`: normalizedValue

### GetHorizTile

```lua
tiling = self:GetHorizTile()
```

Returns:
- `tiling`: bool

### GetRadialProgressBarEndOffset

```lua
offset = self:GetRadialProgressBarEndOffset()
```

Returns the end angle offset of the radial progress bar as a normalized value (0 to 1).

Returns:
- `offset`: normalizedValue

### GetRadialProgressBarFeather

```lua
feather = self:GetRadialProgressBarFeather()
```

Returns the feather/blur amount applied to the radial progress bar edge.

Returns:
- `feather`: normalizedValue

### GetRadialProgressBarPercent

```lua
percent = self:GetRadialProgressBarPercent()
```

Returns the fill percentage of the radial progress bar (0 to 1).

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `percent`: normalizedValue

### GetRadialProgressBarReverse

```lua
reverse = self:GetRadialProgressBarReverse()
```

Returns whether the radial progress bar fills in reverse (counterclockwise) direction.

Returns:
- `reverse`: bool

### GetRadialProgressBarStartOffset

```lua
offset = self:GetRadialProgressBarStartOffset()
```

Returns the start angle offset of the radial progress bar as a normalized value (0 to 1).

Returns:
- `offset`: normalizedValue

### GetRotation

```lua
radians, normalizedRotationPoint = self:GetRotation()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `radians`: number
- `normalizedRotationPoint`: vector2

### GetTexCoord

```lua
ulX, ulY, llX, llY, urX, urY, lrX, lrY = self:GetTexCoord()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `ulX`: number
- `ulY`: number
- `llX`: number
- `llY`: number
- `urX`: number
- `urY`: number
- `lrX`: number
- `lrY`: number

### GetTexelSnappingBias

```lua
bias = self:GetTexelSnappingBias()
```

Returns:
- `bias`: normalizedValue

### GetTexture

```lua
textureFile = self:GetTexture()
```

Returns:
- `textureFile`: cstring, may be nil

### GetTextureFileID

```lua
textureFile = self:GetTextureFileID()
```

Returns:
- `textureFile`: fileID

### GetTextureFilePath

```lua
textureFile = self:GetTextureFilePath()
```

Returns:
- `textureFile`: cstring, may be nil

### GetTextureSliceMargins

```lua
left, top, right, bottom = self:GetTextureSliceMargins()
```

May return nothing.

Returns:
- `left`: number
- `top`: number
- `right`: number
- `bottom`: number

### GetTextureSliceMode

```lua
sliceMode = self:GetTextureSliceMode()
```

May return nothing.

Returns:
- `sliceMode`: UITextureSliceMode

### GetVertTile

```lua
tiling = self:GetVertTile()
```

Returns:
- `tiling`: bool

### GetVertexOffset

```lua
offsetX, offsetY = self:GetVertexOffset(vertexIndex)
```

Arguments:
- `vertexIndex`: luaIndex

Returns:
- `offsetX`: uiUnit
- `offsetY`: uiUnit

### IsBlockingLoadRequested

```lua
blocking = self:IsBlockingLoadRequested()
```

Returns:
- `blocking`: bool

### IsDesaturated

```lua
desaturated = self:IsDesaturated()
```

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns:
- `desaturated`: bool

### IsSnappingToPixelGrid

```lua
snap = self:IsSnappingToPixelGrid()
```

Returns:
- `snap`: bool

### ResetTexCoord

```lua
self:ResetTexCoord()
```

### SetAtlas

```lua
self:SetAtlas(atlas, [useAtlasSize], [filterMode], [resetTexCoords], [wrapModeHorizontal], [wrapModeVertical])
```

Arguments:
- `atlas`: textureAtlas
- `useAtlasSize`: bool, default false
- `filterMode`: FilterMode, may be nil
- `resetTexCoords`: bool, may be nil
- `wrapModeHorizontal`: cstring, may be nil
- `wrapModeVertical`: cstring, may be nil

### SetBlendMode

```lua
self:SetBlendMode(blendMode)
```

Arguments:
- `blendMode`: BlendMode

### SetBlockingLoadsRequested

```lua
self:SetBlockingLoadsRequested([blocking])
```

Arguments:
- `blocking`: bool, default false

### SetColorTexture

```lua
self:SetColorTexture(colorR, colorG, colorB, [a])
```

Arguments:
- `colorR`: number
- `colorG`: number
- `colorB`: number
- `a`: SingleColorValue, may be nil

### SetDesaturated

```lua
self:SetDesaturated([desaturated])
```

Arguments:
- `desaturated`: bool, default false

### SetDesaturation

```lua
self:SetDesaturation(desaturation)
```

Arguments:
- `desaturation`: normalizedValue

### SetGradient

```lua
self:SetGradient(orientation, minColor, maxColor)
```

Arguments:
- `orientation`: Orientation
- `minColor`: colorRGBA
- `maxColor`: colorRGBA

### SetHorizTile

```lua
self:SetHorizTile([tiling])
```

Arguments:
- `tiling`: bool, default false

### SetMask

```lua
self:SetMask(file)
```

Arguments:
- `file`: cstring

### SetRadialProgressBarEndOffset

```lua
self:SetRadialProgressBarEndOffset(offset)
```

Sets the end angle offset of the radial progress bar as a normalized value (0 to 1).

Arguments:
- `offset`: normalizedValue

### SetRadialProgressBarFeather

```lua
self:SetRadialProgressBarFeather(feather)
```

Sets the feather/blur amount applied to the radial progress bar edge (higher = more gradual falloff).

Arguments:
- `feather`: normalizedValue

### SetRadialProgressBarPercent

```lua
self:SetRadialProgressBarPercent(percent)
```

Sets the fill percentage of the radial progress bar (0 to 1).

Arguments:
- `percent`: normalizedValue

### SetRadialProgressBarReverse

```lua
self:SetRadialProgressBarReverse(reverse)
```

Sets whether the radial progress bar fills in reverse (counterclockwise) direction.

Arguments:
- `reverse`: bool

### SetRadialProgressBarStartOffset

```lua
self:SetRadialProgressBarStartOffset(offset)
```

Sets the start angle offset of the radial progress bar as a normalized value (0 to 1), where 0 is at the bottom.

Arguments:
- `offset`: normalizedValue

### SetRotation

```lua
self:SetRotation(radians, [normalizedRotationPoint])
```

Arguments:
- `radians`: number
- `normalizedRotationPoint`: vector2, may be nil

### SetSVG

```lua
success = self:SetSVG(svgAsset)
```

Arguments:
- `svgAsset`: FileAsset

Returns:
- `success`: bool

### SetSnapToPixelGrid

```lua
self:SetSnapToPixelGrid([snap])
```

Arguments:
- `snap`: bool, default false

### SetSpriteSheetCell

```lua
self:SetSpriteSheetCell(cell, numRows, numColumns, [cellWidth], [cellHeight])
```

Arguments:
- `cell`: luaIndex
- `numRows`: number
- `numColumns`: number
- `cellWidth`: number, may be nil
- `cellHeight`: number, may be nil

### SetTexCoord

```lua
self:SetTexCoord(left, right, bottom, top)
```

Arguments:
- `left`: number
- `right`: number
- `bottom`: number
- `top`: number

### SetTexelSnappingBias

```lua
self:SetTexelSnappingBias(bias)
```

Arguments:
- `bias`: normalizedValue

### SetTexture

```lua
success = self:SetTexture([textureAsset], [wrapModeHorizontal], [wrapModeVertical], [filterMode])
```

Arguments:
- `textureAsset`: cstring, may be nil
- `wrapModeHorizontal`: cstring, may be nil
- `wrapModeVertical`: cstring, may be nil
- `filterMode`: cstring, may be nil

Returns:
- `success`: bool

### SetTextureSliceMargins

```lua
self:SetTextureSliceMargins(left, top, right, bottom)
```

Enables nineslice texture rendering using the specified pixel margins. Preferred over legacy nineslice approach that uses 9 separate textures.

Arguments:
- `left`: number
- `top`: number
- `right`: number
- `bottom`: number

### SetTextureSliceMode

```lua
self:SetTextureSliceMode(sliceMode)
```

Controls whether the center and sides are Stretched or Tiled when using nineslice texture rendering. Defaults to Stretched.

Arguments:
- `sliceMode`: UITextureSliceMode

### SetVertTile

```lua
self:SetVertTile([tiling])
```

Arguments:
- `tiling`: bool, default false

### SetVertexOffset

```lua
self:SetVertexOffset(vertexIndex, offsetX, offsetY)
```

Arguments:
- `vertexIndex`: luaIndex
- `offsetX`: uiUnit
- `offsetY`: uiUnit

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
