Draw system static methods
SetColor
Defines the drawing color in RGBA (0–255, 0–100) for all subsequent draw calls.
Parameters
r
(number): red component (0–255)g
(number): green component (0–255)b
(number): blue component (0–255)a
(number, optional): alpha component (0–100). Defaults to 100 (opaque).
Returns
nil
Example:
_A.Draw:SetColor(255,128,64,50) -- semi‑transparent orange
SetColorRaw
Assigns raw normalized RGBA values (0.0–1.0) without scaling.
Parameters
- r, g, b, a (number): normalized color components
Returns
nil
Example:
_A.Draw:SetColorRaw(1.0,0.5,0.25,0.75)
SetColorHex
Parses a hex ARGB code and applies its color.
Parameters
hc
(string|number): e.g. 0xFFFF0000 or "#FF00FF00"
Returns
nil
Example:
_A.Draw:SetColorHex(0x80FF0000) -- 50%‑opaque red
SetThickness
Sets stroke width for lines/shapes.
Parameters
thickness
(number): line width in pixels.
Returns
nil
Example:
_A.Draw:SetThickness(2.5)
SetLayer
Choose which rendering layer to draw on.
Parameters
level
(number):- -1: behind world objects
- 0: behind UI
- 1: above UI
Returns
nil
Example:
_A.Draw:SetLayer(0) -- draw behind UI
SetStroke
Enable or disable text outline (stroke) for future text draws.
Parameters
enabled
(boolean):true
for outline,false
for none.
Returns
nil
Example:
_A.Draw:SetStroke(true)
SetRounding
Set corner‑rounding radius for rectangle draws.
Parameters
radius
(number): corner radius in pixels.
Returns
nil
Example:
_A.Draw:SetRounding(4.0)
SetGradientSize
Set gradient fade length for shapes.
Parameters
size
(number): gradient size in pixels.
Returns
nil
Example:
_A.Draw:SetGradientSize(10.0)
SetFontSize
Set the default font size for subsequent text draws.
Parameters
size
(number): font height in points.
Returns
nil
Example:
_A.Draw:SetFontSize(16.0)
SetSegments
Set the number of segments used to approximate circles.
Parameters
count
(number): segment count (higher = smoother).
Returns
nil
Example:
_A.Draw:SetSegments(32)
SetFilled
Choose whether shapes are filled or only outlined.
Parameters
flag
(boolean): true = filled, false = outline.
Returns
nil
Example:
_A.Draw:SetFilled(true)
LoadTexture
Load a texture into a drawable texture object.
Parameters
filePath
(string): path to texture
Returns
texture object with .id,.width,.height,.path or nil
Example:
local tex1 = _A.Draw:LoadTexture(mediaPath.."logo.png")
local tex2 = _A.Draw:LoadTexture(mediaPath.."mogu_rune_blue.blp")
local tex3 = _A.Draw:LoadTexture("Interface\\Icons\\Ability_Ambush")
LoadFont
Load a TTF font.
Parameters
filePath
(string)fontSize
(number, default 13)glyph
(string|table): e.g. "Latin" orlist of glyphs
Can be one of the following:
- "Latin", "Greek", "Korean", "Japanese", "Chinese", "ChineseFull", "Cyrillic", "Thai", "Vietnamese".
If a table is provided, it will be used as a list of glyphs to load. If not provided or if the glyph is not valid, defaults to "Latin"
.
Returns
font object with .id,.size,.glyph or nil
Example:
local f = _A.Draw:LoadFont("fonts/arial.ttf",16,"Greek")